575 Commits

Author SHA1 Message Date
Stephen Balukoff
2564f40e79 Case-sensitive string checking for Enum fields
This patch introduces stricter checking on fields that are in
lookup tables, but are effectively Enum fields. Because we do a
lot of case-sensitive string comparisons against these fields in
various places throughout the code tree, but because SQL does not
to case-sensitive comparisons by default, it's important that we
are case-sensitive in the API for these fields.

Change-Id: Ib23796754ca54f69bb60c79c75804a5e7ee26e29
Closes-Bug:1534217
2016-01-14 08:34:01 -08:00
Jenkins
f941cbbfff Merge "Add debug testenv in tox" 2016-01-13 20:01:44 +00:00
Jenkins
0f9f877006 Merge "Fix sysctl settings for amphora image" 2016-01-13 19:27:28 +00:00
caoyue
90dc020297 Add debug testenv in tox
Once we add debug testenv, we can use "tox -e debug -- --debug"
to debug test cases when tox is running.

Change-Id: Ic0635f2b99c166c77757277e8273f42cdb17ce73
2016-01-13 14:04:13 +08:00
Jenkins
96cc647a96 Merge "Fixed revert of update LB" 2016-01-13 05:44:50 +00:00
Jenkins
9b4f651ab7 Merge "Move docstrings to the first line of the function definition" 2016-01-13 04:47:26 +00:00
Jenkins
8a9ec92fb5 Merge "Remove OpenSSL from cert_parser" 2016-01-12 22:17:25 +00:00
dean
39aa0f834d Fixed revert of update LB
was reverting listeneter instead of lb

Closes-Bug: 1533358
Change-Id: I600bbaa600e8f9400648242e2e1bea9a3ae841ba
2016-01-12 22:46:15 +02:00
Jenkins
ff358d4d2d Merge "Setup health manager networking for devstack" 2016-01-12 16:31:28 +00:00
ptoohill1
436ae33abc Remove OpenSSL from cert_parser
Utilize cryptography package instead of OpenSSL in the cert_parser

Change-Id: I7e07138c265fd75efea0f20cd6b32819e7bd1baf
Close-Bug: 1532347
2016-01-10 23:35:10 -06:00
Jenkins
7ee8cc6076 Merge "Replace deprecated library function os.popen() with subprocess" 2016-01-10 00:07:15 +00:00
LiuNanke
fc5f1d3c03 Replace deprecated library function os.popen() with subprocess
os.popen() is deprecated since version 2.6. Resolved with use of
subprocess module.
Closes-bug: #1529836

Change-Id: Ibdb8f13462e8416097006e19eb2214425364910e
2016-01-09 20:07:04 +00:00
Peng Zhi Xiong
7e2b178283 Fix some inconsistency in docstrings
Added colon after ":param" according to:
http://docs.openstack.org/developer/hacking

Change-Id: Ie8d6a12ae8cdcbafdd30e619aaffc2e6c8aacc7f
2016-01-09 07:53:48 +00:00
Brandon Logan
8e24232371 Setup health manager networking for devstack
When running the health manager on single host devstack machine, the
hosts IP cannot simply be used as if the health manager is running
on a host by itself.  The solution here is to create a neutron port
on the lb-mgmt-net which sets up necessary ovs ports and also
reserves an IP.  Then the script creates an ovs port for and sets
and interface with the information the neutron port create allocated.

There are some flaws with this but its a starting point and can and
probably will be improved on in the future.  However it works for
now.

Change-Id: Ic3d3d1d63a5cc352c5fc00dea58bb16915754a7c
Closes-Bug: #1490033
2016-01-09 00:22:54 -06:00
OpenStack Proposal Bot
cc7189d3f6 Updated from global requirements
Change-Id: I53184516d46d6cb7ad9eb421e712773e1cd7144d
2016-01-09 05:57:51 +00:00
Stephen Balukoff
e035cc0f28 Fix minor inconsistency in models code
We have an IdMixin. All the other objects with an ID here use it.
No point in inconsistently defining 'id' with the Amphora model.

Change-Id: I7758c08536e13d3ef653a604bcc74e1896c7d143
2016-01-08 15:49:29 -08:00
Peng Zhi Xiong
e0dff5a6e4 Move docstrings to the first line of the function definition
according to http://docs.openstack.org/developer/hacking/

Change-Id: Icd8755e79b400c9b2b567386bba5f29b3f39a244
2016-01-08 02:13:18 -08:00
Jenkins
af2959c1f4 Merge "Optimize Taskflow storage (remove some requires parameter)" 2016-01-06 23:59:09 +00:00
Jenkins
05ab31ded9 Merge "Add nopreempt support for active/standby" 2016-01-06 06:22:07 +00:00
Jenkins
5a49297c2c Merge "Use keystoneauth to prevent logging sensitive data" 2016-01-06 01:39:29 +00:00
Jenkins
040e29985d Merge "Test: make enforce_type=True in CONF.set_override" 2016-01-06 00:32:13 +00:00
Jenkins
6a1eb316e5 Merge "Make Consumer an oslo_service" 2016-01-05 23:49:14 +00:00
LiuNanke
835566ef69 Test: make enforce_type=True in CONF.set_override
Each config option has limitation for type and value.
In production code, oslo.conf can ensure user's input
is valid, but in unit test, test methods can pass if
we use method CONF.set_override without parameter
enforce_type=True even we pass wrong type or wrong
value to config option. This commit makes sure calling
method CONF.set_override with enforce_type=True.

Change-Id: I1e4f2aa5797ba8582a5637cd86c6b2b626daa923
Closes-Bug: #1517839
2016-01-06 01:59:39 +08:00
OpenStack Proposal Bot
a6ccda6f68 Updated from global requirements
Change-Id: Icc2a52c53e2d0bcf6c043a18d959b0a33a01bbaf
2016-01-01 20:31:41 +00:00
Jenkins
7a8143234a Merge "Database repository delete to use one()" 2015-12-21 04:20:17 +00:00
Brandon Logan
4a6e5a3f21 Make Consumer an oslo_service
This makes more sense and also suppresses the error messages when
launching the service returned from oslo_messaing.get_rpc_server
service.  Instead of that service wait() being called, the Consumer's
wait will be called.

Change-Id: I63816e92fbe26a4213946e6ab584531bdc3b7dd2
Closes-Bug: #1527418
2015-12-20 13:22:01 -06:00
Michael Johnson
cd5a50adb3 Fixes gate failure 'update_stats' called 0 times
There were some bad unit tests that would fail depending on the test
order.  This would intermittently cause gate failures.
This patch corrects those unit tests.
Closes-Bug: #1526942

Change-Id: Id80a0a1a71a8248e5709f7df8c9af6a93a412f93
2015-12-18 20:06:23 +00:00
Michael Johnson
12b1e57561 Fix sysctl settings for amphora image
This patch fixes two things:
1. The sysctl settings were failing because some conntrack modules
were not loaded anymore.
2. I fixed the sysctl-set-value scripts to be able to handle
multi-value settings, such as tcp_rmem, in tripleo-image-elements[1].
Here I have removed the workaround we had in Octavia.

[1] https://review.openstack.org/#/c/134616/

Change-Id: Ib7ab4f487c1b792b70a110098bf7a28cb565ee55
Closes-Bug: #1527392
2015-12-18 01:01:19 +00:00
Adam Harwell
f340cdceda Use keystoneauth to prevent logging sensitive data
Change-Id: Ifa5256175a9d5ba2ca07a8a7846cb98e5f1b9898
2015-12-16 14:35:28 -08:00
OpenStack Proposal Bot
ea4018b51f Updated from global requirements
Change-Id: I5165b092651185aa3137c0dd6def2d1b0c197295
2015-12-15 21:28:07 +00:00
Michael Johnson
230c9b85fb Database repository delete to use one()
Updates the db repository "delete" to use one() instead
of first()


Change-Id: Idb29fab6dbfdb1c69628a19962b3a4103dd5c48c
2015-12-15 17:58:34 +00:00
OpenStack Proposal Bot
b5a374b26b Updated from global requirements
Change-Id: If02bd5249c7f615d8df9a8d8ed628c2e400f336a
2015-12-11 22:52:16 +00:00
Jenkins
06f46b7cec Merge "Rename tenant_id in the network models to project_id" 2015-12-10 19:50:30 +00:00
Jenkins
97be0b2477 Merge "Expose project_id in octavia api" 2015-12-10 18:27:34 +00:00
James Arendt
ce21995319 Make Octavia devstack pass env settings to sudo pip install
Current code to install diskimage-builder requirements in
devstack does not pass on enviroment settings to sudo, which can
cause the pip install to fail behind a proxy.

This happens when the user has http_proxy/https_proxy values set
but not for root.  The stack.sh runs and installs for a while,
before failing on the Octavia diskimage-builder.

Change-Id: I196aca7004ea0eed713877e54ba10dcfe1d343e7
Closes-Bug: #1526108
2015-12-10 07:40:16 -08:00
OpenStack Proposal Bot
178a07db9f Updated from global requirements
Change-Id: Ia523937b1d39568841d76a4dd489ab2e59a24f2f
2015-12-10 12:45:20 +00:00
Jenkins
a3b251d72b Merge "Refactor BarbicanAuth to allow for configurable auth method" 2015-12-10 06:47:20 +00:00
Jenkins
5e44f2f1b9 Merge "Allow choice of upstart or sysvinit" 2015-12-09 17:58:17 +00:00
Brandon Logan
1d0b76efa1 Expose project_id in octavia api
The project_id (formerly tenant_id) was not actually allowed as an
attribute of any entity on create nor would it be returned as details
of an entity.  project_id will be used in the future and is just
overall good to have.

This also accepts request headers to set the project_id if they are passed in
and no tenant_id is provided in the body.

Change-Id: I6408b7863409870b502de03af35692b065b2c6dc
2015-12-08 18:01:27 -06:00
Brandon Logan
e260341783 Rename tenant_id in the network models to project_id
This was meant to be done in a prior review but the author of that review (me)
was not thinking clearly when he did not include them as part of that rename.

Change-Id: Ibae52777921adcfa3e6835274d61670b4091ca39
2015-12-08 17:58:23 -06:00
OpenStack Proposal Bot
4167d8b967 Updated from global requirements
Change-Id: Ife281efbb10b30c8e6ff35560e29092318e52f53
2015-12-08 21:35:33 +00:00
Jenkins
e79ee9d279 Merge "Rename tenant_id to project_id" 2015-12-08 21:25:53 +00:00
Bertrand Lallau
608d0a317c Optimize Taskflow storage (remove some requires parameter)
flows have been optimized to limit the amount of data being stored.
* member object is stored in flow, hence member_id can easily be retrieved
* same with vip and load_balancer

Change-Id: I85c1f55dc7faa412dcb649bd09a845c674ea853c
Closes-Bug: #1461686
2015-12-08 22:00:54 +01:00
Adam Harwell
52351a5698 Refactor BarbicanAuth to allow for configurable auth method
There is now a new configuration option "barbican_auth" in the
certificates section, to specify which auth plugin to use when
communicating with Barbican. This is because the default option (using
ACLs inside Barbican to control access) should be ok as a default
workflow, but it might be required to use other methods depending on
your deployment. For example, another possible auth method would be
BarbicanTrustAuth, utilizing Keystone Trusts.

Some deployers may need custom auth methods that do not exist in
upstream Keystone, and will need their own Auth plugin. This should be in line
with the way Octavia's network and compute drivers work already.

While we're in this file, prune the unused (and really bad) method that
would *actually* delete certs from Barbican (not in our scope).
Also do the tenant_id -> project_id rename.

Change-Id: Ic9aef68924bb5c216734afd25403e59476c576e7
2015-12-08 14:56:32 -06:00
ptoohill1
8e31a1d044 Allow choice of upstart or sysvinit
upstart was hardcoded as the means of start, stopping and reloading
of haproxy. Allow for sysvinit scripts and paths to handle haproxy.

This patch provides a configuration option to switch
between the defaultl upstart init scripts or sysvinit.

Change-Id: I9efe51c5a08d8e2268150d69ac25725c708dfb8e
2015-12-08 00:06:45 -06:00
Jenkins
d2ee56469a Merge "Add missing unit tests for cw/tasks/network_tasks" 2015-12-08 02:06:23 +00:00
Brandon Logan
969f811bd4 Rename tenant_id to project_id
Since openstack is going through renaming tenants to projects
it is best that we do this now while its easier before it becomes
bigger and harder to do.

This also adds project_id to the health_monitor table and models
since this seemed like an oversight.

Change-Id: Icc8034dcb517a3f8d218d83c94e4a2dcc977cc29
2015-12-07 15:39:55 -06:00
Kenji Yasui
4c9e5aa224 Fix db error when running python34 Unit tests
If tests for py27 is executed before py34 tests, then
there is a chance that py34 related tests may fail.
The following patch fixes it.

Ref: https://review.openstack.org/#/q/status:merged++topic:bug/1489059,n,z

TrivialFix

Change-Id: I99dd7a67829bbf9115e011373ce43d8e893e5c66
Closes-bug: #1489059
2015-12-07 04:16:26 +00:00
Bertrand Lallau
d80256eb43 Add missing unit tests for cw/tasks/network_tasks
Change-Id: If759f49fc30a655b9e1daf253577b605f964be27
2015-12-06 22:35:14 +01:00
Michael Johnson
13dec23c08 Add nopreempt support for active/standby
This patch enables nopreempt for active/standby topology amphora.
This reduces the need to migrate the IP between the active and standby
amphora.  This is important for amphora that are using TLS offload.

When a MASTER amphora fails over to a BACKUP amphora the IP address
migrates to the BACKUP which becomes the new MASTER.
With this patch, should the original MASTER come back up, the IP will not
migrate back to the original MASTER until the BACKUP fails.
Current behavior is when the original MASTER comes back up the IP
will migrate back to it.

Change-Id: Ib9f5ecd92f37299c7ae5cbb607f4f9df9106409f
2015-12-06 02:15:49 +00:00