Commit Graph

27 Commits

Author SHA1 Message Date
dongdong tao 93dfc624d4 Check if the newhost exists instead of currenthost
Closes-Bug: #1956470

Signed-off-by: Dongdong Tao <dongdong.tao@canonical.com>
Change-Id: I2b9eec030a5b0f6d9a405cecea29bef04eb72f5d
2022-04-25 16:22:53 +08:00
Alex Kavanagh 5a3bea35c4 Sync libraries & common files prior to freeze
* charm-helpers sync for classic charms
* charms.ceph sync for ceph charms
* rebuild for reactive charms
* sync tox.ini files as needed
* sync requirements.txt files to sync to standard

Change-Id: I6027b4bb12dce36a7b10df2e14cafd5dc6ee963b
2020-09-28 13:07:05 +01:00
David Ames d3332cccf9 Automatically resume after openstack upgrade
After an openstack upgrade automatically resume. Without this a gate in
config_changed stops configuration of keystone catalog entries. That
gate is still useful for the series-upgrade process.

Change-Id: I458a1ed6ebf51263785391785cabc17f716b6178
Closes-Bug: #1824545
2019-04-16 09:46:56 -07:00
Chris MacNaughton eb30d95f3f Add security-checklist action
Change-Id: Iec48205fd98c67b9f1d4ddf68bcbefb68c10102f
2019-03-13 10:32:25 +01:00
Alex Kavanagh 834cde35ec Migrate to python3 only charm
Change-Id: Ia4bcf570d40083625358fdd4fea14202ff3d89af
2019-01-30 12:36:21 +00:00
James Page e31d5eb0a4 py3: Switch to using Python 3 for rocky or later
Switch package install to Python 3 for OpenStack Rocky or later.

When upgrading, remove any python-* packages that where explicitly
installated and then autoremove --purge any dependencies that are
no longer required.

This change also switches to using the cinder-manage binary in
preference to using the internal API of Cinder to query and manage
services in cinder, avoiding the need to continue to have python-cinder
installed for charm usage.

Change-Id: Ie8f7d2d7e1ef7b3065d6d9ed244e5fd05e2f613b
2018-09-18 12:24:27 +02:00
Frode Nordahl 6656070586
Remove orphan symlink
Support for dfs was dropped in commit 4ea9d6a427

Remove orphan symlink in the actions/ directory.

Change-Id: Ief3c8332afe5ace575e3a30195b0d4e38b647905
2018-05-28 08:41:18 +02:00
James Page 4ea9d6a427 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: Icd464e950c6f53470311e3c110b530a69bff6e2f
2018-01-12 13:59:33 +00:00
Edward Hope-Morley 5a5e542f9a Part 2 of upgrades fix in commit c1653c2
In the first patch I forgot to ensure that we also
reload the configs that are globally declared in
cinder_hooks and therefore loaded on import. So here
it is.

Change-Id: I613959fa91912b388aea8bd6926d085956c1d67e
Closes-Bug: #1726527
2017-10-24 18:22:43 +01:00
Edward Hope-Morley c1653c2113 Ensure upgrade installs correct configs
When we do an openstack upgrade we must ensure that
release version dependant decisions are made at the
right time. In this patch we ensure that we choose
configs after the target release packages have been
installed so as to be sure that e.g. when upgrading
from Newton to Ocata the apache2 wsgi conf is
installed for the cinder-api.

Change-Id: I9414940535406c7c7491636839a328df1ac9235b
Closes-Bug: 1726527
2017-10-23 23:24:14 +01:00
Alex Kavanagh ea45357fe6 Fix alphanumeric comparisons for openstack and ubuntu releases
- sync charmhelpers with fix-alpha helpers
- fix up code where the alpha comparisons are done

Change-Id: Ic227ce03c1acf6de9b5f83953d6390d66cda190c
Related-Bug: #1659575
2017-03-28 16:38:05 +01:00
Liam Young d21160a0d3 Add actions for renaming volume host attr
Add two new actions which are essentially wrappers around

cinder-manage volume update_host \
    --currenthost CURRENTHOST \
    --newhost NEWHOST

In previous versions of the charm if block-device is set or the
legacy ceph relation is used (as opposed to storage-backend relation)
then the configuration of those backends is done in the [DEFAULT]
section of the cinder.conf. As of Ocata that is no longer supported
and backends need to be listed in their own sections and referenced
via enable_backends parameter. This change in config results in a
change of host name and existing volumes need to have their metadata
updated to point at the new hostname.

Old Hostname: <unit-name>
New Hostname: <unit-name>@<backend section name>#<volume-backend-name>

New Action: volume-backend-name
Used for updating the host attribute of volumes to add the driver
name. This is needed after an upgrade to Ocata if there are existing
volumes which have been configured prior to multi-backends
being enabled.

New Action: rename-volume-host
Used for updating the host attribute of volumes. This action is
a lower level action then volume-host-add-driver and simply passes
the old and new hosts verbatim to cinder-manage.

Change-Id: I989074a3f41126aa57c514f7e18b887733bc18fe
Partial-Bug: #1665272
2017-02-22 09:48:08 +00:00
James Page e02c7cae82 Re-license charm as Apache-2.0
All contributions to this charm where made under Canonical
copyright; switch to Apache-2.0 license as agreed so we
can move forward with official project status.

Change-Id: I6bf4c1a59778105d81a211b044817cf1041157a2
2016-06-28 12:09:16 +01:00
Jenkins 1f419323bf Merge "Cleanup action for service-list after deploying HA." 2016-05-23 18:50:16 +00:00
Jorge Niedbalski b299cc84be Cleanup action for service-list after deploying HA.
This is a workaround for LP: #1493931 in order to keep the
output of cinder service-list clean after deploying a HA.

The rationale behind this is to expose a way to cleanup the
services table on the database from unused ones ,
those services were
created by cinder before the storage relation is joined (particularly
for stateless ones).

This action also exposes the host option to specify
the host to be removed.

By default if no host is provided, this action will
cleanup all the entries different to the ones
specified on the DEFAULT_SERVICES constant.

An example of execution can be found on the comment
section of this proposal.

Change-Id: I4a5e682e44206f7b77d873cb1fc63e3eae86aad5
Related-Bug: 1493931
Signed-off-by: Jorge Niedbalski <jorge.niedbalski@canonical.com>
2016-05-18 19:55:18 -04:00
Liam Young d744e47d46 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: Id545477313bde717e1c941f62e6348f3c0656ab3
Partial-Bug: 1558642
2016-04-01 07:35:27 +00:00
Corey Bryant d02007359d Import CONFIGS instead of calling register_configs() again. 2015-09-22 21:03:02 +00:00
Corey Bryant 6596912e9b Adjust parameter order 2015-09-15 01:02:58 +00:00
Corey Bryant d103c6aff7 update comment 2015-09-14 20:22:20 +00:00
Corey Bryant 5816737c4a code cleanup 2015-09-14 20:15:24 +00:00
Corey Bryant 3143fa7c1b Use charm-helpers for action managed openstack upgrade. 2015-09-14 17:53:04 +00:00
David Della Vecchia e47ce9844d Adding tests for relation_ids, relation_set. Fixing comment formatting. Hiding juju_log output in tests. 2015-09-01 15:13:23 +00:00
David Della Vecchia 55f81f1c06 Normalizing charm config (finally). Adding additional action upgrade config-changed test. 2015-08-31 16:25:22 +00:00
David Della Vecchia 4263765ae8 Including missing files. Updated config formatting. 2015-08-28 14:55:48 +00:00
Corey Bryant a290c50838 Move config_changed into try block 2015-04-15 16:26:17 +00:00
Corey Bryant b3695de6a4 Run config-changed hook after git-reinstall action installs from source 2015-04-13 23:34:38 +00:00
Corey Bryant 6a427372de Overall refresh to current install from source approach 2015-03-21 02:18:45 +00:00