non-existent block device should make deploy fail, not create directory whose name starts with /dev

Bug #1665697 reported by John Fulton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-ceph
Fix Released
Medium
John Fulton

Bug Description

- puppet-ceph can receive a list of block devices to set each up as an OSD.
- if a user passes a block device that doesn't actually exist (/dev/$foo), then the user made a mistake
- in that case the deploy should fail and point out this mistake to the user so they can check if they're hardware is broken and decide what to do
- instead it produces a working deployment but...
- the OSD that should be on a block device is on a directory named /dev/$foo
- this is bad because the user may think they have a real block device backing their OSD when they don't

Changed in puppet-ceph:
assignee: nobody → John Fulton (jfulton-org)
status: New → Confirmed
Revision history for this message
John Fulton (jfulton-org) wrote :

What you get in this scenario is a working directory-based OSD, not block-based directory as the user intended (and they did intend it if they passed /dev/foo along with a list of other block devices).

[root@osd ~]# ls -laF /dev/sdq
total 28
drwxr-xr-x. 3 ceph ceph 220 Feb 17 10:10 ./
drwxr-xr-x. 22 root root 3180 Feb 17 10:10 ../
-rw-r--r--. 1 root root 189 Feb 17 10:10 activate.monmap
-rw-r--r--. 1 ceph ceph 37 Feb 17 10:10 ceph_fsid
drwxr-xr-x. 3 ceph ceph 80 Feb 17 10:10 current/
-rw-r--r--. 1 ceph ceph 37 Feb 17 10:10 fsid
-rw-r--r--. 1 ceph ceph 0 Feb 17 10:10 journal
-rw-r--r--. 1 ceph ceph 21 Feb 17 10:10 magic
-rw-r--r--. 1 ceph ceph 4 Feb 17 10:10 store_version
-rw-r--r--. 1 ceph ceph 53 Feb 17 10:10 superblock
-rw-r--r--. 1 ceph ceph 2 Feb 17 10:10 whoami

Changed in puppet-ceph:
importance: Undecided → Medium
Revision history for this message
John Fulton (jfulton-org) wrote :

plan:

1. has osd.pp do an extra check
https://github.com/openstack/puppet-ceph/blob/master/manifests/osd.pp#L162

2. raise this to ceph upstream as this probably isn't the intended behavior

Revision history for this message
John Fulton (jfulton-org) wrote :

Issue filed with Ceph for allowing 'ceph-disk prepare' to accept a non-exist block devices as an argument http://tracker.ceph.com/issues/18976 .

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-ceph (master)

Fix proposed to branch: master
Review: https://review.openstack.org/435618

Changed in puppet-ceph:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-ceph (master)

Reviewed: https://review.openstack.org/435618
Committed: https://git.openstack.org/cgit/openstack/puppet-ceph/commit/?id=7451d6ea295ca16b6ba3bd2e7ed2412d18f2bec4
Submitter: Jenkins
Branch: master

commit 7451d6ea295ca16b6ba3bd2e7ed2412d18f2bec4
Author: John Fulton <email address hidden>
Date: Fri Feb 17 23:33:46 2017 +0000

    Fail deployment if non-existent block devices are passed for OSDs

    If a user passes a block device, e.g. /dev/sdx, that doesn't actually
    exist, then the user made a mistake and the deployment should fail.
    Without this change if /dev/sdx doesn't exist, then a directory is
    created called /dev/sdx and set up as a directory-backed OSD. This
    patch adds a check to fail the deployment if the requested OSD is
    a directory with a name starting with /dev.

    Change-Id: I5f03fc332b8df3914dc8609a203eb38693cb87a7
    Closes-Bug: 1665697

Changed in puppet-ceph:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-ceph 2.4.0

This issue was fixed in the openstack/puppet-ceph 2.4.0 release.

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.