The goal of this patch is to add the function that once we detect an
amphora's cert will expire in 2 weeks from utcnow, we will update its
cert with a new one and update its db information at the same time.
In order to achieve this target, I did the following changes:
Add 2 new columns cert_busy and cert_expiration in amphora table
Add methods to get cert expiration date from PEM server_pem and
update db info
Use the new REST agent method to perform cycling
Add process in housekeeping to facilitate rotation
Add unit tests
Change-Id: I28578a3e560ee09ba300788a5423863c893b8638
The test was slightly incorrect to begin with, but the issue didn't
become apparent until the oslo.log update from 1.13.0 to 2.0.0 for
whatever reason. open() raises IOError() not Exception() so it was not
being handled properly.
Also taking this opportunity to standardize the use of builtins to
match our other tests.
Change-Id: Idab637b09e8a437333f810f82f45b3e9c027dfdd
The below patch caused a test order issue with the oslo config
override via fixture. This is causing gate failures.
https://review.openstack.org/#/c/246046/1
This fixes that ordering issue.
Change-Id: Id9390f546cc19ea3af0bfffc0b97b108eb6042e8
The nova compute driver currently raises an exception if the
instance has already been deleted.
This patch logs a warning, but does not raise an exception when
the instance being deleted is not found.
Change-Id: I72e54297b925c5c6ce0dd711a33e19afc74ba37d
Partial-Bug: #1509706
The amphora jinja templater renders the interfaces_file option with a string of 'None'.
This causes failures while communicating with the Amphora.
Change-Id: I57b16387cc84b3942f0af5fc92320513baaff76e
Closes-Bug: #1516827
So far we don't have unit tests for method house_keeping_db_cleanup,
,spare_amphora_check and main in file cmd/house_keeping.py,
this patch is to add unit tests for these 3 methods.
Change-Id: I2f45b905d96a883b364e7645eeac0a7b8a1e9aba
The amphora agent should be able to add interfaces by using the
/etc/network/interfaces file as well as the /etc/network/interfaces.d/*.cfg
files.
Closes-Bug: #1507889
Change-Id: I7840931fc426a0c74386512dfae3666d223049f8
Oslo_reports enables OpenStack projects to dump Guru Meditation
Reports with useful debugging information to files or stderr.
Closes-Bug: #1514504
Change-Id: Id35fb7dc8c31f304cbf1d9cca0d21b9d5e97865a
The following change use Python 3.4 "cryptography" libraries instead of "pyasn1".
https://review.openstack.org/#/c/184868/
Clean up have been performed in requirements.txt
Closes-Bug: #1515917
Change-Id: I36877d27ac222908db7af6183628589dbcdf2968
It some instances it is required to not allow access to the Amphora.
In order to solve both cases make the option configurable.
DocImpact
Closes-Bug: #1515078
Change-Id: I8a04ca86e4111c44a0bf44c8993b87a7acc334a2
When amphora a being built via the housekeeping manager spares
pool management the amphora records in the database are not
being properly updated with the nova details. This results in
the amphora not having a lb_network_ip in the database.
This patch makes sure the amphora database record is updated.
Change-Id: I4a364b6fc631d19f4a93f9fe7c5348a2c9617790
Closes-Bug: #1515009
The new local certificate generator code uses local time
for validity periods causing failures on hosts that do not
use UTC time.
This patch changes this to always use UTC time for certificate
generation.
Change-Id: Ice15ab53f322ac148c85e1f6e781f63f661d6179
Closes-Bug: #1514601
Instead of using assert(Not)Equal(None, ***), developers should
use assertIs(Not)None(***) to have more clear messages in case of failure.
Change-Id: I20dd008badde8a3e87a367e7ab791ace4e117fb7
Passing mutable objects as default args is a known Python pitfall.
We'd better avoid this. This commit changes mutable default args with
None, then use 'arg = arg or {}', 'arg = arg or []'. For unit code which
doesn't use the args , just set with None. This commit also adds hacking
check.
Change-Id: Ib4f195c9c00ca2c49579f9d62648bff7c8109fcf
Closes-Bug: #1327473
In the past HACKING.rst file has not been updated when needed,
this patch update HACKING.rst file for all missing syntax checks.
Furthermore rules checks have been reorder in octavia/hacking/checks.py file.
Change-Id: I34bdcca5d4cc9abad797aff118fbf4e563c42757
Log messages take *args for the format replacements instead of a
tuple. This fixes the 2 that were using tuples.
Closes-Bug: #1513302
Change-Id: Idb3927427684d8a2e053543f76a5085a15753007
This patch is to update the octavia operator api doc
(http://docs.openstack.org/developer/octavia/main/octaviaapi.html),
in this patch we updated the requests and responses content
for each section, such as lb, listener and etc.
Change-Id: Id0f734cb900b3f5e812849ff73e6ca97a8add8eb