1013 Commits

Author SHA1 Message Date
Miguel Angel Ajo
8db658b02b Make sure ~/.ssh/known_hosts exists before calling ssh-keygen -R
Our vagrant file makes use of ssh-keygen -R to remove any old key
related to an IP address from known_hosts.

But ssh-keygen fails and makes the local.sh exit with failure
(error 2) if the ~/.ssh/known_hosts file does not exist.

Change-Id: I404e79ca644c6c15f51a0f3db6695cc5a895b238
2016-05-23 11:55:29 +00:00
Miguel Angel Ajo
32f48f144c Use the local /vagrant dir for copying the config and support scripts
Vagrant rsyncs or mounts by default the directory containing the Vagrantfile
under /vagrant inside the instance.

With this change, it's possible to modify local scripts and redeploy,
eliminating the build dependency on the remote git server.

Change-Id: Ibb016a8c433644c18c033c66bd3a3cc9571af9f4
2016-05-23 11:55:23 +00:00
Kobi Samoray
2194758bcf Implement custom header support for Octavia
Implements support for custom header insertion in Octavia.
A listener may be configured to insert custom headers which are
supported by Octavia. Currently implemented support for
X-Forwarded-For header, and X-Forwarded-Port

Change-Id: I784f4939225c3acef362fcb5df57e77dbfb0f774
2016-05-23 08:34:16 +03:00
Jenkins
f629671974 Merge "Support db-manage command for db migration" 2016-05-22 08:19:21 +00:00
Jenkins
0303836ecf Merge "Whitespace bug in sysvinit jinja template" 2016-05-22 08:15:14 +00:00
ZhiQiang Fan
632ab41a03 [Trivial] Remove unnecessary executable privilege
They are modules, should be imported rather than running in shell,
hence not require for executable privilege.

Change-Id: I869d73411ec8e308a80d780e10e77dcc48097d42
2016-05-21 13:17:04 +00:00
Jenkins
ff059e03f3 Merge "Add WSGI support for octavia api" 2016-05-19 22:05:09 +00:00
Jenkins
749261786c Merge "Wait for loadbalancer to be ready instead of sleeping" 2016-05-19 18:13:47 +00:00
Miguel Angel Ajo
ad166aa2b1 Wait for loadbalancer to be ready instead of sleeping
This makes the creation of resources in the sample Vagrant
configuration less dependent on the host resources or hypervisor
execution time.

Before this, the local.sh was randomnly failing at any of it's steps
in my environment.

Change-Id: Ie3795a1f9244b46f5b6469107ad1d03f087a64ed
2016-05-19 11:44:21 -04:00
Adam Harwell
786d50b6ed Fix keystone auth url in devstack plugin
Currently the keystone auth uri will be set like:
auth_uri = http://127.0.0.1:35357/v3/v2.0
Obviously this is incorrect. Attempting to fix this somewhat sanely.

Change-Id: If443d9625cb9155a378a674aff07ba663b508446
Closes-Bug: #1582879
2016-05-18 19:19:51 +00:00
Lingxian Kong
2e379269fb Add WSGI support for octavia api
Make the octavia.api.app module work with web servers running on WSGI.

Take uwsgi for an example:
uwsgi --socket /tmp/octavia.sock \
      --pythonpath /home/devstack/octavia/octavia/api \
      --module "app:setup_app()" \
      --pidfile /tmp/octavia.pid --vacuum \
      --daemonize /var/log/octavia/octavia.log

Change-Id: I3282da1191965e8d83c8bf74ef1a1285673a6987
2016-05-18 09:17:16 +12:00
OpenStack Proposal Bot
afad2484d8 Updated from global requirements
Change-Id: I47cfc76e459c65d425dd243ed2601fd6e9201ee5
2016-05-17 14:08:08 +00:00
OpenStack Proposal Bot
1efa2f6435 Updated from global requirements
Change-Id: I8fbb0441304066d8eaf8d96ccb3a1b9f3025ac34
2016-05-16 16:00:31 +00:00
Matt Alline
2f33429db9 Added amphora_id to listener_statistics table to stop data loss
This is a fix for the bug listed below. Adding the amphora id
to the table allows multiple amphora to send statistics via
the heartbeat without each heartbeat overwriting other
heartbeats for the same listener / different amphora.

Change-Id: I9f50a5de2c1b0665e62d45fcc5815f2b4093b2df
Closes-Bug: 1573607
2016-05-13 21:17:29 +00:00
ptoohill1
74ce8e52f4 Whitespace bug in sysvinit jinja template
Whitespace at top of file causes issues.

Change-Id: I5c7d418051551fdb44b54568e26d9edda6e201e5
Closes-Bug: #1580430
2016-05-13 19:47:11 +00:00
ptoohill1
93983ad04c Taskflow update exposed inconsistencies in tasks
The new taskflow exposed areas we forgot to update
the revert method with the correct object data.

Taskflow now validates the revert data which exposed
those inconsistencies in the project

Change-Id: I319d59b345aab07784ae4dba19e0ffb7fbba0b04
Closes-Bug: #1581615
2016-05-13 12:18:12 -05:00
Fei Long Wang
9f6c6d058b Support db-manage command for db migration
blueprint: octavia-db-manage

Change-Id: Ib1c8f47b6af4dd5d86acff68bc56ab660241458a
2016-05-11 09:57:48 +12:00
OpenStack Proposal Bot
3d5c097aa9 Updated from global requirements
Change-Id: Id2bf5e7374e4c65412451f4e83ef243211ffa3c7
2016-05-10 00:48:14 +00:00
Jenkins
ffe2e4fbb5 Merge "Fixed duplicate constants declarations" 2016-05-10 00:14:07 +00:00
OpenStack Proposal Bot
d5cf8b9af8 Updated from global requirements
Change-Id: I8a95bf200c8f05b32257c89834cb1fd52fb1306e
2016-05-06 22:21:14 +00:00
Valeria Perelman
c3b8e2dad8 Fixed duplicate constants declarations
Change-Id: Ia8cd956f1e7acbd0c873e314688466bf77ccede1
Closes-Bug: 1578652
2016-05-05 17:25:46 +03:00
Lingxian Kong
6f94a41e06 Attach port to amphora when adding member to shared pool
When adding member to shared pool of load balancer(in spite of this
load balancer has listeners or not), it should plug the member port
into the amphorae if it isn't already plugged.

Change-Id: Ibe4c05fcb8a416caf931e55ab2233220b80613cb
Closes-Bug: #1572342
2016-05-04 15:00:36 +12:00
OpenStack Proposal Bot
e2d815f2ee Updated from global requirements
Change-Id: I06519437a58bab4f66d6559c7e52d8f413326e86
2016-04-28 16:15:39 +00:00
ptoohill1
6c000c2069 Amphora fails to build
Bug in devstack plugin caused network option to be corrupted
causing failures during amphora build.

Change-Id: I9585f22e3bb3a53ae70a5ddb8b76a3a930b10b73
Closes-Bug: #1574784
2016-04-25 13:42:25 -05:00
Jenkins
81fc37c2fe Merge "Update amp_network to allow multiple networks" 2016-04-21 22:19:45 +00:00
Jenkins
0e3928ddc8 Merge "Defer updating role and vrrp_priority for failover" 2016-04-21 22:07:44 +00:00
Jenkins
4edd18b2ca Merge "Updated from global requirements" 2016-04-21 21:13:20 +00:00
OpenStack Proposal Bot
0ab1e25808 Updated from global requirements
Change-Id: I414e6b7f2ee68c194b1b6c6e0018d54cfc3a0d59
2016-04-19 12:27:34 +00:00
Michael Johnson
b89abe1871 Run amphora haproxy in a network namespace
In the current Octavia there is the possibility of an address
space conflict between the Octavia load balancer management
network and a tenant network.
This patch puts the haproxy processes inside the amphora into
a network namespace to provide isolation from the load balancer
management network.

A new file /var/lib/octavia/plugged_interfaces is created and
interfaces are writted to it on every plugVIP or plugNetwork call.
Interfaces in this file are created under the network namespace.

Change-Id: I75472885fe45226a5315867369eaef9b001a112b
Co-Authored-By: Bharath M <bharath.stacker@gmail.com>
Closes-Bug: #1458920
2016-04-16 00:24:16 +00:00
ptoohill1
4230e00a2c Update amp_network to allow multiple networks
Currently the amp_network is a stringOpt and in code it
translates that to a list for processing. It may
be required to deploy with multiple networks,
a listOpt for amp_network option allows this.

Change-Id: I4364c1d03d4c7b560f0d8030b7d66412583a31ae
2016-04-14 14:29:29 -05:00
Jenkins
5d5dcf9951 Merge "Replace mock open with namespace builtins with OpenFixture" 2016-04-14 19:11:44 +00:00
Jenkins
cf97283c1c Merge "Replace the os.open method with safer way" 2016-04-14 19:11:14 +00:00
OpenStack Proposal Bot
a3361b4b61 Updated from global requirements
Change-Id: Ic9b3f1689f056dc589a610fb18668a5018c506cd
2016-04-14 11:27:36 +00:00
Jenkins
ae836cfa60 Merge "TLS/SNI Listener creation fails when using intermiate certificates" 2016-04-14 09:05:28 +00:00
Jenkins
042e1b510f Merge "Add missing unit test for cascade lb delete" 2016-04-14 08:55:24 +00:00
Lingxian Kong
747d45f66b Defer updating role and vrrp_priority for failover
During failover process, the new amphorae db info will be populated by
the old one, including 'role' and 'vrrp_priority', which both will be
updated again after plug_network. What's more, 'role' will be an
appropriate flag for failover monitoring tool to decide whether or not
the failover process is almost finished.

Change-Id: I9602b92b36ef265f8ae7c9171170cd86353b2944
2016-04-14 13:31:00 +12:00
minwang
4dc6f3ef73 Add missing unit test for cascade lb delete
This is a missing unit test for cascade lb delete.

Change-Id: I8544994f096e0229dd2ad3768dcba5224976ecaa
Closes-Bug: #1551444
2016-04-07 13:19:56 -07:00
Aishwarya Thangappa
d63f3ce629 TLS/SNI Listener creation fails when using intermiate certificates
Because the intermediate certificates are misplaced(they are not expected
to be at the top of the pem file), there is issue in haproxy config file
generation and hence the listener creation fails. This patch fixes the
ordering issue.

Change-Id: I1e7c3c1579d410ded77962e03b1ac8778b0e5d72
Closes-Bug: 1567031
2016-04-06 12:50:15 -07:00
OpenStack Proposal Bot
a0fd4c23ac Updated from global requirements
Change-Id: Iab0a4484c32f3fe078f0cf1a739560270d7166fa
2016-04-06 04:29:20 +00:00
OpenStack Proposal Bot
aea742048a Updated from global requirements
Change-Id: I87bfd6deb1eaea9c0b56defa1dd8e5241b7fc952
2016-04-02 16:15:51 +00:00
minwang
66b1f2bf11 Replace mock open with namespace builtins with OpenFixture
Replace those unit tests using mock_open with builtins namespace  with OpenFixture

Change-Id: Ie635928a6512c2fa647d4ed965fee5976d5e30d2
Closes-Bug: #1522981
2016-03-31 16:16:30 -07:00
minwang
bd04981021 Replace the os.open method with safer way
Write files using a safer open for writing operations[1].
Modifided the file permission from 666 to 644 in base.j2 to make sure
consistenacy between docs and real file permission.
Edited unit tests based on the new method.

[1] https://security.openstack.org/guidelines/
            dg_apply-restrictive-file-permissions.html

Closes-Bug: #1548552
Change-Id: If3f315005fcd22afc2f24da527da08175e230bb1
2016-03-31 15:08:40 -07:00
minwang
c358e1b99b Remove the default anchor usrename and password value
Remove anchor's default value for username and  password
for the sake of a security perspective.

Closes-Bug: #1548555

Change-Id: I14f1b84f5161308fc23ef3776a796636ba61154d
2016-03-30 15:16:12 -07:00
Jenkins
2ac777aadc Merge "Fixes the SNI issues in master(mitaka) for octavia" 2016-03-29 15:15:49 +00:00
Jenkins
75dcc6176b Merge "Removes port_detach code that was mistakenly added" 2016-03-29 15:15:33 +00:00
Jenkins
76df01b5a1 Merge "Add neutron-lbaas-dashboard to local.conf sample" 2016-03-26 08:17:23 +00:00
Michael Johnson
8af5ca5caf Removes port_detach code that was mistakenly added
A previous patch [1] mistakenly added a port detach call to the failover
flow.  It didn't cause failures due to a type-o in the arguments to the
call, so it would passively fail with a log entry.  However, if someone
fixed this it would cause failover to fail due to the port getting
deleted during the detach.
This patch removes that code.

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

Change-Id: I1eb1ad551636d5cd9253690a59e0e88ca1d238b5
2016-03-25 13:21:24 +00:00
Jenkins
a08a7069da Merge "Adds documentation for the Octavia configuration" 2016-03-25 01:25:58 +00:00
Aishwarya Thangappa
298fd45380 Fixes the SNI issues in master(mitaka) for octavia
1. Fixes the mismatch between the tls_container_id lengths in neutron.lbaas_sni
and octavia.sni tables.
2. Fixes the syntax error in cert_parser.py field. (tls_container.id => tls_container_id)
3. Removes the certs['sni_certs'] parameter from the rest_api_driver.py as it gets wrongly
assigned to socket_path parameter in the jinja_cfg.py file.
4. Modifies the sample_configs to make the unit tests work with the above changes.

Change-Id: I8fe5854ef2dc508e37a368294c44eef63b5bccba
Closes-Bug: #1520990
2016-03-23 19:31:10 -07:00
Jenkins
2cd234a0f1 Merge "Make GIT_REPO can be configured" 2016-03-23 17:49:08 +00:00