ceph-disk: Error: Device is mounted: /dev/sdb1 (Unable to initialize device: /dev/sdb)
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | ceph (Juju Charms Collection) |
Undecided
|
James Page | ||
Bug Description
In back-to-back bare metal test automation, I've encountered multiple of these failures on Vivid-Kilo (stable charms) and Wily-Liberty (next charms). I've found several similar and potentially-related bugs, and this may be a duplicate -- but none appeared to match precisely.
The hardware units are all identical, with single spindles as sda and sdb.
# all 3 ceph units fail with:
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO worker.uniter.jujuc server.go:158 running hook tool "juju-log" ["-l" "ERROR" "Unable to initialize device: /dev/sdb"]
2015-10-14 20:37:37 ERROR juju-log mon:3: Unable to initialize device: /dev/sdb
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO mon-relation-
2015-10-14 20:37:37 INFO juju.worker.
2015-10-14 20:37:37 ERROR juju.worker.
See paste for juju stat, charm revno info, deployer output, mojo output:
http://
http://
| Ryan Beisner (1chb1n) wrote : | #1 |
| summary: |
- vivid-kilo (stable charm on metal) ceph-disk: Error: Device is mounted: - /dev/sdb1 (Unable to initialize device: /dev/sdb) + ceph-disk: Error: Device is mounted: /dev/sdb1 (Unable to initialize + device: /dev/sdb) |
| description: | updated |
| Changed in ceph (Juju Charms Collection): | |
| assignee: | nobody → James Page (james-page) |
| Ryan Beisner (1chb1n) wrote : | #2 |
It is worth noting:
With the automated tests referenced above, the ceph fsid has historically always been the same static uuid value:
fsid: 6547bd3e-
That approach is passing for all upstart-based test targets, but failing on all systemd-based test targets.
When we alter the test to generate a new fsid uuid for each test run, the install hook no longer fails on systemd-based deploys (Vivid-Kilo, Wily-Liberty).
It is as if the new deployment sees the previous environment's fsid on disk, which happens to be the same as the new environment's fsid value, and thusly explodes instead of re-using it.
Vivid-Kilo (next):
ceph/0 active idle 1.24.6.1 1 international-
ceph/1 active idle 1.24.6.1 2 decisive-
ceph/2 active executing 1.24.6.1 3 downright-
Looking into this
| Lirim (lirim-osmani) wrote : | #4 |
I'm on site and trying to deploy ceph (vivid-kilo based system) and being able to reproduce the same error multiple times now, even when changing fsid.
INFO mon-relation-
INFO mon-relation-
INFO mon-relation-
INFO mon-relation-
INFO mon-relation-
INFO mon-relation-
INFO mon-relation-
INFO mon-relation-
INFO mon-relation-
ERROR juju.worker.
| Ryan Beisner (1chb1n) wrote : | #5 |
FWIW - since implementing unique fsids per new deployment in iterative test automation, we've not re-encountered this issue.
| Changed in ceph (Juju Charms Collection): | |
| status: | New → Invalid |

Shortly after posting this bug, originally for v-k/stable, I observed the same for Wily-Liberty using the next charms on metal:
2015-10-14 19:06:17 INFO mon-relation- changed ceph-disk: Error: Device is mounted: /dev/sdb1 changed Traceback (most recent call last): changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/mon- relation- changed" , line 432, in <module> changed hooks.execute( sys.argv) changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/charmhelp ers/core/ hookenv. py", line 672, in execute changed self._hooks[ hook_name] () changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/mon- relation- changed" , line 235, in mon_relation changed reformat_osd(), config( 'ignore- device- errors' )) changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/ceph. py", line 346, in osdize changed osdize_dev(dev, osd_format, osd_journal, reformat_osd, ignore_errors) changed File "/var/lib/ juju/agents/ unit-ceph- 2/charm/ hooks/ceph. py", line 395, in osdize_dev changed raise e changed subprocess. CalledProcessEr ror: Command '['ceph- disk-prepare' , '--fs-type', u'xfs', '--zap-disk', u'/dev/sdb']' returned non-zero exit status 1 uniter. context context.go:543 handling reboot uniter. operation runhook.go:103 hook "mon-relation- changed" failed: exit status 1
2015-10-14 19:06:17 INFO worker.uniter.jujuc server.go:158 running hook tool "juju-log" ["-l" "ERROR" "Unable to initialize device: /dev/sdb"]
2015-10-14 19:06:17 ERROR juju-log mon:3: Unable to initialize device: /dev/sdb
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO mon-relation-
2015-10-14 19:06:17 INFO juju.worker.
2015-10-14 19:06:17 ERROR juju.worker.
2015-10-14 19:06:17 DEBUG juju.worker.uniter modes.go:31 [AGENT-STATUS] failed: run relation-changed (3; ceph/1) hook
http:// paste.ubuntu. com/12785825/
http:// 10.245. 162.77: 8080/view/ Dashboards/ view/Mojo/ job/mojo_ runner_ baremetal/ 559/artifact/