Bug #45279
closedcephadm bootstrap: monmaptool --create: error writing to '/tmp/monmap': (21) Is a directory
0%
Description
Hi,
using cpehadm in order to install octopus on a ubuntu 18.04 fails asap I've tried to install first monitor.
I followed the documentation:
1. install Python3
apt install python3
(missing in the doc)
2. download cephadm
curl --silent --remote-name --location https://github.com/ceph/ceph/raw/octopus/src/cephadm/cephadm
3.
./cephadm add-repo --release octopus INFO:root:Installing repo GPG key from https://download.ceph.com/keys/release.asc... INFO:root:Installing repo file at /etc/apt/sources.list.d/ceph.list... 4.mkdir -p /etc/ceph 5./cephadm bootstrap --mon-ip 192.168.200.101 INFO:cephadm:Verifying podman|docker is present... INFO:cephadm:Verifying lvm2 is present... INFO:cephadm:Verifying time synchronization is in place... INFO:cephadm:Unit chrony.service is enabled and running INFO:cephadm:Repeating the final host check... INFO:cephadm:podman|docker (/usr/bin/docker) is present INFO:cephadm:systemctl is present INFO:cephadm:lvcreate is present INFO:cephadm:Unit chrony.service is enabled and running INFO:cephadm:Host looks OK INFO:root:Cluster fsid: 533a9582-871e-11ea-b8d4-525400fb2a5d INFO:cephadm:Verifying IP 192.168.200.101 port 3300 ... INFO:cephadm:Verifying IP 192.168.200.101 port 6789 ... INFO:cephadm:Mon IP 192.168.200.101 is in CIDR network 192.168.200.0/24 INFO:cephadm:Pulling latest docker.io/ceph/ceph:v15 container... INFO:cephadm:Extracting ceph user uid/gid from container image... INFO:cephadm:Creating initial keys... INFO:cephadm:Creating initial monmap... INFO:cephadm:Non-zero exit code 1 from /usr/bin/docker run --rm --net=host -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=ub-oc-osd1 -v /tmp/ceph-tmpzy64d8te:/tmp/monmap:z --entrypoint /usr/bin/monmaptool docker.io/ceph/ceph:v15 --create --clobber --fsid 533a9582-871e-11ea-b8d4-525400fb2a5d --addv ub-oc-osd1 [v2:192.168.200.101:3300,v1:192.168.200.101:6789] /tmp/monmap INFO:cephadm:/usr/bin/monmaptool:stdout /usr/bin/monmaptool: monmap file /tmp/monmap INFO:cephadm:/usr/bin/monmaptool:stdout /usr/bin/monmaptool: set fsid to 533a9582-871e-11ea-b8d4-525400fb2a5d INFO:cephadm:/usr/bin/monmaptool:stdout /usr/bin/monmaptool: writing epoch 0 to /tmp/monmap (1 monitors) INFO:cephadm:/usr/bin/monmaptool:stderr bufferlist::write_file(/tmp/monmap): failed to open file: (21) Is a directory INFO:cephadm:/usr/bin/monmaptool:stderr monmaptool: error writing to '/tmp/monmap': (21) Is a directory Traceback (most recent call last): File "./cephadm", line 4576, in <module> r = args.func() File "./cephadm", line 1120, in _default_image return func() File "./cephadm", line 2345, in command_bootstrap tmp_monmap.name: '/tmp/monmap:z', File "./cephadm", line 2140, in run self.run_cmd(), desc=self.entrypoint, timeout=timeout) File "./cephadm", line 837, in call_throws raise RuntimeError('Failed command: %s' % ' '.join(command)) RuntimeError: Failed command: /usr/bin/docker run --rm --net=host -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=ub-oc-osd1 -v /tmp/ceph-tmpzy64d8te:/tmp/monmap:z --entrypoint /usr/bin/monmaptool docker.io/ceph/ceph:v15 --create --clobber --fsid 533a9582-871e-11ea-b8d4-525400fb2a5d --addv ub-oc-osd1 [v2:192.168.200.101:3300,v1:192.168.200.101:6789] /tmp/monmap
Updated by Sebastian Wagner almost 4 years ago
- Subject changed from ubuntu 18.04 cephadm install fails to cephadm bootstrap: monmaptool --create: error writing to '/tmp/monmap': (21) Is a directory
- Description updated (diff)
- Priority changed from Normal to High
Updated by Sebastian Wagner over 3 years ago
- Status changed from New to Resolved
I think this is fixed with https://github.com/ceph/ceph/pull/35651
Please reopen if you still see this.
Updated by Ian Yates over 3 years ago
On a fresh Ubuntu 20.04 TLS install I am getting exactly this error when attempting to bootstrap, I am following the ceph installation instructions to the letter and the above fix appears to be in place on the version of cephadm I am using.
Updated by Ian Yates over 3 years ago
Ian Yates wrote:
On a fresh Ubuntu 20.04 LTS install I am getting exactly this error when attempting to bootstrap, I am following the ceph installation instructions to the letter and the above fix appears to be in place on the version of cephadm I am using.
Updated by Michael Tucker over 3 years ago
I am on a fresh Ubuntu 20.04 LTS install and also getting the same error when trying to bootstrap.
root@docker02:/home/spider# MYIP=`ip route get 1.1.1.1 | grep -oP 'src \K\S+'` root@docker02:/home/spider# ./cephadm bootstrap --mon-ip $MYIP Verifying podman|docker is present... Verifying lvm2 is present... Verifying time synchronization is in place... Unit systemd-timesyncd.service is enabled and running Repeating the final host check... podman|docker (/snap/bin/docker) is present systemctl is present lvcreate is present Unit systemd-timesyncd.service is enabled and running Host looks OK Cluster fsid: 189d2110-510d-11eb-9137-7147df6a1932 Verifying IP 10.0.0.12 port 3300 ... Verifying IP 10.0.0.12 port 6789 ... Mon IP 10.0.0.12 is in CIDR network 10.0.0.0/24 Pulling container image docker.io/ceph/ceph:v15... Extracting ceph user uid/gid from container image... Creating initial keys... Creating initial monmap... Non-zero exit code 1 from /snap/bin/docker run --rm --ipc=host --net=host --entrypoint /usr/bin/monmaptool -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=docker02 -v /tmp/ceph-tmp4izlix6a:/tmp/monmap:z docker.io/ceph/ceph:v15 --create --clobber --fsid 189d2110-510d-11eb-9137-7147df6a1932 --addv docker02 [v2:10.0.0.12:3300,v1:10.0.0.12:6789] /tmp/monmap /usr/bin/monmaptool:stdout /usr/bin/monmaptool: monmap file /tmp/monmap /usr/bin/monmaptool:stdout /usr/bin/monmaptool: set fsid to 189d2110-510d-11eb-9137-7147df6a1932 /usr/bin/monmaptool:stdout /usr/bin/monmaptool: writing epoch 0 to /tmp/monmap (1 monitors) /usr/bin/monmaptool:stderr bufferlist::write_file(/tmp/monmap): failed to open file: (21) Is a directory /usr/bin/monmaptool:stderr monmaptool: error writing to '/tmp/monmap': (21) Is a directory Traceback (most recent call last): File "./cephadm", line 6111, in <module> r = args.func() File "./cephadm", line 1399, in _default_image return func() File "./cephadm", line 2935, in command_bootstrap out = CephContainer( File "./cephadm", line 2654, in run out, _, _ = call_throws( File "./cephadm", line 1060, in call_throws raise RuntimeError('Failed command: %s' % ' '.join(command)) RuntimeError: Failed command: /snap/bin/docker run --rm --ipc=host --net=host --entrypoint /usr/bin/monmaptool -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=docker02 -v /tmp/ceph-tmp4izlix6a:/tmp/monmap:z docker.io/ceph/ceph:v15 --create --clobber --fsid 189d2110-510d-11eb-9137-7147df6a1932 --addv docker02 [v2:10.0.0.12:3300,v1:10.0.0.12:6789] /tmp/monmap
root@docker02:/home/spider# /snap/bin/docker run --rm --ipc=host --net=host --entrypoint /usr/bin/monmaptool -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=docker02 -v /tmp/ceph-tmp4izlix6a:/tmp/monmap:z docker.io/ceph/ceph:v15 --create --clobber --fsid 189d2110-510d-11eb-9137-7147df6a1932 --addv docker02 [v2:10.0.0.12:3300,v1:10.0.0.12:6789] /tmp/monmap bufferlist::write_file(/tmp/monmap): failed to open file: (21) Is a directory monmaptool: error writing to '/tmp/monmap': (21) Is a directory /usr/bin/monmaptool: monmap file /tmp/monmap /usr/bin/monmaptool: set fsid to 189d2110-510d-11eb-9137-7147df6a1932 /usr/bin/monmaptool: writing epoch 0 to /tmp/monmap (1 monitors)
Updated by Ian Yates about 3 years ago
I am still seeing the same problem:
# cephadm bootstrap --mon-ip 192.168.1.101 Verifying podman|docker is present... Verifying lvm2 is present... Verifying time synchronization is in place... Unit systemd-timesyncd.service is enabled and running Repeating the final host check... podman|docker (/usr/bin/docker) is present systemctl is present lvcreate is present Unit systemd-timesyncd.service is enabled and running Host looks OK Cluster fsid: 641b125c-583b-11eb-a2b9-03ee4ae367f0 Verifying IP 192.168.1.101 port 3300 ... Verifying IP 192.168.1.101 port 6789 ... Mon IP 192.168.1.101 is in CIDR network 192.168.1.0/24 Pulling container image docker.io/ceph/ceph:v15... Extracting ceph user uid/gid from container image... Creating initial keys... Creating initial monmap... Non-zero exit code 1 from /usr/bin/docker run --rm --ipc=host --net=host --entrypoint /usr/bin/monmaptool -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=nas01 -v /tmp/ceph-tmp6sp3jhv3:/tmp/monmap:z docker.io/ceph/ceph:v15 --create --clobber --fsid 641b125c-583b-11eb-a2b9-03ee4ae367f0 --addv nas01 [v2:192.168.1.101:3300,v1:192.168.1.101:6789] /tmp/monmap /usr/bin/monmaptool:stdout /usr/bin/monmaptool: monmap file /tmp/monmap /usr/bin/monmaptool:stdout /usr/bin/monmaptool: set fsid to 641b125c-583b-11eb-a2b9-03ee4ae367f0 /usr/bin/monmaptool:stdout /usr/bin/monmaptool: writing epoch 0 to /tmp/monmap (1 monitors) /usr/bin/monmaptool:stderr bufferlist::write_file(/tmp/monmap): failed to open file: (21) Is a directory /usr/bin/monmaptool:stderr monmaptool: error writing to '/tmp/monmap': (21) Is a directory Traceback (most recent call last): File "/usr/sbin/cephadm", line 6111, in <module> r = args.func() File "/usr/sbin/cephadm", line 1399, in _default_image return func() File "/usr/sbin/cephadm", line 2935, in command_bootstrap out = CephContainer( File "/usr/sbin/cephadm", line 2654, in run out, _, _ = call_throws( File "/usr/sbin/cephadm", line 1060, in call_throws raise RuntimeError('Failed command: %s' % ' '.join(command)) RuntimeError: Failed command: /usr/bin/docker run --rm --ipc=host --net=host --entrypoint /usr/bin/monmaptool -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=nas01 -v /tmp/ceph-tmp6sp3jhv3:/tmp/monmap:z docker.io/ceph/ceph:v15 --create --clobber --fsid 641b125c-583b-11eb-a2b9-03ee4ae367f0 --addv nas01 [v2:192.168.1.101:3300,v1:192.168.1.101:6789] /tmp/monmap
Updated by Sebastian Wagner about 3 years ago
- Related to Bug #48788: cephadm bootstrap: monmaptool --create: error writing to '/tmp/monmap': (21) Is a directory added
Updated by Sebastian Wagner about 3 years ago
- Status changed from Resolved to New
Updated by Sebastian Wagner about 3 years ago
- Related to Bug #45167: cephadm: mons are not properly deployed added
Updated by Sebastian Wagner about 3 years ago
Could you please verify that /tmp/ceph-tmp6sp3jhv3 is in fact a file?
Then, could you please run the docker command manually?
/usr/bin/docker run --rm --ipc=host --net=host --entrypoint /usr/bin/monmaptool -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=nas01 -v /tmp/ceph-tmp6sp3jhv3:/tmp/monmap:z docker.io/ceph/ceph:v15 --create --clobber --fsid 641b125c-583b-11eb-a2b9-03ee4ae367f0 --addv nas01 [v2:192.168.1.101:3300,v1:192.168.1.101:6789] /tmp/monmap
next step would be to run the container interactively:
/usr/bin/docker run --rm -it --ipc=host --net=host --entrypoint /bin/bash -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=nas01 -v /tmp/ceph-tmp6sp3jhv3:/tmp/monmap:z docker.io/ceph/ceph:v15
Updated by Juan Miguel Olmo MartÃnez about 3 years ago
- Assignee set to Daniel Pivonka
- Priority changed from High to Normal
Updated by Sebastian Wagner almost 3 years ago
- Priority changed from Normal to Low
Updated by Sebastian Wagner almost 3 years ago
- Category set to cephadm (binary)
- Assignee deleted (
Daniel Pivonka)
Updated by Sebastian Wagner over 2 years ago
- Status changed from New to Can't reproduce