186 Commits

Author SHA1 Message Date
Liam Young
a42a2a8f3c Purge old packages on upgrade-charm
On charm upgrade the charm may switch to py3 packages. If so, ensure
the old py2 packages are purged. If the purge occurs then restart
services.

Change-Id: I2f5d95d9688c48e97fbb9b8b11a23d4b6250e016
Closes-Bug: 1803451
2018-11-15 13:13:59 +00:00
James Page
db89cb9293 py3: Don't purge python-six on upgrades
python-six is also used by crmsh in HA deployment so don't purge it
on OpenStack upgrade or we lose the ability to manage the corosync/
pacemaker cluster.

Change-Id: I67791cf6ef64aa461b9957c1d253d5aa7703f19e
2018-10-15 14:27:33 +01:00
James Page
49d377bfea py3: Switch to Python 3 for OpenStack Rocky
Switch neutron installation to use Python 3 for OpenStack Rocky.

Purge python- packages on upgrade.

Fix duplicate keystone entry in api-paste.ini for Rocky.

Change-Id: I9ead4d0b637f3067e0aa9a20604b2738221860df
2018-09-21 16:17:57 +02:00
David Ames
b9115f6c01 Fix ocata pike
A bug was introduced in change id
d86000271a0af1d40eed9d55f1663678992d07a8 which removed vpnaas package
at ocata.

This restores the vpnaas package for all but >= pike.

Change-Id: I97188c63062686960de2e13af8535df83968ec6c
2018-07-12 13:48:13 -07:00
David Ames
d86000271a Enable bgp dynamic routing for Ocata
Change-Id: I3bd3bc443d3007bceb80fafc6673d9c2a571975b
Needed-By: I00fd1d6098aee7f0e5287c8655dd9db843894a26
2018-07-10 11:51:24 -07:00
David Ames
96581bdc50 Enable neutron dynamic routing agent
Support the neutron dynamic routing agent. A subsequent charm,
neutron-dynamic-routing, will implement the agent. Neutron-api
needs to enable the plugin and install the correct packages.

Change-Id: I2c58bae47f672fe285b7fc59cd13636475d57ed2
2018-02-16 17:14:53 +00:00
Billy Olsen
5a1674c4dc Sync charm-helpers
Sync charm-helpers to pick up the updated InternalEndpointContext
which removes the need to provide a package.

This essentially reverts commit 575ae704 in favor of an alternative
approach to selecting volume catalog endpoint information.

Change-Id: I8b57c03738952bfcae8f1275a393c8b9ccc02333
Related-Bug: #1733566
2018-02-08 18:52:52 -07:00
James Page
7eac81a36e Remove deploy from source support
Drop support for deployment from Git repositories, as deprecated
in the 17.02 charm release.  This feature is unmaintained and has
no known users.

Change-Id: I44f00afeee8623713055310b025f1e91af18b86a
2018-01-10 15:41:05 +00:00
Zuul
7a61202a9d Merge "Designate - Neutron integration" 2017-12-21 18:43:39 +00:00
Tytus Kurek
95c045d1ce Designate - Neutron integration
This patchset implements new relation ("external-dns") using new
interface ("designate") between designate and neutron-api charms.
The following charm options have been added:

* "reverse-dns-lookup"
* "ipv4-ptr-zone-prefix-size"
* "ipv6-ptr-zone-prefix-size"

The patchset contains changes to various items (config files, hooks,
template files and unit tests).

When neutron-api is related to designate, the notification topic
previously used to send notification events to designate will be
disabled (as the DNS driver method is preferred).

Change-Id: I13b2ab39bd1daac13112398762f2be06022594b0
Closes-Bug: #1704769
2017-12-21 07:58:30 -08:00
James Page
11bb8503d1 Drop postgresql support
Remove postgresql DB support; This feature is untested as part
of the charms, is not in use and was deprecated as part of
the 1708 charms release.

Change-Id: I5ebd4af9da38c03ca9952b8eed02fe5783692445
2017-12-21 12:04:34 +00:00
James Page
66b643524e Drop zeromq support
Support for the ZeroMQ messaging driver has bit-rotted over
the last few years across the OpenStack charms; drop support
for ZMQ inline with deprecation notices issued in 17.02 charm
release.

Change-Id: Ia11cd42eab112aa6dc609a5c15353ba98f6ae3ea
2017-12-15 16:47:22 +00:00
Edward Hope-Morley
575ae704f8 Sync ch and update InternalEndpointContext
Change-Id: I2ef5cdf2d59fe5548c54825f9cd60b8c4d1fb555
Partial-Bug: 1733566
2017-12-08 10:21:23 +00:00
Zuul
59158c417f Merge "Update charm to use Python 3" 2017-11-16 21:15:04 +00:00
David Ames
1ee9f46543 Fix Ocata to Pike upgrade
When upgrading from Ocata to Pike the context was not recognizing
Pike until a subsequent hook run. Resetting os release fixes this.

Enable xenia-pike amulet test.

Closes-Bug: #1723981

Change-Id: I67ec257f0a91cf4108de54a2cd93ab0cc3663376
2017-11-14 10:12:01 -08:00
James Page
5f22e621c2 Update charm to use Python 3
Updates across the charm and unit tests to switch to
execution under Python 3.

Note that the changes are not backwards compatible
with Python 2.

Refactor use of neutronclient python module to simply
wrap the neutron binary, using the yaml output format
to avoid the requirement for a Python 3 module on
older OpenStack release versions.

Change-Id: Ic26b0dd19a76552481939325963a6c21585dee3c
2017-11-07 13:53:40 +11:00
David Ames
e6456473bf Fix src for determine_packages call during upgrade
On upgrade the charm was sending incorrect source information to
determine_packages. It was sending the os release name rather than
the openstack-origin.

Call with openstack-origin rather than os release name.

Change-Id: Ifff4581a3b02414dd10854be86ef02e9413b9191
Closes-Bug: #1715454
2017-09-06 11:05:18 -07:00
Edward Hope-Morley
2c21ad14ab Add db initialised detection
Currently whenever the shared-db hook fires we call
migrate_neutron_database() which will always (unless unit
is paused) do a migration and restart the neutron-server
service. This is unnecessary and disruptive so we avoid
doing this by first checking whether we have already
initialised and and skipping migrate and restart if we
have already initialised. We also add support to override
this logic if an upgrade is in progress.

Change-Id: Ia4c104ff21d10a0d24ac3038bb75a5a9dc67ca94
Closes-Bug: 1708459
2017-08-23 15:45:47 +01:00
James Page
4d48338c96 Update notification config >= mitaka
Use oslo_messaging_notifications for mitaka or later releases
including setting the transport_url to the value provided by
the AMQP context.

This removes use of deprecated configuration options for
ceilometer notifications.

This change includes some refactoring to allow the topics to
use for notifications to be configured specifically for this
charm; future changes can use this to enable/disable designate
notifications dynamically.

Also includes redux of services check for amulet tests to drop
all checks apart from those for the neutron-api units.

Change-Id: Ib66371c0c479e0b341055941842e43ac57d4151d
2017-08-08 12:48:34 +01:00
Frode Nordahl
353d4a97eb Add support for setting sriov_supported_pci_vendor_devs
This is required for SR-IOV to work on OpenStack versions
Kilo, Liberty and Mitaka (unless you are the lucky owner of
NICs with the default vendor/product IDs '15b3:1004', '8086:10ca').

The option is deprecated in Newton and the default behaviour
onwards is to not perform the check (unless configured) and not
overrule Nova's scheduling decision. (See LP #1611302)

Re-work mechanism_driver templating. Current implementation
treats mechanism drivers 'hyperv' and 'sriovnicswitch' as
mutually exclusive for simplicity. This prohibits us from
adding functional test for verifying sriov statements in
configuration files.

Due to how neutron init scripts are laid out on various Linux
distributions put the [ml2_sriov] section in ml2_conf.ini instead
of its default ml2_conf_sriov.ini location.

Add a placeholder ml2_conf_sriov.ini with comment to point users
in the right direction.

Change-Id: I37da1c430a06417ff7f1bc9df2d984137688bba0
Closes-Bug: #1630387
2017-08-02 09:45:35 +01:00
James Page
853a280f08 Updates for pike b1
Resync charmhelpers for pike support.

Add amulet tests for pike, but leave disabled for now.

Drop use of vpnaas for pike onwards as no milestones where
released and its not being actively maintained.

Change-Id: Ifce4cf80bee53422612e26114fa2fec684580103
2017-05-12 06:59:26 +02: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
Liam Young
8ec8b6a706 Enable Memcache service for Token Caching
With the release of 4.2.0 of keystonemiddleware using the
in-process token cache is no longer recommended. It is recommended
that a memcache backend to store tokens is used instead,

This installs and configures memcache and configures neutron-server
to use memcache for token caching.

http://docs.openstack.org/releasenotes/keystonemiddleware/mitaka.html#id2

Change-Id: Icacc9ae737fc5f86e12d0e96ac4fc565f7b8c04f
2016-12-08 11:21:59 +00:00
Neil Jerram
fcdf2df065 Use new Calico 1.4 PPA
Change-Id: Ia79f7521bc0d12493222df66975f41f50cd029b7
2016-10-05 17:20:24 +01:00
James Page
fa1451445c Add support for application version
Juju 2.0 provides support for display of the version of
an application deployed by a charm in juju status.

Insert the os_application_version_set function into the
existing assess_status function - this gets called after
all hook executions, and periodically after that, so any
changes in package versions due to normal system updates
will also be reflected in the status output.

This review also includes a resync of charm-helpers to
pickup hookenv and contrib.openstack support for this
feature.

Change-Id: I33cce8efc03f9217552234a8e03133d360ce95e3
2016-09-20 12:25:54 +01:00
Zhang Hua
c5609c54c6 Support to inject config-flags for neutron-api charm
This patch is just to enable adding custom options to
neutron.conf by the following command:

juju set neutron-api config-flags='key1=val1, ...'

Change-Id: I46bc32c250295a511508ced4cbca8f9748229415
Closes-Bug: #1585508
2016-07-21 16:27:17 +08:00
Jenkins
6ee476166b Merge "Added Hyper-V networking support" 2016-07-08 15:56:57 +00:00
Ionut Balutoiu
353ab6f9f8 Added Hyper-V networking support
This patch adds hyperv mechanism driver to ml2_conf.ini template
and the required python package to the list of packages to install.

Change-Id: If23f22aea53ba5549160f44442567d57b8077af6
2016-07-08 11:42:31 +03:00
Corey Bryant
731ca45e07 Add systemd init support for deploy from source
systemd is used instead of upstart by default since Ubuntu 15.10
(Wily).  This adds systemd init file support for nova services
that are deployed from source.

Change-Id: I45757fcd52426369b42916ad2195d2fe2f6a4c15
2016-07-07 10:58:51 +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
Corey Bryant
5251e366b4 Add defaults for openstack-origin-git config option
openstack-origin-git currently only supports YAML that specifies
the git repositories to deploy from.

This adds support for default openstack-origin-git values. The
default values supported are: icehouse, kilo, liberty, mitaka,
and master.  For example: openstack-origin-git=master.

Change-Id: I9e20d58b85d14b830e0394b8603ee018da86f004
2016-06-20 09:29:20 -04:00
Alex Kavanagh
638e06de08 Fix for multiple status-set - related to bug 1588462
This change fixes the obvious race for a status_set() between
check_optional_interfaces() and assess_status() as the later calls the former
which calls status_set(), returns the status, which is then potentially set
again by the assess_status() function.  This cleans up the code so that only a
single status_set() is performed when calling assess_status().

Change-Id: Ic5d0be6e1f7a2283e4dd0594c6465a99497dbbec
Related-Bug:#1588462
2016-06-16 10:35:37 +00:00
Liam Young
dd5bc11622 No db stamp for upgrade from Liberty
Stamping the Neutron db for Liberty fails and appears to be
unneccesary.

Change-Id: I93ff69db57bc3418a4c73e79e884f5c85d533f99
Closes-Bug: 1536675
2016-04-18 14:21:33 +00: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
1ecdb3ff7e Support using internal network for clients
Openstack mostly defaults to using public endpoints for
internal communication between services. This patch adds
a new option use-internal-endpoints which, if set to True,
will configure services to use internal endpoints where
possible.

Closes-Bug: 1456876
Change-Id: Ibff9d2ae7bf978525d4eccacb8f9a535b36d2056
2016-04-01 12:00:05 +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
Neil Jerram
892db0dbd7 Changes for Calico networking with OpenStack Liberty
- Stable PPA source for Liberty onwards
- New neutron.conf for Liberty without dhcp_agents_per_network = 1000
- Testing for PPA source

Change-Id: I6ebee0ac3704a56f31ffbd48206360a3f0ba267a
2016-03-04 16:21:18 +00: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
da212dac4f Added nuage-packages , a new config option to specify nuage-packges 2016-02-17 14:07:10 -05: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
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
David Ames
594fbe9b05 Lint fix 2015-12-03 14:43:30 -08:00
Subbarayudu Mukkamala
428b5d1918 Merge from lp:~openstack-charmers/charms/trusty/.../next/ 2015-10-27 07:50:30 -07:00
James Page
a4a1759924 Drop neutron-plugin-api from optional interfaces as its a provides, not a requires 2015-10-08 18:57:04 -07:00
James Page
e66e58938f Proposed fixes based on openstack-charmers review. 2015-10-07 06:25:23 -07:00
David Ames
a88fc69dc5 [thedac, trivial] s/message/messaging 2015-10-02 14:35:25 -07:00