UPWORK/ODESK guru: Tips and Tricks for clients

skype: upwork.link , email: [email protected]

Ganeti bug when you try to use special pool and special client for mounting RBD images from special CEPH cluster.

without comments

You can get error message in process work ganeti iwth private ceph cluster, when ganeti must use special pool and special user name. I suppose you already know how add environment for rbd in code of python of ganeti, so as ganeti is very poor guy in this context.

Ganeti tries to parse shell output from command of ‘rbd shomapped’. Child style of coders of google. LOL. And of course is using wrong parameter.

1
2
3
4
5
6
7
8
9
10
11
Sun Oct 15 07:29:03 2017 * disk 0, size 25.0G
Sun Oct 15 07:29:03 2017 * creating instance disks...
Sun Oct 15 07:29:07 2017  - WARNING: Device creation failed
Failure: command execution error:
Can't create block device <Disk(type=rbd, logical_id=('rbd',
'
f6487061-7c8d-4f19-9494-cf2af9d346a0.rbd.disk0'),
children=None, visible as /dev/disk/0,
size=25600m)> on node blade-19-int0.g1.blades.uiip.openstack.by for
instance instance-002.g1.blades.uiip.openstack.by: Can'
t create block device:
rbd showmapped failed (exited with exit code 1):
rbd: unrecognised option '-p'

and of course here is place where is bug:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# pwd
/etc/ganeti/share/ganeti
# egrep -n -R showmapped *
Binary file storage/bdev.pyo matches
storage/bdev.py:1000:                      " device in output of showmapped, for volume: %s", name)
storage/bdev.py:1022:        "showmapped",
>>>>> storage/bdev.py:1039:      showmap_cmd = [constants.RBD_CMD, "showmapped", "-p", pool]
storage/bdev.py:1042:        base.ThrowError("rbd showmapped failed (%s): %s",
storage/bdev.py:1049:    """Parse the json output of `rbd showmapped'.
storage/bdev.py:1051:    This method parses the json output of `
rbd showmapped' and returns the rbd
storage/bdev.py:1055:    @param output: the json output of `rbd showmapped'
storage/bdev.py:1084:    """Parse the (plain / text) output of `
rbd showmapped'.
storage/bdev.py:1086:    This method parses the output of `rbd showmapped' and returns
storage/bdev.py:1091:    @param output: the plain text output of `
rbd showmapped'
storage/bdev.py:1111:    # Check showmapped output, to determine number of fields.
storage/bdev.py:1118:        base.ThrowError("
Cannot parse rbd showmapped output expected %s fields,"
Binary file storage/bdev.pyc matches

Guys! ‘rbd showmapped’ hasn’t parameter for pool!

Written by spectre

October 15th, 2017 at 1:27 pm

Leave a Reply

*