Bug #4520
closedceph-disk-prepare intermittently fails on Centos
0%
Description
Probably a timing issue.
[ubuntu@gary-centos-01 ceph-deploy]$ ./ceph-deploy osd create gary-centos-01:/dev/sda
DEBUG:ceph_deploy.osd:Preparing cluster ceph disks gary-centos-01:/dev/sda:
DEBUG:ceph_deploy.osd:Deploying osd to gary-centos-01
DEBUG:ceph_deploy.osd:Host gary-centos-01 is now ready for osd use.
DEBUG:ceph_deploy.osd:Preparing host gary-centos-01 disk /dev/sda journal None activate <function activate at 0xc94050>
INFO:ceph-disk-prepare:Will colocate journal with data on /dev/sda
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
ceph-disk-prepare: OSD preparation error: Command '['partprobe', '/dev/sda']' returned non-zero exit status 1
Creating new GPT entries.
Information: Moved requested sector from 8388574 to 8386560 in
order to align on 2048-sector boundaries.
The operation has completed successfully.
Information: Moved requested sector from 34 to 2048 in
order to align on 2048-sector boundaries.
The operation has completed successfully.
Traceback (most recent call last):
File "./ceph-deploy", line 8, in <module>
load_entry_point('ceph-deploy==0.0.1', 'console_scripts', 'ceph-deploy')()
File "/home/ubuntu/ceph-deploy/ceph_deploy/cli.py", line 95, in main
return args.func(args)
File "/home/ubuntu/ceph-deploy/ceph_deploy/osd.py", line 222, in osd
prepare(args, cfg, activate_prepared_disk=True)
File "/home/ubuntu/ceph-deploy/ceph_deploy/osd.py", line 176, in prepare
dmcrypt_dir=args.dmcrypt_key_dir,
File "/home/ubuntu/ceph-deploy/virtualenv/lib/python2.6/site-packages/pushy-0.5.1-py2.6.egg/pushy/protocol/proxy.py", line 255, in <lambda>
(conn.operator(type_, self, args, kwargs))
File "/home/ubuntu/ceph-deploy/virtualenv/lib/python2.6/site-packages/pushy-0.5.1-py2.6.egg/pushy/protocol/connection.py", line 66, in operator
return self.send_request(type_, (object, args, kwargs))
File "/home/ubuntu/ceph-deploy/virtualenv/lib/python2.6/site-packages/pushy-0.5.1-py2.6.egg/pushy/protocol/baseconnection.py", line 323, in send_request
return self.__handle(m)
File "/home/ubuntu/ceph-deploy/virtualenv/lib/python2.6/site-packages/pushy-0.5.1-py2.6.egg/pushy/protocol/baseconnection.py", line 639, in __handle
raise e
pushy.protocol.proxy.ExceptionProxy: Command '['ceph-disk-prepare', '--', '/dev/sda']' returned non-zero exit status 1
Updated by Anonymous about 11 years ago
Adding "udevadm settle --timeout=10" appears to help, but I don't know if that is appropriate for all platforms. A 5 second sleep works as well.
Updated by Sage Weil about 11 years ago
- Priority changed from Normal to High
where do you put the settle?
Updated by Anonymous about 11 years ago
There are 3 location between sgdisk and partprobe calls. I created a wip-4520 branch that has it.
This fixes the problems with setting up the data partition, but there is still an issue with partprobe getting an error when the journal partition is on the same disk as the data partition.
Updated by Sage Weil about 11 years ago
- Status changed from New to Resolved
commit:9eda8e5d5abf0743a2ad484806cfb2018243515f