On 15/11/13 01:40, Alfredo Deza wrote:
On Wed, Nov 13, 2013 at 8:30 PM, Xuan Bai <baixuan1981@xxxxxxxxx> wrote:
Hi All,
I am testing install ceph cluster from ceph-deploy 1.3.2, I get a python
error when execute "ceph-deploy disk list".
Here is my output:
[root@ceph-02 my-cluster]# ceph-deploy disk list ceph-02
[ceph_deploy.cli][INFO ] Invoked (1.3.2): /usr/bin/ceph-deploy disk list
ceph-02
[ceph-02][DEBUG ] connected to host: ceph-02
[ceph-02][DEBUG ] detect platform information from remote host
[ceph-02][DEBUG ] detect machine type
[ceph_deploy.osd][INFO ] Distro info: Red Hat Enterprise Linux Server 6.4
Santiago
[ceph_deploy.osd][DEBUG ] Listing disks on ceph-02...
[ceph-02][INFO ] Running command: ceph-disk list
[ceph-02][ERROR ] Traceback (most recent call last):
[ceph-02][ERROR ] File "/usr/sbin/ceph-disk", line 2340, in <module>
[ceph-02][ERROR ] main()
[ceph-02][ERROR ] File "/usr/sbin/ceph-disk", line 2329, in main
[ceph-02][ERROR ] args.func(args)
[ceph-02][ERROR ] File "/usr/sbin/ceph-disk", line 2006, in main_list
[ceph-02][ERROR ] part_uuid = get_partition_uuid(dev)
[ceph-02][ERROR ] File "/usr/sbin/ceph-disk", line 1916, in
get_partition_uuid
[ceph-02][ERROR ] stderr = subprocess.PIPE).stdout.read()
[ceph-02][ERROR ] File "/usr/lib64/python2.6/subprocess.py", line 639, in
__init__
[ceph-02][ERROR ] errread, errwrite)
[ceph-02][ERROR ] File "/usr/lib64/python2.6/subprocess.py", line 1228, in
_execute_child
[ceph-02][ERROR ] raise child_exception
[ceph-02][ERROR ] OSError: [Errno 2] No such file or directory
[ceph-02][ERROR ] Traceback (most recent call last):
[ceph-02][ERROR ] File
"/usr/lib/python2.6/site-packages/ceph_deploy/lib/remoto/process.py", line
68, in run
[ceph-02][ERROR ] reporting(conn, result, timeout)
[ceph-02][ERROR ] File
"/usr/lib/python2.6/site-packages/ceph_deploy/lib/remoto/log.py", line 13,
in reporting
[ceph-02][ERROR ] received = result.receive(timeout)
[ceph-02][ERROR ] File
"/usr/lib/python2.6/site-packages/ceph_deploy/lib/remoto/lib/execnet/gateway_base.py",
line 455, in receive
[ceph-02][ERROR ] raise self._getremoteerror() or EOFError()
[ceph-02][ERROR ] RemoteError: Traceback (most recent call last):
[ceph-02][ERROR ] File
"/usr/lib/python2.6/site-packages/ceph_deploy/lib/remoto/lib/execnet/gateway_base.py",
line 806, in executetask
[ceph-02][ERROR ] function(channel, **kwargs)
[ceph-02][ERROR ] File "", line 35, in _remote_run
[ceph-02][ERROR ] RuntimeError: command returned non-zero exit status: 1
[ceph-02][ERROR ]
[ceph-02][ERROR ]
[ceph_deploy][ERROR ] RuntimeError: Failed to execute command: ceph-disk
list
Oh wow, this looks like `ceph-disk list` actually broke there. What
happens if you run that same command in the remote host?
Does it break exactly the same?
Just encountered this myself:
$ sudo ceph-disk list
Traceback (most recent call last):
File "/usr/sbin/ceph-disk", line 2346, in <module>
main()
File "/usr/sbin/ceph-disk", line 2335, in main
args.func(args)
File "/usr/sbin/ceph-disk", line 2012, in main_list
part_uuid = get_partition_uuid(dev)
File "/usr/sbin/ceph-disk", line 1922, in get_partition_uuid
stderr = subprocess.PIPE).stdout.read()
File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
$ ceph -v
ceph version 0.72-447-g096f9b3 (096f9b3268b998226f1bf081e56bf28a0573121d)
Looks to be caused by lack of sgdisk:
Line 1922 of ceph-disk is highlighted.
def get_partition_uuid(dev):
(base, partnum) = re.match('(\D+)(\d+)', dev).group(1, 2)
out = subprocess.Popen(
[ 'sgdisk', '-i', partnum, base ],
stdout = subprocess.PIPE,
stderr = subprocess.PIPE).stdout.read() <=======
for line in out.splitlines():
m = re.match('Partition unique GUID: (\S+)', line)
if m:
return m.group(1).lower()
return None
(installing sgdisk fixed it).
The 'no such file' text is a bit misleading for these errors, a better
exception might be good (but perhaps tricky to get right).
I wonder if it might be worth adding a check at the start of either
ceph-deploy to look for binaries we are gonna need.
I note that ceph-disk does calls to:
mount
unmount
sgdisk
partprobe
udevadm
mkfs
/bin/mount
/bin/umount
/sbin/initctl
svc
blkid
...which might be the whole set (I wonder about mount vs /bin/mount etc,
we are being a bit inconsistent there).
Regards
Mark
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com