gbraad-redhat / minishift

0 stars 2 forks source link

Add support for Fedora-based LiveCD #4

Open gbraad opened 7 years ago

gbraad commented 7 years ago

Add (experimental) support for a Fedora-based LiveCD:

Note: Some issues were encountered during the creation of the Fedora-based LiveCD, mostly related to newer versions and changed behaviour. These minor fixes will be backported to the minishift-centos-iso repository.

gbraad commented 7 years ago

After adding a provisioner option https://github.com/gbraad/minishift-fedora-iso/issues/1 the deployment now fails with:

$ minishift start --iso-url file:///media/storage/workspaces/minishift-fedora-iso/build/minishift-fedora.iso                                              
-- Checking if KVM driver is installed ... 
   Driver is available at /usr/local/bin/docker-machine-driver-kvm ... OK
-- Starting local OpenShift cluster using 'kvm' hypervisor ...
-- Minishift VM will be configured with ...
   Memory:    2 GB
   vCPUs :    2
   Disk size: 20 GB
-- Starting Minishift VM ... OK 
   Setting hostname ... OK
-- Checking for IP address ... OK
...
-- OpenShift cluster will be configured with ...
   Version: v3.6.0
-- Checking `oc` support for startup flags ... 
   host-pv-dir ... OK
   host-volumes-dir ... OK
   routing-suffix ... OK
   host-config-dir ... OK
   host-data-dir ... OK
Starting OpenShift using openshift/origin:v3.6.0 ...
...
   Image pull complete
-- Checking Docker daemon configuration ... OK
-- Checking for available ports ... FAIL
   Error: Cannot get TCP port information from Kubernetes host
   Caused By:
     Error: cannot start container 40ba9e5b9d50051f3ccd807ca4d4a11a1c9665b0e780a57253d3bbc74a472a12
     Caused By:
       Error: Error response from daemon: {"message":"oci runtime error: rootfs (/mnt/sda1/var/lib/docker/devicemapper/mnt/389e1c51d7b5b1f9ad234e9982cd56f0215ba076a0182ba667ec55887b6ba2fb/rootfs) does not exist\n"}
Error during 'cluster up' execution: Error starting the cluster.
gbraad commented 7 years ago
$ docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 3
Server Version: 1.13.1
Storage Driver: devicemapper
 Pool Name: docker-8:1-519187-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop5
 Metadata file: /dev/loop6
 Data Space Used: 1.335 GB
 Data Space Total: 107.4 GB
 Data Space Available: 7.702 GB
 Metadata Space Used: 1.393 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.146 GB
 Thin Pool Minimum Free Space: 10.74 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /mnt/sda1/var/lib/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
 Metadata loop file: /mnt/sda1/var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.137 (2016-11-30)
Logging Driver: journald
Cgroup Driver: systemd
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: oci runc
Default Runtime: oci
Init Binary: /usr/libexec/docker/docker-init-current
containerd version:  (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: N/A (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 seccomp
  Profile: default
 selinux
Kernel Version: 4.11.11-300.fc26.x86_64
Operating System: Fedora 26 (Twenty Six)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 2
Total Memory: 1.952 GiB
Name: minishift
ID: CZ77:3PUP:VOCF:PRTU:P3FY:4G2A:5TMR:GPH4:R6W7:4VFS:QQ5N:2KRE
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
 provider=kvm
Experimental: false
Insecure Registries:
 172.30.0.0/16
 127.0.0.0/8
Live Restore Enabled: false
Registries: docker.io (secure)
$ minishift ssh
[docker@minishift ~]$ docker pull busybox
Using default tag: latest
Trying to pull repository docker.io/library/busybox ... 
latest: Pulling from docker.io/library/busybox
9e87eff13613: Pull complete 
Digest: sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4
Status: Downloaded newer image for docker.io/busybox:latest
[docker@minishift ~]$ docker run -it --rm busybox
/usr/bin/docker-current: Error response from daemon: oci runtime error: rootfs (/mnt/sda1/var/lib/docker/devicemapper/mnt/2aaead2755cabd41e0ac654fb77274cabb47b85934f18bdbc077f8c4cb151eb0/rootfs) does not exist.
gbraad commented 7 years ago

Starting the following as root:

$ /usr/bin/dockerd-current -H tcp://0.0.0.0:2376  \
  -H unix:///var/run/docker.sock                      \
  --selinux-enabled                      \
  --log-driver=journald                      \
  --signature-verification=false                      \
  --add-runtime oci=/usr/libexec/docker/docker-runc-current  \
  --default-runtime=oci                      \
  --exec-opt native.cgroupdriver=systemd                      \
  --userland-proxy-path=/usr/libexec/docker/docker-proxy-current  \
  --containerd /run/containerd.sock                      \
  --init-path=/usr/libexec/docker/docker-init-current  \
  --tlsverify --tlscacert /etc/docker/ca.pem                      \
  --tlscert /etc/docker/server.pem                      \
  --tlskey /etc/docker/server-key.pem
$ docker run -it --rm busybox
#
INFO[0000] Daemon has completed initialization          
INFO[0000] Docker daemon                                 commit="27e468e/1.13.1" graphdriver=devicemapper version=1.13.1
INFO[0000] API listen on /var/run/docker.sock           
INFO[0000] API listen on [::]:2376                      
INFO[0022] {Action=_ping, Username=docker, LoginUID=1000, PID=5005} 
INFO[0022] {Action=create, Username=docker, LoginUID=1000, PID=5005} 
INFO[0024] {Action=attach, ID=5d202f2e3e8ae91e2ca7ed938c4ba01e13cee86de903615c662c11fb1abcf451, Username=docker, LoginUID=1000, PID=5005} 
INFO[0024] {Action=start, ID=5d202f2e3e8ae91e2ca7ed938c4ba01e13cee86de903615c662c11fb1abcf451, Username=docker, LoginUID=1000, PID=5005, Config={Hostname=5d202f2e3e8a, AttachStdin=true, AttachStdout=true, AttachStderr=true, Tty=true, OpenStdin=true, StdinOnce=true, Env=[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin], Cmd=[sh], ArgsEscaped=false, Image=busybox, NetworkDisabled=false, Labels=map[]}, HostConfig={LogConfig={Type:journald Config:map[]}, NetworkMode=default, PortBindings=map[], RestartPolicy={Name:no MaximumRetryCount:0}, AutoRemove=true, DNS=[], DNSOptions=[], DNSSearch=[], Privileged=false, PublishAllPorts=false, ReadonlyRootfs=false, ShmSize=67108864, Runtime=oci, Resources={CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DiskQuota:0 KernelMemory:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness:0xc420f99710 OomKillDisable:0xc420f9971a PidsLimit:0 Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0}}} 
INFO[0025] {Action=resize, ID=5d202f2e3e8ae91e2ca7ed938c4ba01e13cee86de903615c662c11fb1abcf451, Username=docker, LoginUID=1000, PID=5005}