578 Commits

Author SHA1 Message Date
Corey Bryant
fb6e21b51f py3: Switch packages to Python 3 for train and later
Switch package install to Python 3 for OpenStack Train and later.

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

This patch also includes the following related changes:
  * Use the common files package, swift, rather than python-swift
    when using a package name to determine release.

Also add OS_* to tox.ini to allow functional tests to execute.

Change-Id: I121af845bf11c22052479a497b196a4670021256
2019-10-14 08:29:59 +00:00
Ryan Beisner
2fc678dcee
Sync charm/ceph helpers, tox, and requirements
Change-Id: I60b1c5949a0e03e1effd4fb2d229a2c7b13fb656
2019-09-30 22:42:05 -05:00
Chris MacNaughton
432dc38c20
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: I7a11662a2638d85d3707b3d15e209dc7527d0648
2019-08-19 11:55:38 -04:00
Zuul
0e981f9eb8 Merge "Add Python 3 Train unit tests" 2019-08-13 18:14:16 +00:00
Corey Bryant
4385355b69 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Note that python35-charm-jobs is retained since this charm is supported
on Xenial.

Change-Id: Ie6cde45d7f45d9b72d38227fc4db69d19a467446
Story: #2005924
Task: #34228
2019-07-30 10:18:23 -04:00
Chris MacNaughton
e62a646a4f Sync charm-helpers
Change-Id: I2bc8e741519b9ebbeacc790d19db8f8eea903781
2019-07-16 07:06:03 +00:00
Tytus Kurek
dfc0e8bfe2 Make XFS inode size configurable
Make XFS inode size configurable, so that it could be set to the
desired value, if different than default 1024.

Change-Id: If621587a02746876ee6c35d7af2e878dbc2ac8ef
Closes-Bug: 1826552
2019-07-01 11:21:55 +00:00
Tytus Kurek
04a0fc47b0 Sync charm-helpers for lp1826552
Ensure that charmhelpers directory is up to date.

Change-Id: Ib1c419a0c9710b4489777471226ccd680408f8fe
Needed-By: If621587a02746876ee6c35d7af2e878dbc2ac8ef
Partial-Bug: 1826552
2019-06-17 12:11:35 +00:00
Alex Kavanagh
c9b558b0ff Ensure that get_host_ip() is mocked out in test
The test test_setup_ufw() didn't mock out get_host_ip() which meant that
the test leaked and used an actual IP hostname lookup.  This failed when
ubuntu.com's IP address changed.  This patch mocks it out properly.

Change-Id: Ida7aaa7d085cc0316aa496d0a0e24333c5828cee
Closes-Bug: #1832829
2019-06-14 15:11:04 +01:00
Zuul
173f1a99db Merge "Use UUIDs of storage devices in fstab" 2019-05-24 08:46:17 +00:00
OpenDev Sysadmins
381297204c OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:29:40 +00:00
Frode Nordahl
bc1caeef51
Enable bionic/stein and disco/stein functional tests
Drop service check for ``glance-registry``.  The service is
removed as of Stein, and it really is not this charm functional
tests job of checking this anyway.  Any such detail should
be deferred to the ``charm-glance`` functional tests.

Change-Id: Icc2a73d6b8fc3f85a5ebc7fefa23c468cd173e40
2019-04-10 07:22:17 +02:00
James Page
93a2126233 stein: Add swift 2.21.0
Resync charmhelpers to pickup new Stein release version for Swift.

Change-Id: I706c798b105acecbaffc1b541b216b455ddf83ef
2019-04-08 10:19:03 +01:00
Chris MacNaughton
4258e84309 Sync charm-helpers to enable Ubuntu Disco
Change-Id: I48e0e954a4dc3a3f32174a4da39a635073e4ddf2
2019-04-05 17:17:49 +02:00
Frode Nordahl
220f1d8efa 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: I95b088f7db9c098492156a377ff79ffe64f77515
2019-04-05 08:03:20 +02:00
Chris MacNaughton
b0c3818bb6 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: I8c1c11dcc5f6fc9884ba66a439bf5788342299b2
2019-04-04 10:18:48 +02:00
tpsilva
dc63810cb4 Fix import errors on Nagios check file
After changing the charm runtime to Python 3, some imports are failing
on check_swift_storage.py. This can be fixed by explicitly imporgin the
modules inside the package, instead of just importing the package.

Change-Id: I746071042b669a1725744d4e32ea733eb40b309a
Closes-bug: #1822334
2019-03-29 13:15:10 -03:00
Tytus Kurek
edd00bee63 Use UUIDs of storage devices in fstab
This patchset implements a logic to put UUIDS of storage devices in the
fstab instead of device names.

Change-Id: I2170c54b25ac9b3faacb3fd0b2889d86c531395f
Closes-Bug: 1729478
2019-03-13 21:19:14 +00:00
Pete Vander Giessen
df39cd66d7 Replace ostestr with stestr in testing framework.
A system upgrade broke ostestr. We can fix it by just calling stestr
directly.

Change-Id: Iaa340623e414929cfa10897972bdb40d8bb39724
2019-03-07 17:13:16 -05:00
James Page
976391951e upgrade: Fix pike to queens upgrade
apt.version_compare changed behaviour to return >= 1 in the event
that a newer package version is detected.

Resync charmhelpers code to pickup fixes for openstack upgrade
detection.

Change-Id: Iacf8db9bbacca782646584a4982b265937b63b9e
Closes-Bug: 1817384
2019-03-05 11:48:16 +00:00
Paul Goins
b7c4897438 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: I8f4885575187bedf580f3e1963382a18b197638b
2019-03-01 14:43:49 +01:00
David Ames
0b3be36674 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: I8e046f8816fd91920ba2c15f8c960b74442eb7bd
2019-02-12 15:58:53 -08:00
Zuul
d94b5e9d31 Merge "Update functional test definitions" 2019-02-11 23:04:52 +00:00
Ryan Beisner
30466da23d
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: Ie2a9e473e35eb8067db2890c62b4af9adce3ed43
Closes-bug: #1815243
Partial-bug: #1815231
2019-02-08 15:41:29 -06:00
Ryan Beisner
70051c6e48
Update functional test definitions
Remove trusty-icehouse test combo from gate, leaving trusty-mitaka
if/where it exists.

Change-Id: Ib35689b2bd24c8ecfe7a1bcd973387a898faaae9
2019-02-06 14:50:29 -06:00
Corey Bryant
7f4e59322f Sync charm-helpers
Change-Id: Ib3d2866542e0d0ef3416a619755e1eb42bc230e0
2019-01-11 14:41:01 +00:00
Zuul
3f67385d49 Merge "Add project infomation into setup.cfg" 2019-01-10 06:41:40 +00:00
caoyuan
9394af7bf0 Add project infomation into setup.cfg
Change-Id: I776f428b98072058df314ca34b47f3834e4c2f3e
2019-01-09 14:57:27 +00:00
Zuul
1cec15b2f9 Merge "fix typos in the docstring" 2019-01-09 09:35:06 +00:00
Corey Bryant
9caec5ddae Sync charm-helpers
Change-Id: If009994df784cb84f1a53688a2c4d21c71f03627
2019-01-08 15:26:26 +00:00
melissaml
4f20347680 fix typos in the docstring
Change-Id: I21a6f6bf66e5dae2b9b5d8f6cba463ad5264c16b
2018-12-22 04:17:57 +08:00
Zuul
c4897eff53 Merge "Catch exception of ring sync fails" 2018-12-12 09:43:26 +00:00
Zuul
fc6f6a93c0 Merge "Replace deprecated "decodestring()" by "decodebytes()"" 2018-12-11 14:10:46 +00:00
Edward Hope-Morley
ae6826734f Catch exception of ring sync fails
It is possible for swift-storage units to attempt
to request rings from a proxy unit that is no longer
serving them so instead of raising an exception we
catch it and move on since there will likely be a
another proxy notification waiting to be consumed.

Change-Id: Ib2e634d2ed3509bfe2aa9b792cc17c2ed89029f1
Closes-Bug: #1765203
2018-12-06 14:35:00 +00:00
Zuul
29b030f2ac Merge "Drop use of vaultlocker PPA" 2018-12-03 12:48:32 +00:00
Alex Kavanagh
25ec6c6a3d Sync c-h with loopback_devices() fix
PY3 bug in loopback_devices caused the related bug.  This patch syncs
just the relevant file to fix the bug into charmhelpers.

Change-Id: I5aacd16c2bd4957c49210e867dc76efa1a315ab4
Closes-Bug: #1804128
2018-11-20 14:27:55 +00:00
Liam Young
3066151e77 Install prerequisite packages on charm upgrade.
When upgrading the charm some package dependancies are missing
such as python3-distutils. This patch uses the same approach as the
install hook to install packages before calling the the main python
hook code.

Change-Id: If3bfa6efd5a3924f3ca6d1309f82c3867cfd4c67
Closes-Bug: #1803418
2018-11-14 19:27:57 +00:00
James Page
9dfe75d82e Drop use of vaultlocker PPA
vaultlocker is now provided in the UCA and in backports for bionic.

Change-Id: Ia2b4cfe75a152d4d8e1de7cda076b692ebd9d398
Closes-Bug: 1802905
2018-11-13 12:02:32 +00:00
Ryan Beisner
910170bed0
Sync charm-helpers
Change-Id: I7c6ae78500eed693589c0d441daef87bbb75e9c4
2018-11-07 15:36:11 -06:00
Zuul
af71037920 Merge "Make py3 gate job voting" 2018-11-02 20:16:22 +00:00
Doug Hellmann
2adf0f13fe 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: Iaf7fb5beb77f47056255c2a7a46dc927060e2c7c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-11-02 14:18:10 +00:00
Vu Cong Tuan
c5b72675b0 Replace deprecated "decodestring()" by "decodebytes()"
decodestring() is deprecated alias of decodebytes()
https://docs.python.org/3/library/base64.html#base64.decodestring

The same has been done for nova:
https://review.openstack.org/#/c/610401/

Change-Id: I81d33a166602fbcf927ea62787db019e380b52aa
2018-11-02 16:10:40 +07:00
Frode Nordahl
26a9421b62
Make py3 gate job voting
Change-Id: I3023b4d4c07de5ec83a1d0bd8e71ef69e8571916
2018-11-02 09:34:00 +01:00
Alex Kavanagh
fc81200315 Upgrade the charm to py3 runtime
Change-Id: I98f4e6664080407a045ca5e76db59d46ffa9c38a
2018-10-24 14:57:05 +01:00
David Ames
9f33b8135e Series Upgrade
Implement the series-upgrade feature allowing to move between Ubuntu
series.

Change-Id: Ib5f234c219437c14b54ebe248c9598492542fd23
2018-10-13 17:29:48 +00:00
Liam Young
37efe8a2a7 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: I9d3198b419cefbcf7ee710dfbda57415e2a70ff9
2018-10-10 12:41:54 +00:00
Zuul
72a1d814c7 Merge "Fix gid key in swift conf" 2018-10-09 13:53:49 +00:00
Ryan Beisner
a42a34720e Update requirements
Also remove tests/charm-helpers if present, in favor
of the pip-installed charm-helpers.

Change-Id: I7ab789c09e68bb9e097653e5ca66fce9d74fbeee
2018-10-03 13:12:06 -05:00
Ryan Beisner
2c56b0a6d6 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: I785071825f7ef96cdb15fcd5bbab9963d7f2631a
2018-09-19 13:34:14 +02:00
Doug Hellmann
5c588b6917 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: I0c5b2464b097751f79021ec14f3b124b58cf13a4
Story: #2002586
Task: #24317
2018-09-11 13:20:42 -04:00