Rename lib/ceph to lib/charms_ceph

The new python3-ceph-common deb package (introduced in ceph octopus)
adds a new ceph directory (a parent package in python terms) in
/usr/lib/python3/dist-packages/ceph/. This results in a conflict with
charm-ceph-osd/lib/ceph/. For example, with the current import of
ceph.utils in hooks/hooks.py, Python finds no utils.py in
/usr/lib/python3/dist-packages/ceph/ and then stops searching.
Therefore, rename lib/ceph to lib/charms_ceph to avoid the conflict.

Depends-On: https://review.opendev.org/#/c/709226
Change-Id: I433537805ae56dc7a42e9d34ea6d491ffb4c79c0
This commit is contained in:
Corey Bryant 2020-02-21 21:11:49 +00:00
parent 0d7c37e51a
commit 6a22c99d4d
5 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ import uuid
sys.path.append('lib')
import ceph_rgw as ceph
import ceph.utils as ceph_utils
import charms_ceph.utils as ceph_utils
import multisite
from charmhelpers.core.hookenv import (

View File

@ -18,11 +18,11 @@ import os
from tempfile import NamedTemporaryFile
from ceph.utils import (
from charms_ceph.utils import (
get_cephfs,
get_osd_weight
)
from ceph.crush_utils import Crushmap
from charms_ceph.crush_utils import Crushmap
from charmhelpers.core.hookenv import (
log,