Project

General

Profile

Bug #44119

Updated by Sebastian Wagner about 4 years ago

h2. After downloading cephadm: 

 
 <pre> 
 host $    vagrant ssh 
 vagrant@ubuntu1804:~$ sudo su - 
 root@ubuntu1804:~# curl --silent --remote-name --location https://github.com/ceph/ceph/raw/master/src/cephadm/cephadm 
 root@ubuntu1804:~# chmod +x cephadm 
 </pre> 

 h2. First attempt fails cause of the missing distutils:  

  
 <pre> 
 root@ubuntu1804:~# sudo ./cephadm bootstrap --mon-ip 127.0.0.1 
 Traceback (most recent call last): 
   File "./cephadm", line 59, in <module> 
     from distutils.spawn import find_executable 
 ModuleNotFoundError: No module named 'distutils.spawn' 
 root@ubuntu1804:~# apt install python3-distutils 
 Reading package lists... Done 
 Building dependency tree        
 Reading state information... Done 
 The following additional packages will be installed: 
   python3-lib2to3 
 The following NEW packages will be installed: 
   python3-distutils python3-lib2to3 
 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. 
 Need to get 222 kB of archives. 
 After this operation, 3,143 kB of additional disk space will be used. 
 Do you want to continue? [Y/n]  
 Get:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-lib2to3 all 3.6.9-1~18.04 [77.4 kB] 
 Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-distutils all 3.6.9-1~18.04 [144 kB] 
 Fetched 222 kB in 5s (48.2 kB/s)        
 Selecting previously unselected package python3-lib2to3. 
 (Reading database ... 105592 files and directories currently installed.) 
 Preparing to unpack .../python3-lib2to3_3.6.9-1~18.04_all.deb ... 
 Unpacking python3-lib2to3 (3.6.9-1~18.04) ... 
 Selecting previously unselected package python3-distutils. 
 Preparing to unpack .../python3-distutils_3.6.9-1~18.04_all.deb ... 
 Unpacking python3-distutils (3.6.9-1~18.04) ... 
 Setting up python3-lib2to3 (3.6.9-1~18.04) ... 
 Setting up python3-distutils (3.6.9-1~18.04) ... 
 </pre> 

 h2. Second attempt fails, cause of missing podman. 

 This is not yet a documented at https://docs.ceph.com/docs/master/bootstrap/#get-cephadm 
 <pre> 
 root@ubuntu1804:~# sudo ./cephadm bootstrap --mon-ip 127.0.0.1 
 Unable to locate any of ['podman', 'docker'] 
 root@ubuntu1804:~# apt -y install software-properties-common 
 Reading package lists... Done 
 Building dependency tree        
 Reading state information... Done 
 software-properties-common is already the newest version (0.96.24.32.11). 
 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 
 root@ubuntu1804:~# add-apt-repository -y ppa:projectatomic/ppa 
 Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease 
 Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] 
 Get:3 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] 
 Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [642 kB] 
 Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [853 kB] 
 Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [298 kB] 
 Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [30.2 kB] 
 Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted i386 Packages [9,568 B] 
 Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [7,928 B] 
 Get:10 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [1,007 kB] 
 Get:11 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,048 kB] 
 Get:12 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [324 kB] 
 Get:13 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse i386 Packages [7,476 B] 
 Get:14 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [9,700 B] 
 Get:15 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [4,576 B] 
 Get:16 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4,028 B] 
 Get:17 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe i386 Packages [4,028 B] 
 Get:18 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [1,900 B] 
 Get:19 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] 
 Get:20 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [437 kB] 
 Get:21 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [636 kB] 
 Get:22 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [208 kB] 
 Get:23 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [21.2 kB] 
 Get:24 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [5,984 B] 
 Get:25 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [616 kB] 
 Get:26 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [644 kB] 
 Get:27 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [217 kB] 
 Get:28 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6,340 B] 
 Get:29 http://security.ubuntu.com/ubuntu bionic-security/multiverse i386 Packages [4,292 B] 
 Get:30 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [2,640 B] 
 Get:31 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic InRelease [21.3 kB]                                                                                                                                                                         
 Get:32 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 Packages [2,936 B]                                                                                                                                                               
 Get:33 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main i386 Packages [2,936 B]                                                                                                                                                                
 Get:34 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main Translation-en [1,496 B]                                                                                                                                                               
 Fetched 7,329 kB in 10s (744 kB/s)                                                                                                                                                                                                                          
 Reading package lists... Done 
 root@ubuntu1804:~# sudo apt -y install podman 
 Reading package lists... Done 
 Building dependency tree        
 Reading state information... Done 
 The following additional packages will be installed: 
   conmon containernetworking-plugins containers-common containers-golang containers-image cri-o-runc libgpgme11 libvarlink slirp4netns 
 The following NEW packages will be installed: 
   conmon containernetworking-plugins containers-common containers-golang containers-image cri-o-runc libgpgme11 libvarlink podman slirp4netns 
 0 upgraded, 10 newly installed, 0 to remove and 81 not upgraded. 
 Need to get 16.0 MB of archives. 
 After this operation, 87.9 MB of additional disk space will be used. 
 Get:1 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 conmon amd64 2.0.3-1~ubuntu18.04~ppa1 [25.8 kB] 
 Get:2 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 containers-golang all 0.3.1-1~ubuntu18.04~ppa3 [3,632 B] 
 Get:3 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 containers-image all 5.0.0-1~ubuntu18.04~ppa1 [1,580 B] 
 Get:4 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 containers-common all 0.1.40-1~ubuntu18.04~ppa1 [4,684 B] 
 Get:5 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 libvarlink amd64 18-2~ubuntu18.04~ppa4 [46.9 kB] 
 Get:6 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 cri-o-runc amd64 1.0.0-rc8-1~ubuntu18.04~ppa1 [1,600 kB] 
 Get:7 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 podman amd64 1.6.2-1~ubuntu18.04~ppa1 [7,800 kB] 
 Get:8 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 slirp4netns amd64 0.4.2-1~ubuntu18.04~ppa1 [69.6 kB] 
 Get:9 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic/main amd64 containernetworking-plugins amd64 0.8.3-1~ubuntu18.04~ppa1 [6,287 kB] 
 Get:10 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgpgme11 amd64 1.10.0-1ubuntu2 [111 kB] 
 Fetched 16.0 MB in 9s (1,680 kB/s)                                                          
 Selecting previously unselected package conmon. 
 (Reading database ... 105993 files and directories currently installed.) 
 Preparing to unpack .../0-conmon_2.0.3-1~ubuntu18.04~ppa1_amd64.deb ... 
 Unpacking conmon (2.0.3-1~ubuntu18.04~ppa1) ... 
 Selecting previously unselected package containers-golang. 
 Preparing to unpack .../1-containers-golang_0.3.1-1~ubuntu18.04~ppa3_all.deb ... 
 Unpacking containers-golang (0.3.1-1~ubuntu18.04~ppa3) ... 
 Selecting previously unselected package containers-image. 
 Preparing to unpack .../2-containers-image_5.0.0-1~ubuntu18.04~ppa1_all.deb ... 
 Unpacking containers-image (5.0.0-1~ubuntu18.04~ppa1) ... 
 Selecting previously unselected package containers-common. 
 Preparing to unpack .../3-containers-common_0.1.40-1~ubuntu18.04~ppa1_all.deb ... 
 Unpacking containers-common (0.1.40-1~ubuntu18.04~ppa1) ... 
 Selecting previously unselected package libgpgme11:amd64. 
 Preparing to unpack .../4-libgpgme11_1.10.0-1ubuntu2_amd64.deb ... 
 Unpacking libgpgme11:amd64 (1.10.0-1ubuntu2) ... 
 Selecting previously unselected package libvarlink. 
 Preparing to unpack .../5-libvarlink_18-2~ubuntu18.04~ppa4_amd64.deb ... 
 Unpacking libvarlink (18-2~ubuntu18.04~ppa4) ... 
 Selecting previously unselected package cri-o-runc. 
 Preparing to unpack .../6-cri-o-runc_1.0.0-rc8-1~ubuntu18.04~ppa1_amd64.deb ... 
 Unpacking cri-o-runc (1.0.0-rc8-1~ubuntu18.04~ppa1) ... 
 Selecting previously unselected package podman. 
 Preparing to unpack .../7-podman_1.6.2-1~ubuntu18.04~ppa1_amd64.deb ... 
 Unpacking podman (1.6.2-1~ubuntu18.04~ppa1) ... 
 Selecting previously unselected package slirp4netns. 
 Preparing to unpack .../8-slirp4netns_0.4.2-1~ubuntu18.04~ppa1_amd64.deb ... 
 Unpacking slirp4netns (0.4.2-1~ubuntu18.04~ppa1) ... 
 Selecting previously unselected package containernetworking-plugins. 
 Preparing to unpack .../9-containernetworking-plugins_0.8.3-1~ubuntu18.04~ppa1_amd64.deb ... 
 Unpacking containernetworking-plugins (0.8.3-1~ubuntu18.04~ppa1) ... 
 Setting up cri-o-runc (1.0.0-rc8-1~ubuntu18.04~ppa1) ... 
 Setting up slirp4netns (0.4.2-1~ubuntu18.04~ppa1) ... 
 Setting up containers-image (5.0.0-1~ubuntu18.04~ppa1) ... 
 Setting up libgpgme11:amd64 (1.10.0-1ubuntu2) ... 
 Setting up containers-golang (0.3.1-1~ubuntu18.04~ppa3) ... 
 Setting up libvarlink (18-2~ubuntu18.04~ppa4) ... 
 Setting up conmon (2.0.3-1~ubuntu18.04~ppa1) ... 
 Setting up containers-common (0.1.40-1~ubuntu18.04~ppa1) ... 
 Setting up containernetworking-plugins (0.8.3-1~ubuntu18.04~ppa1) ... 
 Setting up podman (1.6.2-1~ubuntu18.04~ppa1) ... 
 Processing triggers for man-db (2.8.3-2ubuntu0.1) ... 
 Processing triggers for libc-bin (2.27-3ubuntu1) ... 
 </pre> 

 h2. Third attempt fails, cause of the fqdn hostname. 

 This is not yet a documented: 
 <pre> 
 root@ubuntu1804:~# sudo ./cephadm bootstrap --mon-ip 127.0.0.1 
 ERROR: hostname is a fully qualified domain name (ubuntu1804.localdomain); either fix (e.g., "sudo hostname ubuntu1804" or similar) or pass --allow-fqdn-hostname 
 root@ubuntu1804:~# hostname 
 ubuntu1804.localdomain 
 root@ubuntu1804:~# reboot 
 Connection to 192.168.121.182 closed by remote host. 
 Connection to 192.168.121.182 closed. 
 host $    vagrant ssh 
 Last login: Thu Feb 13 12:40:46 2020 from 192.168.121.1 
 vagrant@ubuntu1804:~$ sudo su - 
 root@ubuntu1804:~# hostname 
 ubuntu1804.localdomain 
 root@ubuntu1804:~# hostnamectl set-hostname ubuntu1804 
 root@ubuntu1804:~# reboot 
 Connection to 192.168.121.182 closed by remote host. 
 Connection to 192.168.121.182 closed. 
 host $    vagrant ssh                   
 Last login: Thu Feb 13 12:46:59 2020 from 192.168.121.1 
 </pre> 

 h2. Fourth attempt fails, cause of the missing docker registry.h2.  

 This is not yet a documented: 
 <pre> 
 root@ubuntu1804:~# ./cephadm bootstrap --mon-ip 127.0.0.1      
 INFO:root:Cluster fsid: 206361e0-4e5f-11ea-a110-5254005c2d4e 
 INFO:cephadm:Verifying IP 127.0.0.1 port 3300 ... 
 INFO:cephadm:Verifying IP 127.0.0.1 port 6789 ... 
 INFO:cephadm:Pulling latest ceph/daemon-base:latest-master-devel container... 
 INFO:cephadm:Non-zero exit code 125 from /usr/bin/podman pull ceph/daemon-base:latest-master-devel 
 INFO:cephadm:/usr/bin/podman:stderr Error: error pulling image "ceph/daemon-base:latest-master-devel": unable to pull ceph/daemon-base:latest-master-devel: image name provided is a short name and no search registries are defined in the registries config file. 
 Traceback (most recent call last): 
   File "./cephadm", line 3241, in <module> 
     r = args.func() 
   File "./cephadm", line 1658, in command_bootstrap 
     call_throws([container_path, 'pull', args.image]) 
   File "./cephadm", line 499, in call_throws 
     raise RuntimeError('Failed command: %s' % ' '.join(command)) 
 RuntimeError: Failed command: /usr/bin/podman pull ceph/daemon-base:latest-master-devel 
 root@ubuntu1804:~# echo -e "[registries.search]\nregistries = ['docker.io']" | sudo tee /etc/containers/registries.conf 
 [registries.search] 
 registries = ['docker.io'] 
 </pre> 

 h2. Fifth attempts succeeds: 
 <pre> 
 root@ubuntu1804:~# ./cephadm bootstrap --mon-ip 127.0.0.1                                                               
 INFO:root:Cluster fsid: 4278ba46-4e5f-11ea-a110-5254005c2d4e 
 INFO:cephadm:Verifying IP 127.0.0.1 port 3300 ... 
 INFO:cephadm:Verifying IP 127.0.0.1 port 6789 ... 
 INFO:cephadm:Pulling latest ceph/daemon-base:latest-master-devel container... 
 INFO:cephadm:Extracting ceph user uid/gid from container image... 
 INFO:cephadm:Creating initial keys... 
 INFO:cephadm:Creating initial monmap... 
 INFO:cephadm:Creating mon... 
 INFO:cephadm:Waiting for mon to start... 
 INFO:cephadm:Waiting for mon... 
 <pre> 

Back