Commit Graph

336 Commits

Author SHA1 Message Date
Fulvio Galeazzi a2ffd3a497 Add support for CephFS.
Extend ceph-proxy to implement ceph-mds interface, this allows the
ceph-fs to be related. The testing is made reusing the CephFSTests
testing class.

Usage example:

  juju add-relation ceph-proxy:mds ceph-fs:ceph-mds

Co-Authored-By: Felipe Reyes <felipe.reyes@canonical.com>
Closes-Bug: #1922195
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/558
Change-Id: I437dbac9fe018eb2d0ffb87052d61a08aa014473
2023-06-16 18:44:08 -04:00
Liam Young dee1f3c86c Process requests for radosgw per unit keys
Process requests for radosgw per unit keys. Ideally the charm
would move to using charms.ceph.utils for the get_radosgw_key
method but this does not work atm. I have raised bug #1899643
to cover deduplicating hooks.ceph v charms.ceph.*

Change-Id: I00f5a58f127baa1f7878b0ddb31b4fa009d9651e
Closes-Bug: #1899634
2021-01-12 11:30:01 +00:00
Alex Kavanagh 5e80697a56 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: I512ef8bbb52c08e782c66450b435a40a76b8a532
2020-09-28 13:51:24 +01:00
James Page f84e71392c Use charms.ceph for Ceph broker
Drop use of local copy of ceph_broker.py in preference to the
centrally maintained copy in charms.ceph.

Change-Id: I89aa0f9fc7d5d2d480ebabc1cb17a86dcbef21bf
2020-08-28 11:15:03 +01:00
Alex Kavanagh e3be7e48b9 Add focal-ussuri and bionic-ussuri bundle
This patch adds a focal-ussuri and bionic-ussuri bundles to the tests
for the charm.

Also removes 'admin-token' from the tests, as the keystone charm no
longer accepts the option.

Also, for focal, btrfs-tools has been removed and replaced by
btrfs-progs; thus these are installed on focal instead.  See linked Bug.

Closes-Bug: #1871712
Change-Id: Ifc79beebb981571cebc38be6cb6c2748d22816c9
2020-05-17 16:01:14 +01:00
Chris MacNaughton 649bdb4683 Ensure that we define `unit` before use
When ceph-proxy is configured prior to being related
to clients, it is possible for the units to go into
a hook error because of an undefined variable. This
change ensures that we do correctly define the unit
before we use it.

Change-Id: Ic6e28783bde4fc342d7c5ef1d733e69a03b702fe
Closes-Bug: #1862487
2020-02-12 11:28:56 +01:00
tpsilva dfb29a4753 Add support for 'add-permissions-to-key' requests
Currently add-permissions-to-key requests are not being handled by this
charm, so if cinder-ceph or glance is deployed with
restrict-ceph-pools=True, it will not be configured properly. This
patch ports the implementation of the add-permissions-to-key
handling from the ceph-mon charm, and updates other methods required
to properly set up cinder-ceph and glance ceph pools.

Change-Id: If5950af155e10ee4d140300fd7ed5730798b65f0
Closes-bug: #1836408
2019-10-02 10:44:07 -03:00
Frode Nordahl 2d70bab004 Enable bionic/stein and disco/stein functional tests
Drop explicit install of python-ceph; ceph-common has an
appropriate dependency on the required python{3}-ceph package
so this is not required, and breaks on Stein where Python 2
packages are no longer provided.

Closes-Bug: 1824154
Change-Id: Ia219258f73f038170bc5a070d562e499459fe246
2019-04-10 16:41:15 +01:00
Alex Kavanagh ddd26acc6d Convert the charm to Python3
* Move charmhelpers to the root of the charm
* sync charmhelpers to latest version

Change-Id: Id0b838f0206635cf912d205f2fb6fda7b31d0dfe
2019-03-10 14:16:41 +00:00
David Ames d26fabe674 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: Ifa5ba56af4b120903c2cc3822834c4279cd56acc
2019-02-13 07:59:33 +01:00
Zuul fbdcaad22c Merge "Update source/packages if config changes" 2019-02-11 15:48:42 +00:00
Ryan Beisner a90b30a8f2
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: I97e2d9fa092fd6af5f426977cf99ab735e520496
Closes-bug: #1815243
Partial-bug: #1815231
2019-02-08 15:37:32 -06:00
Chris MacNaughton eca9d8cd28 Update source/packages if config changes
Also, this change removes the harden decorators as
the required configuration for harden is _not_ present
in the charm config, rendering it useless.

Change-Id: I20c124d9588b8fd6c0e6611725a848eaf892f6af
Closes-Bug: #1812219
2019-02-01 11:08:12 +01:00
Corey Bryant 2c7836899d Sync charm-helpers
Change-Id: Ib93a16da251c359cfb19cd1119c9ca60cfbdc2f2
2019-01-11 14:35:13 +00:00
Corey Bryant 609631e658 Sync charm-helpers
Change-Id: Iaa29be49b44c76c4c89cef17b3212502b09d65ac
2019-01-08 15:15:45 +00:00
Ryan Beisner 2fecb7ef40 Sync charm-helpers
Change-Id: Ibccf221d130703949f5538d061cb3eb4f44eb677
2018-11-09 09:17:41 -08:00
Ryan Beisner 48c5998a0c
Fix lint re: py3-first and py2 compat
Change-Id: I2018de28dc4a3767af91a76b9ad8dd1175bec513
2018-11-02 15:27:30 -05:00
David Ames 06ac9046a1 Series Upgrade
Implement the series-upgrade feature allowing to move between Ubuntu
series.

Change-Id: Ic5df91f3560e8928585b25339cef992653dc59d7
2018-10-23 11:52:28 -07:00
Zuul 9198755128 Merge "support custom admin user and user auth" 2018-09-26 09:55:08 +00:00
Dmitrii Shcherbakov 81383a160b support custom admin user and user auth
In order to support cases where pools and keys are pre-created and
ceph-proxy just proxies this data to client applications this change
introduces support for:

* having custom "admin" users which may not actually have admin
privileges on the target cluster (client.admin is probably occupied by
real admins in this case);
* using cephx keys provided via charm config.

Change-Id: I01014b6986f92bf0ad8147a08afa1d61fdd5c088
Closes-bug: #1793991
2018-09-26 10:09:14 +03:00
Dmitrii Shcherbakov 331e8451c6 modify default_caps to match current ceph-mon caps
The current default caps in ceph-proxy are not up to date with
charm-ceph-mon caps.

Change-Id: Iaeb8d4dea9c36f522aeaddf54b19e4947c81a559
Closes-Bug: #1794071
2018-09-24 14:22:58 +03:00
Ryan Beisner df29b5780f 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: I91df2da7be9521689372a2be5f6b7220fee449dd
2018-09-19 13:24:37 +02:00
Ryan Beisner e54c4c0194 Update functional test definitions
Change-Id: I65af0862d9db22cf84c52fb4ff6fe19f6a61d705
2018-08-27 18:13:08 -05:00
Chris MacNaughton a1d1203cff Sync charm-helpers to ensure Rocky support
Change-Id: I40ca34add5d0f0d59895bfbb67000642c57c8fc5
2018-07-13 15:52:22 +02:00
Chris MacNaughton 199da4e739 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: Icd1b53d8672271a5350b630f14f20bbd3b6c8740
Related-Bug: #1698154
2018-06-05 08:12:15 +02:00
David Ames 4f29e1b1fc Enable Bionic as a gate test
Change bionic test from dev to gate for 18.05.

Change-Id: Ice91cd32a8e1b82be80b29e67bdeec32cfa89254
2018-05-11 14:39:41 -07:00
Ryan Beisner 4f2df121f1 Sync charm-helpers
Change-Id: I21920e173b2421b3dd077655b9b01812064b7d68
2018-02-21 14:07:36 -06:00
Ryan Beisner 2b2d710130 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: Ica4baeed1be9fb16ccadc21d45d3bb71899a0aed
2018-01-19 12:07:50 +00:00
Ryan Beisner 0ab6229b0f Sync charm-helpers
Change-Id: I6ff4a1b812057e3a4d67b992dd7b8e4582d8c12c
2017-11-22 18:23:50 +00:00
Ryan Beisner 68e357e73d Sync charm-helpers
Change-Id: I5ef76ecf8171bc96b1dfdc33b6df90fc130b3a76
2017-08-24 16:48:09 -05:00
David Ames 435b3a186b Enable Zesty-Ocata Amulet Tests
- Turn on Zesty-Ocata Amulet test definitions.
- Standardize test-requirements.txt
- Sync charm helpers for various fixes

Change-Id: I1f161137ef00fe835bce8944285341713c2eadfa
2017-05-01 08:42:37 -07:00
Jenkins f3b080606e Merge "Fix alphanumeric comparisons for openstack and ubuntu releases" 2017-04-05 13:12:08 +00:00
Felipe Reyes f250c2274a Set ceph-public-address with monitor-hosts config
charms capable of relating to ceph build the list of monitor hosts
from the ceph-public-address in the relation data or simply using the
private-address field provided by juju.

This patch populates ceph-public-address in the relations with the
list of monitor hosts provided in the configuration, so clients connect
directly to the non juju managed ceph and not to ceph-proxy IP.

Closes-Bug: #1642430
Change-Id: Ib2e3c6a8b0d9fc0b6d729d845a802945b64fc74c
2017-03-29 20:00:55 -03:00
Alex Kavanagh 72060b6ee7 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: I10e3e689aba490118b84b6b9e58df1ba5632d07d
Related-Bug: #1659575
2017-03-29 15:07:07 +01:00
David Ames 8a3d1ad2d0 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: Ia63b663255f5dc52a2a755e8c309b05ba8662a6a
2017-03-09 14:34:13 -08:00
David Ames c50fb62b97 Pre-release charm-helpers sync 17.02
Get each charm up to date with lp:charm-helpers for release testing.

Change-Id: I2b3e5889be3f509ac8b0f317387feba12314cc11
2017-02-14 15:48:17 -08:00
Ryan Beisner 78f2e8db57 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: I37ffb25e72998f4e128222c314423d204282aded
2016-11-28 14:47:30 -06:00
Ryan Beisner e4d436d54b 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: Ie29ee6af6b255ac1a1ac15f666b9d1b3ee9f3ee9
2016-10-10 20:53:56 -05:00
David Ames 1c21a68659 Pre-release charm-helpers sync 16.10
Get each charm up to date with lp:charm-helpers for release testing.

Change-Id: I99a70e75891b3b89b0698227f90dea7bc17c421d
2016-09-30 10:34:57 -07:00
David Ames 6b9d50e2bd 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: Icfe46c617a21ac97eae54752aad5b0ed53aa706a
Partial-Bug: 1601972
2016-07-18 10:14:09 -07:00
David Ames 30e530a6ba Pre-release charm-helpers sync
To begin release testing get each charm up to date with lp:charm-helpers

Change-Id: I62c0e93b0b14cecf47bde1ced5871c0eb57750bd
2016-07-15 10:53:16 -07:00
Chris MacNaughton 93ba89e34e Add testing
This commit adds some unit testing to the helper libraries
as well as amulet testing for the charm itself

Change-Id: I13ff38655773521592c81bb5a6847a516abd943a
2016-07-12 15:44:23 -04:00
Ryan Beisner 15c26abd76 Update .gitreview, fix duplicate requirements
Also fixes tox

Change-Id: If8fe82973557e5aaa17ce42c300d1c74c700baa6
2016-07-06 16:49:03 -04:00
Chris MacNaughton cbf55d6dfd ceph clients can relate through the proxy 2016-06-15 13:44:40 -04:00
Chris MacNaughton 1671d8b0e9 migrating to proxy charm 2016-06-14 14:42:56 -04:00
James Page fc7c60bf09 Defer radosgw key provision until OSD's detected
The RADOS gateway on startup will try to initialize a number
of pools in the Ceph cluster; if no OSD's are present at the
point of startup, this operation is re-tried for a period of
5 minutes.

As ceph-radosgw and ceph-mon are typically deployed in LXC
containers, they are up and running before ceph-osd units
are fully operational, resulting in ceph-radosgw units with
no running radosgw process.

By deferring the provision of keys to related ceph-radosgw
units until ceph-osd units are detected, the chance of this
race happening is greatly reduced.

Also add trailing space to ceph.conf as ceph requires that
configuration files end with a newline.

Change-Id: I2a21f021502bde5c688bd3ac4b84ef24a8bdef68
Closes-Bug: 1577519
Closes-Bug: 1578403
2016-05-19 08:54:47 +01:00
James Page 5d1c1bdfb9 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.

Fixup mocking of apt during load of unit tests and ensure
that tox does not use any site packages, ensuring that
test execution is isolated from installed OS

Change-Id: I0f8d7cb2689f5e4c94390b324850e4e9b6e10eb5
Closes-Bug: 1581171
Closes-Bug: 1581598
Closes-Bug: 1580674
2016-05-18 17:33:46 +01:00
Jenkins 3913c4ad71 Merge "Fix ceph-broker logging" 2016-04-20 12:14:33 +00:00
Edward Hope-Morley 89ac19a257 Sync charm-helpers to get fix for pool_exists()
Change-Id: I87449b1cda34b5c69faf101a0cc3a749160ff543
Closes-Bug: 1572506
2016-04-20 11:58:32 +01:00
Edward Hope-Morley fb86fde988 Fix ceph-broker logging
Also ensure that ceph broker actions return their status
correctly.

Change-Id: Id42612e44acda3326196795f0685878b5d2a2753
Closes-Bug: 1572491
2016-04-20 11:19:30 +01:00