list-disks action throws an exception on on bionic/train
Bug #1860339 reported by
Chris MacNaughton
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph OSD Charm |
Triaged
|
Medium
|
Unassigned |
Bug Description
juju run-action ceph-osd/leader list-disks --wait
unit-ceph-osd-2:
UnitId: ceph-osd/2
id: "26"
message: exit status 1
results:
ReturnCode: 1
Stderr: |
Traceback (most recent call last):
File "/var/lib/
import ceph.utils
File "lib/ceph/
from charmhelpers.
ImportError: cannot import name 'owner'
status: failed
Changed in charm-ceph-osd: | |
status: | New → Triaged |
importance: | Undecided → Medium |
To post a comment you must log in.
This does not reproduce when I tried,
ubuntu@ nkshirsagar- bastion: ~/stsstack- bundles/ ceph$ ./generate- bundle. sh -s bionic -r train -n bionic-train-ceph --run
Creating Juju model bionic-train-ceph
...
<snip>
ubuntu@ nkshirsagar- bastion: ~/stsstack- bundles/ ceph$ juju run-action ceph-osd/leader list-disks --wait
unit-ceph-osd-0:
UnitId: ceph-osd/0
id: "2"
results:
blacklist: '[]'
disks: '[''/dev/vdb'']'
non-pristine: '[]'
status: completed
timing:
completed: 2021-08-18 13:00:31 +0000 UTC
enqueued: 2021-08-18 13:00:30 +0000 UTC
started: 2021-08-18 13:00:31 +0000 UTC
/var/lib/ juju/agents/ unit-ceph- osd-0/charm/ hooks/charmhelp ers/core/ host.py does have
def owner(path):
"""Returns a tuple containing the username & groupname owning the path.
:param str path: the string path to retrieve the ownership
name of the user and group owning the path. stat.st_ uid)[0] stat.st_ gid)[0]
:return tuple(str, str): A (username, groupname) tuple containing the
:raises OSError: if the specified path does not exist
"""
stat = os.stat(path)
username = pwd.getpwuid(
groupname = grp.getgrgid(
return username, groupname