Page MenuHomePhabricator

Cinder: running prepare_cinder_volume results in error
Closed, ResolvedPublic

Description

Following the documentation at: https://wikitech.wikimedia.org/wiki/Help:Adding_Disk_Space_to_Cloud_VPS_instances#Cinder:_Attachable_Block_Storage_for_cloud-vps
will result in an error when you attempt to run sudo prepare_cinder_volume.

Steps to reproduce:

  1. Create a volume in Horizon
  2. Attach the volume to an VM in the desired project
  3. Run on the VM sudo prepare_cinder_volume

Error Log:

root@puppet-lta:~# sudo prepare_cinder_volume
Traceback (most recent call last):
  File "/usr/sbin/prepare_cinder_volume", line 157, in <module>
    devdict = block_dev_dict()
  File "/usr/sbin/prepare_cinder_volume", line 15, in block_dev_dict
    blockdict = json.loads(jsonblocks)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 667815 had a related patch set uploaded (by Zppix; owner: Zppix):
[operations/puppet@production] wmcs: Fix location of lsblk in prepare_cinder_volume

https://gerrit.wikimedia.org/r/667815

Change 667815 merged by Andrew Bogott:
[operations/puppet@production] wmcs: Fix location of lsblk in prepare_cinder_volume

https://gerrit.wikimedia.org/r/667815

The fix works, testing after it was merged into puppet on a cloud instance