516 Commits

Author SHA1 Message Date
OpenStack Proposal Bot
0a1d45f696 Updated from global requirements
Change-Id: Ic05beccd8e6bfa34437eaeec9ad98f6f5730cb38
2015-12-02 20:30:35 +00:00
minwang
19c7f93882 Add cert tracking and rotating in Housekeeping
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
2015-11-30 10:39:34 -08:00
Adam Harwell
900e8a5256 Fix api_server agent test that broke due to a dep change
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
2015-11-24 20:24:14 +00:00
Jenkins
822c0be975 Merge "Stop nova driver delete failure on already deleted" 2015-11-20 03:59:34 +00:00
Jenkins
0617a38394 Merge "Unify constants usage in flows tests" 2015-11-20 02:00:52 +00:00
OpenStack Proposal Bot
71f458be7e Updated from global requirements
Change-Id: I2d9f4dc0de01b013562692f9d6ee2b77262a4b62
2015-11-19 19:16:43 +00:00
Jenkins
f3ab46e146 Merge "Consumer start log appears at appropriate time" 2015-11-19 18:15:06 +00:00
Bertrand Lallau
3d1f10bce3 Unify constants usage in flows tests
Change-Id: I43176c5701070d20352e08b492a86b3997014755
2015-11-19 17:12:40 +00:00
Jenkins
51fb13dd8f Merge "Fix a test order issue with oslo_config fixture" 2015-11-19 17:09:57 +00:00
Jenkins
f44f2f767a Merge "Add unit tests for cmd/house_keeping" 2015-11-19 15:17:38 +00:00
Michael Johnson
e60244b65b Fix a test order issue with oslo_config fixture
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
2015-11-19 01:25:14 +00:00
Michael Johnson
5a9835ccb7 Stop nova driver delete failure on already deleted
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
2015-11-19 00:54:09 +00:00
ptoohill1
b7f1dbc03e Fixes interface_file jinja misconfiguration
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
2015-11-16 18:09:29 -06:00
minwang
2c2baa9978 Add unit tests for cmd/house_keeping
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
2015-11-16 02:17:55 +00:00
Jenkins
a0dc14f046 Merge "Updated from global requirements" 2015-11-14 18:58:12 +00:00
Jenkins
c149c8cb8d Merge "Add Guru Meditation Report feature" 2015-11-14 18:12:22 +00:00
Jenkins
9e4b30efd3 Merge "REST Amp Agent: Handle interfaces file too" 2015-11-14 17:44:46 +00:00
Jenkins
c592901024 Merge "Get rid of unused dependencies in requirements.txt" 2015-11-13 23:10:34 +00:00
Jenkins
34bdc6c76d Merge "pyasn1 and pyasn1-modules modules no more needed" 2015-11-13 23:08:51 +00:00
Jenkins
f9e58cf51d Merge "Get rid of unused dependencies in test-requirements.txt" 2015-11-13 21:20:01 +00:00
Brandon Logan
21058fae59 REST Amp Agent: Handle interfaces file too
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
2015-11-14 02:31:14 +09:00
OpenStack Proposal Bot
70b1f0dfce Updated from global requirements
Change-Id: I5ca64f7dafa8bf3546be321c3cbd836b335b1b88
2015-11-13 17:14:49 +00:00
Bertrand Lallau
d5e0811926 Add Guru Meditation Report feature
Oslo_reports enables OpenStack projects to dump Guru Meditation
Reports with useful debugging information to files or stderr.

Closes-Bug: #1514504
Change-Id: Id35fb7dc8c31f304cbf1d9cca0d21b9d5e97865a
2015-11-13 12:03:19 +01:00
Bertrand Lallau
48cc768750 Get rid of unused dependencies in requirements.txt
- anyjson is a dependency for oslo.serialization
- jsonrpclib (not used)
- iso8601 (not used)
- netaddr (not used)
- networkx (not used)

Change-Id: I49afc80a677fe71295b9d1f723a0c26c12d6993b
2015-11-13 11:43:30 +01:00
Bertrand Lallau
6e66ba525b Get rid of unused dependencies in test-requirements.txt
- cliff (not used)
- fixtures (actually not used in unit tests)
- ordereddict (py26 references)

Change-Id: I3277a9e62822c6279365d2ec2b00270c9a5e9dfb
2015-11-13 11:40:43 +01:00
Jenkins
2914ab06ad Merge "Updated from global requirements" 2015-11-13 10:07:58 +00:00
Bertrand Lallau
b985826fa1 pyasn1 and pyasn1-modules modules no more needed
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
2015-11-13 10:16:09 +01:00
Jenkins
8057fba637 Merge "Revert "Add Pillow to docs-requirements.txt"" 2015-11-13 02:53:05 +00:00
OpenStack Proposal Bot
9325a1750a Updated from global requirements
Change-Id: I856f206f7c5402a9e2863c6a2e9661e3e6a1d396
2015-11-12 22:12:01 +00:00
Jenkins
0878c6b81b Merge "Make amphora ssh access configurable" 2015-11-12 21:10:14 +00:00
ptoohill1
0d0853f4b9 Make amphora ssh access configurable
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
2015-11-11 19:26:49 -06:00
Michael Johnson
a36f8f2a8d Fix a problem building spare amphora
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
2015-11-10 22:34:24 +00:00
Jenkins
e62d772c94 Merge "Use assertIs(Not)None instead of assert(Not)Equal" 2015-11-10 20:25:30 +00:00
Jenkins
c912775dbe Merge "New local certificate generator uses local time" 2015-11-10 00:36:46 +00:00
Michael Johnson
f9cfd2cb0f New local certificate generator uses local time
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
2015-11-09 22:26:38 +00:00
Jenkins
c890ee7e8d Merge "Removes the use of mutables as default args" 2015-11-09 22:21:41 +00:00
Bertrand Lallau
88a62cfecb Use assertIs(Not)None instead of assert(Not)Equal
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
2015-11-09 20:48:07 +01:00
OpenStack Proposal Bot
a4df43f165 Updated from global requirements
Change-Id: I8acfa5c791a58467336dc8e69d7fca954b040b19
2015-11-09 14:59:11 +00:00
Jenkins
7a34cdfe79 Merge "Update HACKING.rst to reflect real syntax checks" 2015-11-09 14:11:25 +00:00
Bertrand Lallau
76e1e02e15 Removes the use of mutables as default args
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
2015-11-09 09:42:32 +01:00
Jenkins
13fb653102 Merge "Fix log message formatting that cause log errors" 2015-11-07 23:05:52 +00:00
Jenkins
f2667ba613 Merge "Swap out pyOpenSSL for cryptography in LocalCertGenerator" 2015-11-07 21:53:42 +00:00
Bertrand Lallau
456a07f60a Update HACKING.rst to reflect real syntax checks
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
2015-11-07 21:37:33 +01:00
Brandon Logan
1b20470263 Fix log message formatting that cause log errors
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
2015-11-07 02:46:52 -06:00
Jenkins
8a755dbf73 Merge "Use oslo_config PortOpt type for port options" 2015-11-07 04:32:03 +00:00
Jenkins
0ce5b79a2d Merge "Set Hacking rules to check some tests assert" 2015-11-07 04:32:01 +00:00
Brandon Logan
e2453a0cc8 Consumer start log appears at appropriate time
Change-Id: I5034fd56140f0a9ce65edc1d0d9c860a6ad4da98
2015-11-06 21:38:40 -06:00
Jenkins
3906b9f394 Merge "chmod +x on local.sh to allow it to be executed by stack.sh" 2015-11-07 03:16:43 +00:00
Jenkins
8740bd3a66 Merge "Update Octavia’s Operator API Docs" 2015-11-06 23:12:45 +00:00
minwang
4d12d47752 Update Octavia’s Operator API Docs
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
2015-11-06 10:36:50 -08:00