Ceph Nautilus – “Required devices (block and data) not present for bluestore”

When using the new ceph-volume scan and activate commands on ceph Nautilus after an upgrade from Luminous I was getting the following message

[root@ceph2 ~]# ceph-volume simple activate --all
--> activating OSD specified in /etc/ceph/osd/37-11af5440-dadf-40e3-8924-2bbad3ee5b58.json
Running command: /bin/ln -snf /dev/sdh2 /var/lib/ceph/osd/ceph-37/block
Running command: /bin/chown -R ceph:ceph /dev/sdh2
Running command: /bin/systemctl enable ceph-volume@simple-37-11af5440-dadf-40e3-8924-2bbad3ee5b58
Running command: /bin/ln -sf /dev/null /etc/systemd/system/ceph-disk@.service
--> All ceph-disk systemd units have been disabled to prevent OSDs getting triggered by UDEV events
Running command: /bin/systemctl enable --runtime ceph-osd@37
Running command: /bin/systemctl start ceph-osd@37
--> Successfully activated OSD 37 with FSID 11af5440-dadf-40e3-8924-2bbad3ee5b58
--> activating OSD specified in /etc/ceph/osd/11-8c5b0218-4d32-404f-b06b-f6e90906ab7d.json
--> Required devices (block and data) not present for bluestore
--> bluestore devices found: [u'data']
--> RuntimeError: Unable to activate bluestore OSD due to missing devices

You can see one volume activated while the other didn’t.
It turns out this is because one volume was configure for bluestore and the other wasn’t and there is some sort of a bug in the ceph-volume command and when it writes out the /etc/ceph/osd/{OSDID}-GUID.json files it omits the “type”: “filestore” line for any non-bluestore disks, but the ceph-volume activate command assumes it’s a bluestore volume unless otherwise specified in the json file.
The quick and easy fix was to add the line “type”: “filestore”, to the json files for any non-bluestore disks and run ceph-volume simple activate –all again.
Time permitting i’ll hunt down the bug in the scan command and submit a pull request if it’s not already been done