-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerhub ceph/daemon still calls deprecated ceph-disk command #1395
Comments
How should I create OSD for new disk ? I try using ceph/ceph container but it stuck... |
The osd_ceph_disk entrypoint is just a leftover and will be remove in #1349 (WIP). [1] https://github.com/ceph/ceph-container/blob/master/src/daemon/osd_scenarios/osd_volume_activate.sh |
From the man page for ceph-volume http://docs.ceph.com/docs/mimic/man/8/ceph-volume/, it looks like the create action is just composed of prepare and activate, both of which have entrypoints in the docker image. If I'm operating purely with the containers, do I simply run the image with the osd_ceph_disk_prepare and then the osd_ceph_disk_activate actions with the appropriate environment variables for each partition? After that, the volumes are ready to be used on an ongoing basis by the osd_volume_activate action, right? |
I just tried the osd_ceph_disk_prepare entrypoint, and it seems to have a reference to the ceph-disk executable as well. Looking more closely at the scripts, it looks like they need to be updated as well. The PR for removing ceph-disk support hasn't updated osd_disk_prepare.sh for ceph-volume prepare.
|
Can I run this using ceph/ceph docker image ( daemon-base ) ? Does this ceph/daemon:v4.0.0-stable-4.0-nautilus-centos-7-x86_64 equal to ceph/ceph:v14.2 image. |
After successfully creating ceph_mon using ceph/daemon. I try prepare one of the disk with ceph/ceph image since ceph/daemon doesn't have lvm installed. I'm thinking that perhaps I can prepare the disk using ceph/ceph and run it later using ceph/daemon osd_volume_activate, I prefer not to install any dependency/library on the host. docker run \
--rm \
-it \
--privileged \
-v /etc/ceph:/etc/ceph \
-v /var/lib/ceph:/var/lib/ceph \
-v /dev/:/dev/ \
--network ceph_public \
ceph/ceph:v14.2.1-20190430 \
ceph-volume lvm prepare --data /dev/sdb --bluestore --no-systemd But it stuck here, no error log or any further output (> 30 minute). Is it networking or env problem ? Running command: /bin/ceph-authtool --gen-print-key
Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new 671c32f4-7382-4814-8b5d-f98258ba99e7 Oh and since this is testing environment the disk is only 1GB stderr: [errno 110] error connecting to the cluster
--> RuntimeError: Unable to create a new OSD id So I add the --network and make sure the container can connect to ceph_mon container |
@sychan All
@wiryonolau There's NO entrypoint for the ceph-volume prepare but this can still be done by running the prepare command with the ceph/daemon container image. Because ceph-volume depends on lvm there's some bind mounts required to be able to prepare the OSD. [1] https://github.com/ceph/ceph-ansible/blob/master/library/ceph_volume.py#L190-L199 |
More progress, seems to be working, but I need to test further. I create a logical volume at /dev/vg00/osd00 and successfully prepared it using ceph-volume lvm prepare, then verified it existed using ceph-volume lvm list:
There is a slight inconsistency in the entrypoint script - the underlying function is named osd_volume_activate, but the entrypoint scenario passed to the container is osd_ceph_volume_activate. Once I fixed that, the osd seems to have started properly:
|
I try running using
I use two different network for ceph, ceph_public and ceph_private my monitor is connecting to both network and has both CEPH_PUBLIC_NETWORK and CEPH_CLUSTER_NETWORK environment set to ceph_public subnet and ceph_private subnet docker run \
--rm \
--network=ceph_private \
--privileged=true \
-v /var/lib/ceph:/var/lib/ceph/:z \
-v /var/log/ceph:/var/log/ceph/:z \
-v /etc/ceph:/etc/ceph:z \
-v /dev/:/dev/ \
-v /run/lock/lvm:/run/lock/lvm:z \
-v /run/lvm/:/run/lvm/ \
-v /var/run/udev/:/var/run/udev/:z \
--entrypoint ceph-volume \
ceph/daemon:v4.0.0-stable-4.0-nautilus-centos-7-x86_64 \
lvm prepare --bluestore --data /dev/sdb --no-systemd But it still stuck here with no further output and process still running Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new 16832e57-3442-4cc1-a22f-7da20b677378 |
so ceph-volume doesn't support block device ? |
You can either use a raw/partition or lvm device. http://docs.ceph.com/docs/nautilus/ceph-volume/lvm/prepare/#bluestore |
The ceph-osd process seems to run, and there aren't any errors in the logs that I can see. When I bring up the ceph-mds daemon, it seems to come up without any errors.
Is there some configuration of the osd or rgw that needs to occur which I've missed? |
Since I'm testing I've been using Virtualbox, my host is Ubuntu 18.04. Does this cause the stuck issue ? Disk is using vmdk , I increase it to 8GB. Does ceph-volume has debug mode ? [2019-06-12 22:15:43,370][ceph_volume.process][INFO ] stdout ID_SERIAL_SHORT=VBc3c9780e-066c380f
[2019-06-12 22:15:43,370][ceph_volume.process][INFO ] stdout ID_TYPE=disk
[2019-06-12 22:15:43,370][ceph_volume.process][INFO ] stdout MAJOR=8
[2019-06-12 22:15:43,370][ceph_volume.process][INFO ] stdout MINOR=16
[2019-06-12 22:15:43,370][ceph_volume.process][INFO ] stdout SUBSYSTEM=block
[2019-06-12 22:15:43,370][ceph_volume.process][INFO ] stdout TAGS=:systemd:
[2019-06-12 22:15:43,370][ceph_volume.process][INFO ] stdout USEC_INITIALIZED=79509
[2019-06-12 22:15:43,371][ceph_volume.process][INFO ] Running command: /bin/ceph-authtool --gen-print-key
[2019-06-12 22:15:48,724][ceph_volume.process][INFO ] stdout AQCPeQFdHT7XKhAAC31kttToTro1qMXNd6TsbA==
[2019-06-12 22:15:48,727][ceph_volume.process][INFO ] Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new 1194f9a0-da6b-42ee-b6a3-353f385b592c
# No more output after this |
I resolved the timeout issue - it seems to be related to the fact that the mds cephfs was stuck in up:creating state. Once I resolved that, the rgw came up. At this point, I think I'm good, but wiryonolau seems to still need resolution of his issues. For what its worth, he's my docker command for ceph-volume prepare
I used vgcreate on 2 partitions to create vg00 and then used lvm create the logical volume passed to ceph-volume. |
Hi sychan, have you ever try preparing using raw device directly ? |
This is my configuration ceph.conf [global]
fsid = 21934058-a989-498e-840e-d4ce729b7cf8
mon initial members = mon1
mon host = 192.168.20.32
public network = 192.168.20.0/24
cluster network = 192.168.21.0/24
osd journal size = 100
log file = /dev/null
osd_memory_target = 642170880
osd_memory_base = 347299840
osd_memory_cache_min = 494735360 ceph.mon.keyring [mon.]
key = AQCWwgFdh7p/NhAAkL+9rwA+g6bHnCaY8CQ5gw==
caps mon = "allow *"
[client.admin]
key = AQCRwgFduBGuMhAADG7tBbI1KE9IkPbq9GzNNA==
caps mds = "allow *"
caps mgr = "allow *"
caps mon = "allow *"
caps osd = "allow *" ceph.client.admin.keyring [client.admin]
key = AQCRwgFduBGuMhAADG7tBbI1KE9IkPbq9GzNNA==
caps mds = "allow *"
caps mgr = "allow *"
caps mon = "allow *"
caps osd = "allow *" I test by creating logical volume first instead of using raw device pvcreate /dev/sdb
vgcreate vg00 /dev/sdb
lvcreate -n osd_sdb -l 100%FREE vg00
#lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 8G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 7G 0 part
├─centos-root 253:0 0 6.2G 0 lvm /
└─centos-swap 253:1 0 820M 0 lvm [SWAP]
sdb 8:16 0 8G 0 disk
└─vg00-osd_sdb 253:2 0 8G 0 lvm
sr0 11:0 1 1024M 0 rom
Then prepare the container docker run \
--rm \
--privileged=true \
--network=ceph_private \
-v /var/lib/ceph:/var/lib/ceph/ \
-v /var/log/ceph:/var/log/ceph/ \
-v /etc/ceph:/etc/ceph \
-v /dev/:/dev/ \
-v /run/lock/lvm:/run/lock/lvm:z \
-v /run/lvm/:/run/lvm/ \
-v /var/run/udev/:/var/run/udev/:z \
--entrypoint ceph-volume \
ceph/daemon:v4.0.0-stable-4.0-nautilus-centos-7-x86_64 \
lvm prepare --bluestore --data /dev/vg00/osd_sdb --no-systemd This is the latest log in /var/log/ceph/ceph-volume.log [2019-06-13 03:17:10,420][ceph_volume.main][INFO ] Running command: ceph-volume lvm prepare --bluestore --data /dev/vg00/osd_sdb
[2019-06-13 03:17:10,466][ceph_volume.process][INFO ] Running command: /usr/sbin/dmsetup splitname --noheadings --separator=';' --nameprefixes /dev/mapper/vg00-osd_sdb
[2019-06-13 03:17:10,749][ceph_volume.process][INFO ] stdout DM_VG_NAME='/dev/mapper/vg00'';'DM_LV_NAME='osd_sdb'';'DM_LV_LAYER=''
[2019-06-13 03:17:10,750][ceph_volume.process][INFO ] Running command: /usr/sbin/lvs --noheadings --readonly --separator=";" -o lv_tags,lv_path,lv_name,vg_name,lv_uuid,lv_size
[2019-06-13 03:17:11,049][ceph_volume.process][INFO ] stdout ";"/dev/centos/root";"root";"centos";"8r0Ajm-Luiz-i2oh-zJVK-ieqD-DM5o-jqPoiY";"<6.20g
[2019-06-13 03:17:11,049][ceph_volume.process][INFO ] stdout ";"/dev/centos/swap";"swap";"centos";"teX3SE-DziB-aUyh-J0Pc-NVRO-zu2p-r7ibIQ";"820.00m
[2019-06-13 03:17:11,049][ceph_volume.process][INFO ] stdout ";"/dev/vg00/osd_sdb";"osd_sdb";"vg00";"Ao06Q3-DvE8-VqgK-9vsm-u7kd-zsXu-os0qmD";"<8.00g
[2019-06-13 03:17:11,049][ceph_volume.process][INFO ] Running command: /usr/sbin/dmsetup splitname --noheadings --separator=';' --nameprefixes /dev/mapper/centos-root
[2019-06-13 03:17:11,332][ceph_volume.process][INFO ] stdout DM_VG_NAME='/dev/mapper/centos'';'DM_LV_NAME='root'';'DM_LV_LAYER=''
[2019-06-13 03:17:11,332][ceph_volume.process][INFO ] Running command: /usr/sbin/lvs --noheadings --readonly --separator=";" -o lv_tags,lv_path,lv_name,vg_name,lv_uuid,lv_size
[2019-06-13 03:17:11,631][ceph_volume.process][INFO ] stdout ";"/dev/centos/root";"root";"centos";"8r0Ajm-Luiz-i2oh-zJVK-ieqD-DM5o-jqPoiY";"<6.20g
[2019-06-13 03:17:11,631][ceph_volume.process][INFO ] stdout ";"/dev/centos/swap";"swap";"centos";"teX3SE-DziB-aUyh-J0Pc-NVRO-zu2p-r7ibIQ";"820.00m
[2019-06-13 03:17:11,631][ceph_volume.process][INFO ] stdout ";"/dev/vg00/osd_sdb";"osd_sdb";"vg00";"Ao06Q3-DvE8-VqgK-9vsm-u7kd-zsXu-os0qmD";"<8.00g
[2019-06-13 03:17:11,632][ceph_volume.process][INFO ] Running command: /usr/sbin/dmsetup splitname --noheadings --separator=';' --nameprefixes /dev/mapper/centos-swap
[2019-06-13 03:17:11,917][ceph_volume.process][INFO ] stdout DM_VG_NAME='/dev/mapper/centos'';'DM_LV_NAME='swap'';'DM_LV_LAYER=''
[2019-06-13 03:17:11,917][ceph_volume.process][INFO ] Running command: /usr/sbin/lvs --noheadings --readonly --separator=";" -o lv_tags,lv_path,lv_name,vg_name,lv_uuid,lv_size
[2019-06-13 03:17:12,217][ceph_volume.process][INFO ] stdout ";"/dev/centos/root";"root";"centos";"8r0Ajm-Luiz-i2oh-zJVK-ieqD-DM5o-jqPoiY";"<6.20g
[2019-06-13 03:17:12,217][ceph_volume.process][INFO ] stdout ";"/dev/centos/swap";"swap";"centos";"teX3SE-DziB-aUyh-J0Pc-NVRO-zu2p-r7ibIQ";"820.00m
[2019-06-13 03:17:12,217][ceph_volume.process][INFO ] stdout ";"/dev/vg00/osd_sdb";"osd_sdb";"vg00";"Ao06Q3-DvE8-VqgK-9vsm-u7kd-zsXu-os0qmD";"<8.00g
[2019-06-13 03:17:12,218][ceph_volume.process][INFO ] Running command: /usr/sbin/lvs --noheadings --readonly --separator=";" -o lv_tags,lv_path,lv_name,vg_name,lv_uuid,lv_size
[2019-06-13 03:17:12,513][ceph_volume.process][INFO ] stdout ";"/dev/centos/root";"root";"centos";"8r0Ajm-Luiz-i2oh-zJVK-ieqD-DM5o-jqPoiY";"<6.20g
[2019-06-13 03:17:12,513][ceph_volume.process][INFO ] stdout ";"/dev/centos/swap";"swap";"centos";"teX3SE-DziB-aUyh-J0Pc-NVRO-zu2p-r7ibIQ";"820.00m
[2019-06-13 03:17:12,513][ceph_volume.process][INFO ] stdout ";"/dev/vg00/osd_sdb";"osd_sdb";"vg00";"Ao06Q3-DvE8-VqgK-9vsm-u7kd-zsXu-os0qmD";"<8.00g
[2019-06-13 03:17:12,514][ceph_volume.process][INFO ] Running command: /bin/udevadm info --query=property /dev/vg00/osd_sdb
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DEVLINKS=/dev/disk/by-id/dm-name-vg00-osd_sdb /dev/disk/by-id/dm-uuid-LVM-kArlh4zXPPWV93IoDED81jrTTlXhzetHAo06Q3DvE8VqgK9vsmu7kdzsXuos0qmD /dev/mapper/vg00-osd_sdb /dev/vg00/osd_sdb
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DEVNAME=/dev/dm-2
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DEVPATH=/devices/virtual/block/dm-2
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DEVTYPE=disk
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DM_LV_NAME=osd_sdb
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DM_NAME=vg00-osd_sdb
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DM_SUSPENDED=0
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DM_UDEV_PRIMARY_SOURCE_FLAG=1
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DM_UDEV_RULES_VSN=2
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DM_UUID=LVM-kArlh4zXPPWV93IoDED81jrTTlXhzetHAo06Q3DvE8VqgK9vsmu7kdzsXuos0qmD
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout DM_VG_NAME=vg00
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout MAJOR=253
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout MINOR=2
[2019-06-13 03:17:12,797][ceph_volume.process][INFO ] stdout SUBSYSTEM=block
[2019-06-13 03:17:12,798][ceph_volume.process][INFO ] stdout TAGS=:systemd:
[2019-06-13 03:17:12,798][ceph_volume.process][INFO ] stdout USEC_INITIALIZED=5998142
[2019-06-13 03:17:12,798][ceph_volume.process][INFO ] Running command: /bin/ceph-authtool --gen-print-key
[2019-06-13 03:17:18,115][ceph_volume.process][INFO ] stdout AQA5wAFdueSEBhAAFAU4QFofUZT9qxWaDVn5xA==
[2019-06-13 03:17:18,116][ceph_volume.process][INFO ] Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new d7f2af93-182c-47d9-8535-62cd1b028033
###NO FURTHER OUTPUT AND OSD NOT PREPARED### Shoud I open a new issue ? |
The OSD creation in the ceph-volume is fine but it seems to stuck when adding the OSD to the cluster so it's probably network related. Maybe you could try to change |
Yep apparently it's network problem, I need to use ceph_public network though. ceph_private network is not usable even if it able to connect to ceph_mon. I got better error log now that mention keyring, so it should be easy to solve. |
I've been trying the workaround above
The prepare is successful but when it goes into activate I see the following error
It's not clear to me what file is causing the error when it can't be found. I'm on a Cent OS 7 host machine. |
solved, use this in nautilus docker, image is ceph/daemon:latest-nautilus-devel:
|
Hi ! Thanks ! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The nautilus docker conainer are next to unusable. The help interface suggests osd-disk commands that do not exist. The Readme suggests commands that do not exist, existing documentation is for outdated releases. So far, a frustrating experience |
yep啦啦啦呜呜呜 |
哥们是不是打错了? |
Is this a bug report or feature request?
Bug Report
What happened:
As of 6/7/2019 the ceph/daemon:latest image still exhibits the bug that was supposed to be fixed in PR1325 labelled "daemon/osd: Migrate ceph-disk to ceph-volume"
When trying to start an OSD using the osd or osd_ceph_disk entrypoints, the container crashed out with the message:
/opt/ceph-container/bin/osd_disk_prepare.sh: line 46: ceph-disk: command not found
What you expected to happen:
The PR was merged 3/25/2019, and the metadata on the docker image shows a build date of 6/7/2019:
So I would expect that this problem would no longer occur. Is there a different image or a different entrypoint I should be using?
How to reproduce it (minimal and precise):
Follow instructions in https://geek-cookbook.funkypenguin.co.nz/ha-docker-swarm/shared-storage-ceph/
Environment:
uname -a
): 3.10.0-957.10.1.el7.x86_64 Improve README #1 SMP Mon Mar 18 15:06:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linuxdocker version
): 18.09.5ceph -v
): ceph version 14.2.1 (d555a9489eb35f84f2e1ef49b77e19da9d113972) nautilus (stable)The text was updated successfully, but these errors were encountered: