264 Commits

Author SHA1 Message Date
David Ames
43e4f2124f Avoid shared-db change when using access-network
When the percona-cluster charm sets an access-network but the default
unit-get address is not on that network extra shared-db relations get
executed. This is specifically a problem when running upgrades and
trying to avoid API downtime.

The root cause is that the access-network is not checked until the
SharedDBContext is consulted. But then db_joined function will
change it back to the wrong ip on subsequent runs.

This change adds a check for access-network on the relation during
the db_joined function and pushes IP selection off to get_relation_ip.

Charm helpers sync to pull in changes to get_relation_ip.

Partial-bug: #1677647

Change-Id: I20f35dd7a12315ef61939feb5199680db128bc0b
2017-04-26 10:04:11 -07:00
Alex Kavanagh
750a3e2c13 Fix alphanumeric comparisons for openstack and ubuntu releases
- sync charmhelpers with fix-alpha helpers
- fix up code where the alpha comparisons are done
- fix tests which assumed mocks would just work on os_release()

Change-Id: I3d1a8993286f0e7a1037c03e6711015883f1b615
Related-Bug: #1659575
2017-03-28 17:30:14 +01:00
Dmitrii Shcherbakov
f3b655acdf add keystone middleware update logic
In order to support changes in the api-paste.ini file for the keystone
middleware of the neutron-api service by subordinates we need a generic
mechanism to pass wsgi middleware data via a relation.

The following approach is used in this change:

- relation data set by subordinates:
{'extra_middleware': [{
        'type': 'middleware_type',
        'name': 'middleware_name',
        'config': {
            'setting_1': 'value_1',
            'setting_2': 'value_2'}}]}
- there may be many subordinates each with their own set of middleware
all of which should be taken into account
- besides a factory method for middleware other settings can be
specified, therefore, a generic config dictionary is used
- neutron-server has to be restarted as api-paste.ini is read upon
startup of the service
- api-paste.ini rendering code is added along with a template code
containing loops over a list of middleware provided in a context to
construct the following entries:

keystone = [name-1 ... name-m] <default_middleware>

[type-1:name-1]
key-1 = value-1
...
key-n = value-n
...
[type-m:name-m]
key-1 = value-1
...
key-k = value-k

- api-paste.ini defaults are copied from their respective upstream
neutron branches

Change-Id: I9449aa2e85b1523f24acdcee11ca1f635dda47c0
2017-03-09 22:49:10 +03:00
Neil Jerram
b86b1aa35f Support for etcd on Xenial
Generate etcd config in form suitable for systemd init as well as for
upstart.

Change-Id: I78091d630e95d94e9b6effb077cce1fe63687474
2016-10-05 17:28:25 +01:00
James Page
d0ef637a46 Switch to using assess_status
neutron-api was still using the old approach to status assessment,
calling the os_set_workload_status function rather than the provided
assess_status function in neutron_api_utils.

Switch to using assess_status, which also correctly sets the
application version for the application.

Change-Id: I324f6e77bca96f2bb0aacc286050ee258dd09f77
2016-09-30 09:58:42 +01:00
James Page
69faf85da3 Re-license charm as Apache-2.0
All contributors to this charm have agreed to the switch
from GPL v3 to Apache 2.0; switch to Apache-2.0 license
as agreed so we can move forward with official project status.

Change-Id: Ie7859853644fb819f1cd3062a2fea86766de0afb
2016-07-03 17:47:52 +01:00
Jenkins
101fd703f5 Merge "Add SR-IOV device support" 2016-06-23 09:58:36 +00:00
David Ames
592b8e0947 DNS HA
Implement DNS high availability. Pass the correct information to
hacluster to register a DNS entry with MAAS 2.0 or greater rather
than using a virtual IP.

Charm-helpers sync to bring in DNS HA helpers

Change-Id: Ifb27cc96b913f4fe315119477691936919684b62
2016-06-23 09:21:03 +01:00
Timothy Kuhlman
0052948de1 Add SR-IOV device support
Add a new configuration option to enable SR-IOV support across Neutron and
Nova; this involves enabling the required mechanism driver, and informing
the nova-cloud-controller charm that SR-IOV has been enabled, so that Nova
can use the correct scheduler filters for PCI device management.

Change-Id: I8938c22c8f4dc27bb0816fd8e5e6154a1407e93f
2016-05-25 09:29:44 -06:00
sunny-verma
a0dddcdf03 Added vsd-cms-id as part of config option.
To cover the case when Nuage VSD & VSC are deployed outside of juju
framework.
Removed nuage-tarball from config file
Removed respective code form neutron_api_hook.py

Change-Id: I4518435ded9e1a4eb3d98cbb2e77f04b4f2dda61
Signed-off-by: sunny-verma <sunnyverma1992@gmail.com>
2016-05-05 15:03:49 -07:00
Liam Young
7b6e6e9b6e Do not run db migration on Icehouse
The neutron-server process performs the db migration on icehouse so
check the Openstack version before running it

Closes-Bug: 1571782
Change-Id: Ib9a57eea296a3116c69551c057f1cf9093ac93a8
2016-04-19 08:51:37 +00:00
James Page
c59e76217b Use network space binding for shared-db relation
To ensure that the charm presents the right IP address for
accessing the MySQL database over the shared-db relation,
ensure that any network space binding provided by the user
is preferred over the default of 'private-address'.

If network spaces is not supported (juju < 2.0), fallback to
using 'private-address'.

Change-Id: I8e70be47250c650e4b0135b0f2707f7eb1d46d1e
2016-04-12 14:50:54 +01:00
James Page
e1d5e7ef68 Full control of db migrations
Earlier versions of the nova-cloud-controller charm controlled
upgrades of the neutron databases; this has now been dropped
from the nova-cloud-controller charm.

Drop logic around conditional migration related to OpenStack
releases and always migrate the neutron database, so long as
the unit is the lead unit.

Change-Id: I944621203e8f4a2337151f2d406fe0f2c7d1a71f
2016-04-11 16:37:03 +01:00
Edward Hope-Morley
1ef99d852e Add hardening support
Add charmhelpers.contrib.hardening and calls to install,
config-changed, upgrade-charm and update-status hooks.
Also add new config option to allow one or more hardening
modules to be applied at runtime.

Change-Id: I46e1b43df3a5e59018f604ce1ae20bd62744a45b
2016-03-31 10:40:23 +01:00
Liam Young
9be47125b5 Add pause/resume actions and sync charm-helpers
Adds pause and resume unit to the charm such that the
charm stays paused during maintenance operations.

Partial-Bug: 1558642
Change-Id: Id5c44143f30305a3c412648cebb4c30caaa3e789
2016-03-20 14:25:47 +00:00
sunny.verma@nuagenetworks.net
0967ec59d3 Addresed David's comments 2016-02-26 18:23:35 -05:00
sunny.verma@nuagenetworks.net
8dd25c9aa0 Merged from lp:~openstack-charmers/charms/trusty/neutron-api/next 2016-02-24 17:35:54 -05:00
sunny.verma@nuagenetwork.net
a6b315e66f Removed lint errors and Added correct unit test 2016-02-19 21:27:40 -05:00
Sunny Verma
c8da373120 Merged to lp:~openstack-charmers/charms/trusty/neutron-api/next 2016-02-19 19:08:57 -05:00
Sunny Verma
ec48ad5f90 Added united test and added kilo/juno condition 2016-02-19 19:01:11 -05:00
Sunny Verma
edb5eb6f59 Added vsd-rest-api-relation-joined link file 2016-02-17 12:33:37 -05:00
Sunny Verma
2a3d65e097 added log statement 2016-02-16 18:43:47 -05:00
sunny.verma@nuagenetworks.net
8448b39f28 changed typo cmd to cms 2016-02-14 17:04:23 -05:00
sunny.verma@nuagenetworks.net
9f6cab60ab first draft for Nuage R4 2016-02-13 17:12:10 -05:00
Adam Gandelman
787b4d8155 Add back relation trigger mistakenly removed 2016-02-04 10:30:20 -08:00
Adam Gandelman
86f6174d5f Advertise API readiness to subordinates, allow subordinate specification of api_extensions
This advertises API readiness to subordinates via a new flag int the subordinate
relation. It determines readiness by the completion of required contexts. This
simply means the API service has enough of its topology completed to begin
servicing requests, and it has at least *started* the service (from the POV of
the init system). Its up to the subordinate service to ensure the API is
functional.

It also allows subordinates to specify custom api_extension_paths to neutron-api.
2016-02-03 11:17:14 -08:00
Antoni Segura Puimedon
cdb8db5e5e MidoNet support up until Liberty 2016-01-22 16:14:59 +01:00
Liam Young
ee569eef3c Rename catalogue entry published to keystone from quantum to neutron 2016-01-12 11:16:17 +00:00
James Page
aca69aa643 Ensure that apt_update calls are made with fatal=True to detect and source configuration problems. 2015-12-17 12:20:46 +00:00
Subbarayudu Mukkamala
428b5d1918 Merge from lp:~openstack-charmers/charms/trusty/.../next/ 2015-10-27 07:50:30 -07:00
David Ames
da8ff8d68f Run even on unknown hook 2015-10-07 20:46:09 +00:00
David Ames
88105d2e60 Run set_os_workload_status after every hook 2015-10-07 17:30:45 +00:00
James Page
e66e58938f Proposed fixes based on openstack-charmers review. 2015-10-07 06:25:23 -07:00
Liam Young
15a7d6be95 [thedac, r=gnuoy] Set workload-status in the neutron-api charm 2015-10-06 08:11:01 +01:00
David Ames
4a47cc9ad4 Pull in upstream 2015-09-28 12:06:04 -07:00
David Ames
4335a6c1b5 Track neutron-plugin-api 2015-09-28 11:58:28 -07:00
David Ames
40b1826b2a Use check_optional_relations 2015-09-25 16:12:12 -07:00
David Ames
c4585495f0 Action managed upgrade 2015-09-25 09:09:26 -07:00
James Page
b20790625a Fixup install hook execution 2015-09-22 14:00:18 +01:00
James Page
e00c8d1548 Split out install hook instead 2015-09-22 13:51:04 +01:00
James Page
a706ad98e8 Add wrapper for python detection and dependency install 2015-09-22 08:49:22 +01:00
David Ames
15bedef6f6 Renames and add ha check for vip settings 2015-09-11 16:32:34 -07:00
James Page
f87ad07e29 [project-calico,r=james-page] Add support for Calico plugin 2015-09-04 12:03:14 +01:00
James Page
9457427f4d Switch to using neutron-common for package version detection 2015-09-03 10:16:17 +01:00
Cory Benfield
8d5aa82328 synced /next 2015-08-21 08:33:43 +01:00
Subbarayudu Mukkamala
37802d3866 Merge from lp:~openstack-charmers/.../next 2015-08-20 06:45:36 -07:00
Liam Young
e78f7d5f7b Fix lint and remove pointless comment from template 2015-08-12 11:18:00 +01:00
Sunny Verma
4d69c50672 Added space to one of log statement 2015-08-06 16:12:28 -04:00
Sunny Verma
939da24063 Reshuffling the code with same logic for database-migration for juno 2015-08-06 12:56:09 -04:00
Subbarayudu Mukkamala
cc53b76d79 Code review changes to neutron-migration if vsp and juno 2015-08-06 08:48:58 -07:00