222 Commits

Author SHA1 Message Date
Frode Nordahl
67a81aaa5b Update series metadata
Ensure that EOL releases are removed from metadata
and tests, and that the current dev release is enabled
in metadata.  Dev release tests are enabled separately
because of chickens and eggs.

Change-Id: I675ab7a6a86e0f03c72f979b37b4135868adb953
2019-04-05 11:36:00 +00:00
Chris MacNaughton
15cc42ba40 Sync charm-helpers for Stein release
As a part of the Stein release, we need to ensure
that charmhelpers is up to date.

Change-Id: Ib2c759cb8e6ae7f4d391b89163a5ee1ba6285d31
2019-04-05 11:37:36 +02:00
Pete Vander Giessen
62ef2303ca Replace ostestr with stestr in testing framework.
A system upgrade broke ostestr. We can fix it by just calling stestr
directly.

Change-Id: I54762881d7356e3ded38a11f00600e3ded6acf7a
2019-03-07 17:10:57 -05:00
Paul Goins
f80cadabb1 Excluding unit_tests from coverage
Unit tests generally will all be executed, and measuring them will
skew the overall coverage numbers.  Thus, I'm excluding the unit_tests
folder.

Change-Id: Iec5e57b305615d4d3fe87cb46b771d92d14a5195
2019-03-01 15:03:10 +01:00
Paul Goins
af19e67961 Added tox environment for gathering coverage
This technique was borrowed from the tox "cover" environment in
openstack/nova's tox.ini.  This leverages the fact that stestr lets
you override the python executable via the PYTHON environment
variable.  Doing this allows us to easily generate coverage for our
unit tests.

An important caveat is that this does not provide any coverage for
tests via zaza, amulet, etc.  It is purely focused on the unit tests.

Note that this replaces the previous .coveragerc; coverage
configuration is instead pulled from tox.ini.

Change-Id: I2a14d3a3b0215aa637bc18e780d1ad765c796daa
2019-03-01 11:11:06 +01:00
Frode Nordahl
00b069df3f Request Ceph application name `rbd` for pools we create.
Use cases for the Ceph pool application name tagging is emerging
and thus far the protocol appears to be ``rbd`` or ``rgw``.  Others
might emerge too.

We make use of this to provide "it just works" behaviour to the
ongoing ``rbd-mirror`` feature work in the Ceph charms.

Sync charm-helpers.

Change-Id: Id8e59abdf5aaf578e9f11a223a79209fa971f51c
2019-02-19 19:42:26 +01:00
David Ames
42de983c5a Update charm-helpers-hooks.yaml and sync ch
Using the new version of the sync tool which removes the charmhelpers
directory before syncing, run charm helpers sync to find any unexpected
missing dependencies.

Change-Id: I4d9b743ffb93ce5cc006a1a6050b745c7592fd39
2019-02-12 15:56:27 -08:00
Zuul
9b66ac6b7c Merge "Update functional test definitions" 2019-02-11 23:10:25 +00:00
Ryan Beisner
d3cfc3ff13
Update pre-install hooks to fail on error
The pre-install operations may fail, yet that failure is not
elevated to the user. This masks the failure and makes early
package install issues difficult to troubleshoot.

If the basic pre-install script fails, the charm should not
proceed to later hooks as the requirements may not be met.

Hashbangs for bash should specify -e (errexit) on all of the
pre-install bash scripts.

Change-Id: I67b3a965b11844a2768800225396927f17864116
Closes-bug: #1815243
Partial-bug: #1815231
2019-02-08 15:48:23 -06:00
Ryan Beisner
f29b3b91e5
Update functional test definitions
Remove trusty-icehouse test combo from gate, leaving trusty-mitaka
if/where it exists.

Change-Id: I564d55b43fa466d3f1087302c2a2f67a477effc1
2019-02-06 14:48:04 -06:00
Chris MacNaughton
511f2f0a19 Ensure we use the correct pool name
Change-Id: Ieaee887b03ac4e9ae880ff27e0660f9269c16c2e
Closes-Bug: #1814603
2019-02-05 09:52:24 +01:00
Alex Kavanagh
9802731e58 Migrate charm to python3 only runtime
Change-Id: I921f3e2fc8250ca7250ca7dfc47e12644ce4ef98
2019-01-31 22:05:20 +00:00
Liam Young
df6b239526 Expose rbd-pool-name
In some situations an existing rbd pool may already be populated
with images that are in use. This is the case when migrating
from the old topology where cinder had a direct relation to
ceph-mon.

Change-Id: I93eb801ca4a166f862d5d86711d9476c61851344
2019-01-23 17:51:46 +00:00
Pete Vander Giessen
4e3bf3e7f3 charmhelpers-sync
Pull in fix for call to ceph-authtool when updating keys.

Change-Id: I8e676cc3cfecf6cfb832197aebe0570d879266fd
Closes-Bug: #1810917
2019-01-16 11:08:14 -05:00
Corey Bryant
bd98873277 Sync charm-helpers
Change-Id: Icad06b681d34e4a4fc04c8bd77d2aab3b85aaa1d
2019-01-11 14:36:16 +00:00
Zuul
3e4dece9ba Merge "fix typos in the docstring" 2019-01-09 09:33:07 +00:00
Corey Bryant
e7dcb3fc5b Sync charm-helpers
Change-Id: Icad296a5c3142424931d4fb9b549f674f8996850
2019-01-08 15:16:35 +00:00
melissaml
3852a8586e fix typos in the docstring
Change-Id: Iad78f32b3a76feb332ef2d31117a871291acc0d7
2018-12-22 03:52:32 +08:00
Syed Mohammad Adnan Karim
2378c424ee Adds amulet test - ceph.conf alternatives removal
Test checks for the removal of ceph.conf alternatives when ceph-mon
relation is broken. If ceph.conf is not present when the relation is
still joined, the test fails. If ceph.conf is not removed after the
relation is broken, the test fails. The test will pass if an existing
ceph.conf file is removed after the ceph-mon relation is broken.

Change-Id: I3b348a58bd2e3ebbbecbd3bbb4307c490a0c4ea4
Related-Bug: 1778084
2018-12-03 14:51:34 +00:00
Syed Mohammad Adnan Karim
18cbf7f6e1 Update hook to remove old ceph.conf alternatives
When adding ceph-mon relation to cinder, the charm installs ceph.conf
with the update-alternatives via cinder_utils.resource_map().
However when the relation is removed, the alternative isn't cleaned up.
This can cause issues if installing a cinder-ceph subordinate charm.
The cinder-ceph charm also installs a ceph.conf alternative that will
point to the leftover ceph.conf installed by the ceph-mon charm.

Added remove_alternative() in ceph-relation-broken hook to ensure
that leftover ceph.conf alternatives is removed upon relation removal.

Change-Id: I308e62a626f31eb8ef690a09035fe3908920ccc9
Closes-Bug: 1778084
2018-11-26 19:04:14 +00:00
Ryan Beisner
50eec67129
Sync charm-helpers
Change-Id: Ic222ca663b5ba18bcdb2d1ee1f3a7e1de9bb8a1d
2018-11-07 15:34:07 -06:00
Doug Hellmann
764804a1be fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I2068cc2748021157c6d5e4f4b6cbd85790dd11b7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-11-02 00:55:46 +00:00
Ryan Beisner
5549903533
Fix lint in unit test
Change-Id: I4f380039f31231f8d78acb83d65abb32ba80263c
2018-11-01 14:58:01 -05:00
Liam Young
1ecb763f53 Tests dir no longer need copy of charmhelpers
Charmhelpers is now installed via pip for unit tests so stop
'Make sync' from pulling it down.

Change-Id: I05836ce15f97ab65d915e4e841928f975c6be1c2
2018-10-10 12:39:55 +00:00
Zuul
24aa7e99bf Merge "Enable discard" 2018-10-04 14:50:55 +00:00
Ryan Beisner
c8fcfd37d2 Update requirements
Also remove tests/charm-helpers if present, in favor
of the pip-installed charm-helpers.

Change-Id: Ief40b8f20baeff38389de7c4294a5bb394d6d3cc
2018-10-03 11:40:55 -05:00
Edward Hope-Morley
9444b4402c Enable discard
By default nova/libvirt will not enable trim for
attached volumes so to allow users to use this
feature we now enable it by default.

Also removed < Icehouse unit test.

Change-Id: I58ffaa43e2836068aeed7795df670d279d5e28f8
Closes-Bug: #1781382
2018-09-28 10:29:30 +01:00
Zuul
ac53d3994d Merge "Series Upgrade" 2018-09-25 16:54:16 +00:00
David Ames
ea09a8bee6 Series Upgrade
Implement the series-upgrade feature allowing to move between Ubuntu
series.

Change-Id: Ib101bcc6055ebec230d202383e9aa82535dc0533
2018-09-22 20:20:19 +00:00
Zuul
11d87b8d5a Merge "py3: Enable Python 3 at Rocky" 2018-09-21 10:19:52 +00:00
Ryan Beisner
c0d4b93ebc Add cosmic
Add a tactical change which is already merged into charm-helpers.

This needs to go into all charms to solve the chicken:egg issue
where cosmic is untestable until this change exists.

Reference:

4835c6c167

Change-Id: Ic979610078651e4479f2c251c809e7ff3f542e73
2018-09-19 13:25:48 +02:00
James Page
3f3eb45777 py3: Enable Python 3 at Rocky
Misc updates for rocky:

  - Switch default smoke test to bionic-rocky
  - Resync charm helpers

The change for this charm is minimal as it directly uses
ceph-common.  The cinder charm actually deals with installation
of the required python-rados/rbd libraries for the ceph
integration.

Change-Id: Ic2ee4b845ab604d80b7e27492f522d57f9463af1
2018-09-18 15:08:48 +02:00
Zuul
08592dd8a6 Merge "Add support for rbd_exclusive_cinder_pool" 2018-09-14 16:19:16 +00:00
Edward Hope-Morley
b04b5f3b5f Add support for rbd_exclusive_cinder_pool
As of the of the queens release cinder supports this config
option which, if enabled, stops cinder from query all
volumes in a pool every time it does a delete in order to
get accurate pool usage stats. The problem is that this
causes tons of non-fatal race conditions and slows down deletes
to the point where the rpc thread pool fills up blocking
further requests. Our charms do not configure pool by default
and we are not aware of anyone doing this in the field so
this patch enables this option by default.

Change-Id: I5377e2886a6e206d30bd7dc38a7e43a085aa524c
Closes-Bug: 1789828
2018-09-11 14:02:43 -06:00
Doug Hellmann
e741149900 import zuul job settings from project-config
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.

Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.

Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I2dbd91d4a486ca0bfe2ad4d3196b55c13d24a5ef
Story: #2002586
Task: #24317
2018-09-11 13:08:20 -04:00
Ryan Beisner
f2d17851a4 Update functional test definitions
Change-Id: Id439ece547dc1922211e8aebba6e8c872928a3c0
2018-08-27 18:14:03 -05:00
Ryan Beisner
cafa7a22e8 Update functional test definitions
Change-Id: I53484285a6ef4b5b1220855081d2635452d66a75
2018-07-18 18:35:26 -04:00
Chris MacNaughton
a4c6c088f7 Sync charm-helpers to ensure Rocky support
Change-Id: Ibb458a0eae4c4cc25dc5eb511e91aae0ed53106b
2018-07-13 15:53:47 +02:00
Nguyen Van Duc
e5ff9faf68 Add py36 testenv
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to Transition Plan [1],
it'll be handy to have py36 testenv.

For more details, please check Python2 Deprecation Timeline [2]
and Python3-first Goal - Completion Criteria [3].

[1] https://wiki.ubuntu.com/Python/Python36Transition
[2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
[3] https://review.openstack.org/#/c/575933/8/goals/stein/python3-first.rst@42

Change-Id: I36cfee00be360654937cfd6f5b0cd630c84e103d
2018-07-12 17:52:13 +07:00
Ryan Beisner
fd23480578 Update series metadata
Ensure that EOL releases are removed from metadata
and tests, and that the current dev release is enabled
in metadata.  Dev release tests are enabled separately
because of chickens and eggs.

Change-Id: Ib4441a6fa515e2e320c68a8a765a2f30ee74f4ca
2018-07-11 14:04:11 -05:00
Corey Bryant
9dfc73e772 Sync charm-helpers for Rocky series support
Change-Id: Ide82e8b03af359146325bfccbadf61f558b027fd
2018-06-21 19:07:29 +00:00
Chris MacNaughton
930d7c3608 Update tests to use Juju storage
Due to changes to the ceph-osd charm, it is
suggested to use Juju storage for testing.

Change-Id: I14ab9533a53105f8edc2c4af1d98b336a898df00
Related-Bug: #1698154
2018-06-04 17:31:46 +02:00
David Ames
65a188172f Enable Bionic as a gate test
Change bionic test from dev to gate for 18.05.

Change-Id: I808c6451583d66c8b8a17ed1bffc8a37660f6022
2018-05-16 13:28:02 -07:00
James Page
b1829e983a Tidy ceph backend configuration
Drop generation of upstart override file and /etc/environment
and scrub any existing charm configuration in these locations
from an existing install.

These where required way back in the dawn of time when ceph
support was alpha/beta in cinder.

Provide backend specific configuration file path, allowing
multiple ceph clusters to be used with a single cinder
application.

Change-Id: I8a097e4de1c5c980f118a587a1a64792fad2fa05
Closes-Bug: 1769196
2018-05-10 17:14:17 +01:00
Ryan Beisner
294d00dfa1 Remove deprecated functional test targets
Change-Id: I82f0a195d7ac8294e55245d09658a021f892414a
2018-05-09 16:35:13 -05:00
Ryan Beisner
1abf731e37 Update tox.ini to stop using unverified package
As of pip 10.0, --allow-unverified is not permitted.

Use of the flag in this repo was previously used to force
installation of python-apt to accommodate certain unit tests.

The unverified package, python-apt, is no longer necessary
for test execution.

Related-Bug: #1760720

Change-Id: I9516fa288f9b04c8822c707e8649916a3f8e0fc6
2018-04-03 16:38:46 +00:00
Liam Young
d6ef6b317d Ensure cinder-ceph installs its prerequisites
The charm has been assuming that the principle charm will install
the packages this charm needs to run. This is not always the case
so the change forces the charm to install what it needs.

Change-Id: I1a394bd9f0a008a403d36ba5d7332b7fb5659006
Closes-Bug: #1754007
2018-03-20 09:04:23 +00:00
Ryan Beisner
1a956ebf73 Sync charm-helpers
Change-Id: Iac5794aec967ffc85a42659d469769a63b2cf428
2018-02-21 14:08:15 -06:00
Ryan Beisner
b86be52fd7 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: Ieb05f48ad52a1dc8d79bcffec1c467495bbf0001
2018-01-19 17:55:38 +00:00
Zuul
3658a29be5 Merge "Request class-read object_prefix rbd_children perm" 2017-12-15 14:20:52 +00:00