Commit Graph

8 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
Hervé Beraud 7cd8f7c31a Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.

Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: I33cd69aca44f48af2766c92ede46ff12367160c5
2021-12-15 10:02:04 +00: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
Ryan Beisner 63c0ebbcd7 Sync charm/ceph helpers, tox, and requirements
Also clean up pre-existing pep8 violations in the
files/* dir which was previously not covered by lint testing.

Also clean-up mocking issues around apt-pkg replacements in the
unit tests.

Also fix py35 issue with enabled_manager_modules() function in the
charmhelpers library (see
https://github.com/juju/charm-helpers/pull/387).

Also fix the functional tests bundles so they actually test the
version of OpenStack that the bundle indicates.

Change-Id: I2c8d84fadc11311c622dd308c4694496872dc157
2019-10-14 18:23:31 +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
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
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
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