error issuing smartctl command on bcache devices

Bug #1819652 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph OSD Charm
Fix Released
Undecided
Unassigned

Bug Description

2019-03-12 12:27:53 INFO juju-log mon:42: Monitor hosts are ['10.246.114.12:6789', '10.246.114.21:6789', '10.6.16.8:6789']
2019-03-12 12:27:58 DEBUG mon-relation-changed Traceback (most recent call last):
2019-03-12 12:27:58 DEBUG mon-relation-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/mon-relation-changed", line 826, in <module>
2019-03-12 12:27:58 DEBUG mon-relation-changed hooks.execute(sys.argv)
2019-03-12 12:27:58 DEBUG mon-relation-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/charmhelpers/core/hookenv.py", line 909, in execute
2019-03-12 12:27:58 DEBUG mon-relation-changed self._hooks[hook_name]()
2019-03-12 12:27:58 DEBUG mon-relation-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/mon-relation-changed", line 622, in mon_relation
2019-03-12 12:27:58 DEBUG mon-relation-changed emit_cephconf()
2019-03-12 12:27:58 DEBUG mon-relation-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/mon-relation-changed", line 433, in emit_cephconf
2019-03-12 12:27:58 DEBUG mon-relation-changed context = get_ceph_context(upgrading)
2019-03-12 12:27:58 DEBUG mon-relation-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/mon-relation-changed", line 395, in get_ceph_context
2019-03-12 12:27:58 DEBUG mon-relation-changed cephcontext['bdev_discard'] = should_enable_discard(get_devices())
2019-03-12 12:27:58 DEBUG mon-relation-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/utils.py", line 216, in should_enable_discard
2019-03-12 12:27:58 DEBUG mon-relation-changed is_sata30orless(device)):
2019-03-12 12:27:58 DEBUG mon-relation-changed File "/var/lib/juju/agents/unit-ceph-osd-2/charm/hooks/utils.py", line 224, in is_sata30orless
2019-03-12 12:27:58 DEBUG mon-relation-changed result = subprocess.check_output(["/usr/sbin/smartctl", "-i", device])
2019-03-12 12:27:58 DEBUG mon-relation-changed File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
2019-03-12 12:27:58 DEBUG mon-relation-changed **kwargs).stdout
2019-03-12 12:27:58 DEBUG mon-relation-changed File "/usr/lib/python3.6/subprocess.py", line 418, in run
2019-03-12 12:27:58 DEBUG mon-relation-changed output=stdout, stderr=stderr)
2019-03-12 12:27:58 DEBUG mon-relation-changed subprocess.CalledProcessError: Command '['/usr/sbin/smartctl', '-i', '/dev/disk/by-dname/bcache1']' returned non-zero exit status 1.
2019-03-12 12:27:58 ERROR juju.worker.uniter.operation runhook.go:132 hook "mon-relation-changed" failed: exit status 1

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ceph-osd (master)

Reviewed: https://review.openstack.org/642736
Committed: https://git.openstack.org/cgit/openstack/charm-ceph-osd/commit/?id=1e18c645e6356167aaeb54204c8cc10b40c618a2
Submitter: Zuul
Branch: master

commit 1e18c645e6356167aaeb54204c8cc10b40c618a2
Author: Chris MacNaughton <email address hidden>
Date: Tue Mar 12 13:38:22 2019 +0100

    Do not fail when called on an invalid device

    When calling smartctl on bcache devices, we will get
    a non-zero return code. In this case, we fail safe and
    do not enable a potentially unavailable feature. Additionally,
    other possible failures with device identification will
    be caught and safely handled this way.

    Change-Id: Ie10fb24cbfedf98c8bb53b710b95962579d3284e
    Closes-Bug: #1819652

Changed in charm-ceph-osd:
status: New → Fix Committed
James Page (james-page)
Changed in charm-ceph-osd:
milestone: none → 19.04
David Ames (thedac)
Changed in charm-ceph-osd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.