96 Commits

Author SHA1 Message Date
James Page
c103450dbb 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: I20448e0370138e103a00c7fcf0f49949c82d33a9
2016-07-03 16:38:27 +00:00
James Page
928644532b Restart neutron-gateway services on amqp complete
The nova-api-metadata service which runs in the neutron-gateway
charm units will shutdown if it does not receive a response from
a nova-conductor within a short timeout period; this can happen
if the nova-conductor is not yet wired to the messaging bus.

Trigger a remote restart using the existing relation api when
the amqp relation is complete, and nova-conductor services should
be (shortly) up and running.

Change-Id: I47d242a6e4a11d30400b9b787ace752a472b2d1e
Closes-Bug: 1547122
2016-06-28 16:48:01 +01:00
David Ames
eba53c3d55 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: I073770d3900b4948c4cceb440f90407128558c8f
2016-06-23 09:19:06 +01:00
James Page
4c68802ade Trigger restarts for nova-api-metadata
The neutron-gateway charm operates a nova-api-metadata service
for instance access to Nova metadata; this needs to be restarted
after a database initialization as if the conductors are not
responding, this service will shut itself down.

Set a remote_restart nonce on the quantum-network-service
relation post database migration to trigger remote restarts.

Change-Id: I469d4119dd95cc51378d7ca2e3ef736d94c12226
Closes-Bug: 1547122
2016-04-14 09:28:36 +01:00
James Page
547bc88a70 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: If91dd8e9a4f47c5455095532ed27433eaf0d47d4
2016-04-12 15:12:03 +01:00
James Page
c2bc02e3ab Drop support for Neutron functionality
Neutron functionality was deprecated last release; remove
direct support for managing the neutron-server process and
associated plugin support from this charm.

All neutron-server support is now provided by the neutron-api
charm.

Change-Id: Iec7bd5ec6d835b573a15f8163fa5f78842bd672b
2016-04-08 11:46:52 +01:00
Edward Hope-Morley
4b98e30307 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: Icf48829e010d35d7d7a4ccd547eae6a8c511c04e
2016-03-31 19:30:33 +01:00
James Page
6e8dcf8af8 Drop support for OpenStack releases < Icehouse
Rollup all old configuration file templates, remove any related
to Quantum which was renamed in the Havana release.

Drop references in code to Quantum, refactor unit tests to baseline
on Icehouse rather than anything older.

Drop relation and associated references to nova-volume service;
deprecated in Folsom and removed in Havana.

Drop ml2 migration - this was required when migrating to Icehouse
from older releases.

Change-Id: I6f5d641ffef2599d0dfc8e16a2dce3cc7be88bd4
2016-03-23 12:40:37 +00:00
James Page
90f376453b Add nova-api database setup for Mitaka
Mitaka requires the use of a separate nova-api database;
ensure that this is setup on the shared-db relation and add
a new [api_database] section to the mitaka nova.conf file.

Add a new NovaAPISharedDBContext wrapper to prefix the key
names for the nova-api database with 'nova_api_' so that we
can present two database connections to the same configuration
file.

Ensure that 'nova-manage api_db sync' is called for database
setup for >= mitaka release.

For upgrades, ensure that the database migration and service
start is deferred until the nova_api database has been
setup by the related mysql service.

Closes-Bug: #1556896

Change-Id: If1c9a037b1e0745a486a57fddf885e26aa7e313d
2016-03-18 12:28:57 +00:00
Liam Young
e394d07e66 [gandelman-a, r=gnuoy]
Advertise Nova API readiness

    Adds a new relation 'nova-api' that can be used by services that consume
    the nova api in some way or another. We use it to simply pass a flag to
    remote services that states whether the API service is ready to be used,
    based on the complete context of required interfaces.
2016-02-22 12:03:52 +00:00
billy.olsen@canonical.com
8808bf9302 Update code with feedback from code review:
1. Rebase
2. Update the new mitaka/nova.conf template
3. Add related_unit call to get the units
2016-02-17 10:24:59 -07:00
billy.olsen@canonical.com
19df3b6430 [billy-olsen,r=] Add region information to the conf files, relations.
This change adds the appropriate region information to the conf files
and to the cloud-compute relations in order to ensure that the region
can be configured on all nova components.

Closes-Bug: #1468306
2016-02-12 10:38:21 -07:00
Adam Gandelman
962790239b Advertise Nova API readiness
Adds a new relation 'nova-api' that can be used by services that consume
the nova api in some way or another. We use it to simply pass a flag to
remote services that states whether the API service is ready to be used,
based on the complete context of required interfaces.
2016-02-03 11:38:43 -08:00
Edward Hope-Morley
8c875c4009 [hopem,r=]
Fix upgrade breakage whereby if upgrading from
version of charm that did not support
dbsync_state peer setting db ops get stuck
waiting infinitely for db to be intialised.

Closes-Bug: 1519035
2016-01-08 12:30:31 +00:00
Liam Young
8e85f1e272 Add workload status 2015-10-07 09:32:28 +00:00
James Page
7fae6a199c [thedac,r=james-page] Add support for action managed openstack upgrades.
Also fix misc assert_called problems in unit tests.
2015-09-24 17:29:26 +01:00
Hui Xiang
d61aa28daf Fix comments. 2015-07-22 20:01:24 +08:00
Hui Xiang
7267a2c30e Fix more 2015-07-22 13:33:03 +08:00
Edward Hope-Morley
c49974a91a [hopem,r=]
Ensure packages not upgraded unexpectedly.

Closes-Bug: 1464605
2015-06-12 14:03:50 +01:00
Corey Bryant
bbc2c71f51 Merge next branch 2015-06-11 09:33:42 -04:00
Corey Bryant
7a8f72a24c [billy-olsen,r=corey.bryant] Provide support for user-specified public endpoint hostname. 2015-06-10 16:32:48 -04:00
Corey Bryant
35d00163cf Update failing unit test 2015-06-10 15:50:47 +00:00
Corey Bryant
f2a4cdf056 Merge next branch 2015-06-10 15:48:34 +00:00
Billy Olsen
6ff07fd12c Fix unit tests broken with c-h sync 2015-06-04 16:33:12 -07:00
Billy Olsen
62e829a41b Merge with /next 2015-06-04 16:29:38 -07:00
Liam Young
d4b768f673 Resync le charm helpers 2015-06-04 09:45:01 +01:00
Billy Olsen
fd1face940 Switch config option to os-public-hostname 2015-06-03 11:27:55 -07:00
Billy Olsen
69d3ccd795 [wolsen,r=] Add support for overriding public endpoint addresses.
Adds in the config option for overriding public endpoint addresses
and introduces a unit tests to ensure that the override for the
public address is functioning correctly.

Additionally fixed unit test which invoked an apt-get update.

Closes-Bug: #1398182
2015-06-02 17:06:30 -07:00
Felipe Reyes
e30b0405be Move code into its own function and it's called from config-changed, ha-relation-changed and upgrade-charm 2015-05-22 11:32:59 -03:00
Felipe Reyes
d59435d307 Commit after merge 2015-05-18 16:07:48 -03:00
Corey Bryant
74b8c1376c Add virtualenv support 2015-05-12 15:17:42 +00:00
Corey Bryant
655b0d6d83 Merge next branch 2015-05-12 13:21:27 +00:00
Liam Young
d418994ea6 Merged trunk in + LE charmhelper sync 2015-05-11 08:38:35 +01:00
Liam Young
80b49d6f8c Add unit tests for kilo 2015-04-22 19:22:30 +00:00
James Page
37af848344 Ensure that migration only occurs when unit can assure that mysql has granted it permissions to access the database 2015-04-21 16:28:53 +01:00
James Page
4ba38a7c53 Revert previous commit, work incomplete 2015-04-20 11:21:36 +01:00
Corey Bryant
709209244d Deploy from source 2015-04-15 14:17:56 +00:00
Edward Hope-Morley
1b19080362 synced /next 2015-04-01 14:38:15 +01:00
James Page
4685c40f52 Rebase 2015-03-31 15:56:11 +01:00
Edward Hope-Morley
ce4091599f use service_reload() 2015-03-30 18:26:30 +01:00
Felipe Reyes
69f74a18a0 Remove pcmkr rules when single-nova-consoleauth is set to True 2015-03-18 00:44:06 -03:00
Liam Young
6a7cc67908 Fix unit tests 2015-03-10 09:15:51 +00:00
Felipe Reyes
bd29560fb5 Fix lint errors 2015-03-06 12:52:52 -03:00
Felipe Reyes
4a38ede6ed Fix unit test 2015-03-02 11:32:49 -03:00
James Page
0849f09517 Rebase and resync 2015-02-24 11:51:10 +00:00
Felipe Reyes
01c3493f1f Fix lint warnings 2015-02-19 12:51:12 -03:00
Felipe Reyes
59555966ad Add unit tests for single-nova-consoleauth 2015-02-19 12:36:35 -03:00
Felipe Reyes
506e05c09f Fix test_ha_relation_joined_no_bound_ip failure 2015-02-19 11:28:05 -03:00
James Page
7aac547da8 Rebase on next 2015-01-13 14:44:54 +00:00
James Page
b5b29b5848 Rebase on next 2015-01-13 09:23:07 +00:00