Commit Graph

83 Commits

Author SHA1 Message Date
Alex Kavanagh 9c12812735 Switch the charm to support py3
Some major changes:
* the charm has been rebased (from a Python perspective) to be rooted in
  the charm directory.  This is a single root.
* Imports have been changed so that the don't add lots of imports to the
  namespace of the module doing the import.
* The code that used to run at module import time has been made lazy
  such that it only has to run if the relevant functions are called.
  This includes restart_on_change parameters, the harden function and
  the parameters to the guard_map.  Appropriate changes will be
  submitted to charm-helpers.
* Several tests had to be re-written as (incorrect) mocking meant that
  text fixtures didn't actually match what the code was doing.  Thus,
  the tests were meaningless.
* This has had a net positive impact on the unit tests wrt to importing
  modules and mocking.

Change-Id: Id07d9d1caaa9b29453a63c2e49ba831071e9457f
2018-10-18 15:43:03 +01:00
David Ames 54a7603437 Series Upgrade
Implement the series-upgrade feature allowing to move between Ubuntu
series.

Change-Id: I16393fe61f589ae796c91da9177bfacd774279d0
2018-09-19 07:56:06 +00:00
Frode Nordahl 1ee5ce6b55 Sync charm helpers and enable Rocky func test
Change-Id: Id2784943aa3cd5fbaec451dde735de9574013dc1
2018-08-29 09:02:23 -05:00
Corey Bryant b99070edf6 Sync charm-helpers for Rocky series support
Change-Id: I8e625fb8871a9b6afcedf4633df780bd18233aeb
2018-06-21 18:59:34 +00:00
David Ames f03ccf02b7 Enable Bionic as a gate test
Change bionic test from dev to gate for 18.05.

Change-Id: I5a82ac79b29181fabec41570cd5aa003d2bfb8ea
2018-05-11 16:12:20 -07:00
David Ames 794b8ed0bb Charm-helpers sync to fix CA cert comparison
The comparison of bytes vs string of the CA certificate produces a
false negative. This leads to rewriting certificates and affecting
connectivity to services.

Read in the certificate as bytes as well for a bytes vs bytes
comparison.

Closes-Bug: #1762431

Change-Id: Ie2348a83671b9636bd94227e903b1a50bff7aecc
2018-04-11 14:26:49 -07:00
Ryan Beisner 33881c371b Sync charm-helpers
Notable issues resolved:

openstack_upgrade_available() broken for swift
https://bugs.launchpad.net/charm-swift-proxy/+bug/1743847

haproxy context doesn't consider bindings
https://bugs.launchpad.net/charm-helpers/+bug/1735421

regression in haproxy check
https://bugs.launchpad.net/charm-helpers/+bug/1743287

Change-Id: Ifb1d9e71924db6ab8a3d9ee34fcd1b40f910d68a
2018-01-19 16:18:19 +02:00
James Page 0f14eac672 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: I2fe15b648d485e5b03965a00dee6324669ebe9fa
2018-01-12 10:42:50 +00:00
Edward Hope-Morley 16ae06bf42 Use volumev3 for internal endpoint in >= Pike
volumev2 api is deprecated for >= Pike so switch
internal endpoint to v3 for Pike onwards.

Change-Id: Icb9861efbd650b079f507ca585818e95921dc42a
Partial-Bug: 1733566
2017-12-08 10:06:49 +00:00
Ryan Beisner 1da186ac2d Sync charm-helpers
Change-Id: I7ffa8b100144e14b736a7f204977f0aee24aada3
2017-11-22 18:25:39 +00:00
Liam Young f427dc5a48 Resync charmhelpers for py3 fixes.
Change-Id: I28457389a65a835204729c5070b420715664aa26
2017-11-13 16:13:50 +00:00
David Ames 1fa5f7a673 Dual Stack VIPs
Enable dual stack IPv4 and IPv6 VIPs on the same interface.
HAProxy always listens on both IPv4 and IPv6 allowing connectivity
on either protocol.

charm-helpers sync for HAProxy template changes.

Change-Id: Ide561155adbe56a4cbc865b683532e00c9c33441
2017-08-14 14:55:18 -07:00
James Page b1da4f2dd4 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.

Change-Id: Ia57f29abbbabf1712b2385c2d94ece12f9ce0861
2017-07-31 10:41:26 +01:00
James Page 7186587ac6 Updates for Pike b1
Resync charmhelpers to pickup new versions for Pike.

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

Change-Id: I2d828fa88b73260b2abf02ff2c6037ffbee654f3
2017-05-24 11:04:13 +01:00
David Ames e94f7882cb 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: Ifd4e975d9abbb9f7a8b0f12c8f0a8cf8f78595b6
2017-04-25 14:32:19 -07:00
David Ames bb4b8d6540 Enable Ocata Amulet Tests
- Add Zesty as a supported series to metadata.yaml.
- Turn on Xenial-Ocata Amulet test definitions.
- Sync charm helpers to get Juju 2.x amulet compatibility.
- Keeping Zesty-Ocata Amulet test definitions turned off until the
  metadata.yaml changes propagate to the charm store.

Change-Id: I0f824bf80beeb8509b2958d429aaed52f4cf46bb
2017-03-09 14:35:03 -08:00
Corey Bryant 1e2647a9b5 Enable minimal cells v2 support
A minimal cells v2 setup is required in Ocata, which includes the
following databases:
 1. An API database (named nova_api)
 2. A special cell0 database (named cell0)
 3. A "cell1" database (named nova - we're using the nova db as cell1)

The order of nova-manage commands is also updated in this commit.
The 'nova-manage api_db sync' must occur first because 'nova-manage
cell_v2' commands use the API database. 'nova-manage db sync' must
then be run after the 'nova-manage cell_v2' commands.

Finally, 'nova-manage cell_v2 discover_hosts' must be run whenever a
new compute node is introduced to add the host to cell1.

This commit includes a sync of charm-helpers to pick up AMQPContext
updates for transport_url.

Change-Id: Ia6f36ca8a360dc8490e9f41b62d499fa4d73d0b9
2017-02-16 18:23:21 +00:00
David Ames c59dd636e8 Charm-helper sync to pull in dns resolve fix
Change d5d2e5064e introduced this fix
However the charm-helpers branch was not merged. This is a
reintroduction of the same code with a charm-helpers sync after the
charm-helpers branch was merged.

Change-Id: I68f53d5d4ed726c14d8cc83c650763fa77a4324d
2017-01-10 13:35:06 -08:00
Liam Young dfd8208354 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: I747d107d28474d545e4a3612a927d46cae34e6b6
2016-12-13 09:31:19 +00:00
Corey Bryant 77b5aab314 Sync charm-helpers to pick up Ocata UCA support
Change-Id: I829962b651499c915e2177ff59137e5aba1d3505
2016-12-01 21:37:15 +00:00
Ryan Beisner 24df5f451d Update Amulet defs, series metadata and c-h sync
- Sync charm helpers if applicable.

- Fix test executable hashbags for virtualenv prep.

- Add Yakkety-Newton Amulet test definitions.

- Prep Xenial-Ocata Amulet test definitions (not yet enabled).

- Prep Zesty-Ocata Amulet test definitions (not yet enabled).

- Add Zesty charm series metadata.

- Remove Precise charm series metadata if present.

- Remove Precise Amulet test definitions if present.

Change-Id: I42776be9284b0eee2fd58b62b0269a5a3c556453
2016-11-28 14:55:42 -06:00
Ryan Beisner 2bd1f60d7c Update amulet test definitions for Newton
- Remove Precise-Icehouse Amulet test definitions if they exist.

- Add Xenial-Newton Amulet test definitions.

- Add Yakkety-Newton Amulet test definitions.

- Use the percona-cluster charm in tests instead of the mysql charm.

Change-Id: Idab48a7831008c5353eeb56da5deb49ce1305a41
2016-10-12 13:34:02 -05:00
David Ames 94966e0e59 Pre-release charm-helpers sync 16.10
Get each charm up to date with lp:charm-helpers for release testing.

Change-Id: Iab6950c48e91266f5471a4180e9e94479d955e34
2016-09-30 09:10:55 -07:00
James Page 58bf5b0628 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: I8c1d6b9b6d42bcc357d764ec1bd04a36e9982f57
2016-09-20 12:35:19 +01:00
Liam Young 3f4998bd06 Pre 1607 release charm-helpers sync
Sync charmhelpers to pick up bug fixes for 1607 release

Change-Id: Ibfb7df5b0240496affa95cd665d7a4ed7f6cb549
2016-07-21 14:21:56 +00:00
David Ames fbd0d368c3 Install python dependencies early for CH ip.py
When using charmhelpers.contrib.network.ip apt install was quietly
failing. Install python dependencies in the early install hook
(before install.real).

Charm-helpers sync to bring in apt_install with fatal=True

Change-Id: I929994554a4d7a9ade6bc29fc3a9ec16b9a59235
Partial-Bug: 1601972
2016-07-18 09:53:36 -07:00
Corey Bryant ec8e442b73 Various deploy from source changes and c-h sync
* openstack-origin is no longer required when using openstack-origin-git.
* Drop kilo from openstack-origin-git default values because upper
  constraints doesn't work in kilo for openstack-dashboard and glance.
* Add flag to allow for disabling upper constraints when using
  openstack-origin-git with user-specified git repositories.

Change-Id: I903158434d552b50ef8250bbcab8c0b19b82e26e
2016-07-14 13:12:53 +00:00
James Page a05c9c6beb Resync charmhelpers for licensing change
The charm-helpers project have re-licensed to Apache 2.0
inline with the agreed licensing approach to intefaces,
layers and charms generally.

Resync helpers to bring charmhelpers inline with charm
codebase.

Change-Id: I8746721aea508fa01d2b616d580b38f84197759b
2016-07-06 16:39:15 +01:00
Corey Bryant d3f311e97a Sync charm-helpers for openstack-origin-git defaults.
Change-Id: I04c88fe9b84a00fc36134a5c704c9a4f34fee5f6
2016-06-23 09:10:57 -04: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
Corey Bryant 18e19ef50e 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: I6b737272deed067c2f71dbd36b201aea884265ee
2016-06-20 08:37:43 -04:00
James Page 8e3d71ea82 Switch to using charm-store for amulet tests
All OpenStack charms are now directly published to the charm store
on landing; switch Amulet helper to resolve charms using the
charm store rather than bzr branches, removing the lag between
charm changes landing and being available for other charms to
use for testing.

This is also important for new layered charms where the charm must
be build and published prior to being consumable.

Change-Id: Ia4cbe14575851c0f54cbb5845ffd6b8669fb7fa2
2016-06-17 11:52:35 +01:00
James Page 5d319f5b2b Resync charm helpers
Add support for OpenStack Newton and Ocata.

Rework version detection code to just match on major version for
OpenStack projects using semantic versioning.

Provide fallback version detection based on major.minor versions
for swift packages.

Rework config-flags support helpers.

Fix is_ip function to correctly detect both IPv4 and IPv6 addresses.

Change-Id: Ibdd74250e411e95252f91883d8cd758bd9c5b8c0
2016-05-27 12:29:03 +01:00
James Page 30c60318e5 Resync charm-helpers
Avoid use of 'service --status-all' which is currently
broken on trusty for upstart managed daemons; the change
moves to detecting how the daemon is managed, and then
using upstart status XXX or the return code of service XXX
status to determine whether a process is running.

Fixes for IPv6 network address detection under Ubuntu
16.04 which changes the output format of the ip commands
slightly.

Update the version map to include 8.1.x as a Neutron
version for Mitaka.

Change-Id: I529f4ac54ee1a56e61e61f35e2bc52353f6874f3
Closes-Bug: 1581171
Closes-Bug: 1581598
Closes-Bug: 1580674
2016-05-18 14:09:18 +01:00
Liam Young b89b7cf93c Charmhelper sync before 1604 testing
Change-Id: Ie00b1a39d14fc44f702aa6b664e8d12ec4fc5de7
2016-04-12 14:09:23 +00:00
Liam Young bb9ef8b039 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.

Change-Id: Ia422aa4077fbdd8cdb0353306c14f5633e2affb8
Partial-Bug: 1558642
2016-03-23 15:41:30 +00:00
James Page d5806b4ce2 Resync charm-helpers
Change-Id: Id8eb4ea28f651f007d714d2bf406eb9796a5ab5d
2016-03-02 12:09:33 +00:00
Edward Hope-Morley ea18994153 charm-helpers sync 2016-02-11 15:44:14 +00:00
Edward Hope-Morley a6e121afba [hopem,r=]
Sync charmhelpers to get fix for bug 1518975
2016-02-11 14:46:45 +00:00
Corey Bryant 7e08983055 [corey.bryant,r=osci] Sync charm-helpers. 2016-01-08 02:38:01 +00:00
James Page 63f4ef58d1 Resync charm-helpers 2016-01-05 11:43:58 +00:00
Corey Bryant c4020b6d0a [corey.bryant,r=trivial] Sync charm-helpers. 2016-01-04 16:29:34 -05:00
Edward Hope-Morley d7e169d631 [hopem,r=]
Sync charmhelpers to get fix for bug 1499643
2015-09-25 15:35:19 +01:00
David Ames 468f3ae945 Action managed upgrades 2015-09-21 16:06:54 -07:00
Liam Young 08b92a7317 [gnuoy,trivial] Charmhelper sync (+1'd by mojo) 2015-09-03 10:39:34 +01:00
Corey Bryant 334c66c2b7 [corey.bryant,r=trivial] Sync charm-helpers to pick up Liberty support. 2015-08-18 13:34:35 -04:00
Corey Bryant 2ebd710f02 Sync charm-helpers. 2015-07-16 20:18:38 +00:00
Corey Bryant a794fc0e38 Sync charm-helpers 2015-06-19 15:10:20 +00:00
Liam Young d4b768f673 Resync le charm helpers 2015-06-04 09:45:01 +01:00
Ryan Beisner 86da61c478 auto sync charmhelpers 2015-04-16 21:34:39 +00:00