Skip to content

Conversation

@ekuu
Copy link

@ekuu ekuu commented Mar 7, 2023

Describe what this PR does / why we need it

Suport Rocky Linux

I got an error on Rocky Linux:

+ set -e
+++ dirname /var/lib/sealer/data/my-cluster/rootfs/scripts/docker.sh
++ cd /var/lib/sealer/data/my-cluster/rootfs/scripts
++ pwd
+ scripts_path=/var/lib/sealer/data/my-cluster/rootfs/scripts
+ image_dir=/var/lib/sealer/data/my-cluster/rootfs/scripts/../images
+ DOCKER_VERSION=19.03.15
+ storage=/var/lib/docker
+ mkdir -p /var/lib/docker
+ utils_command_exists docker
+ command -v docker
++ get_distribution
++ lsb_dist=
++ '[' -r /etc/os-release ']'
+++ . /etc/os-release
++++ NAME='Rocky Linux'
++++ VERSION='9.1 (Blue Onyx)'
++++ ID=rocky
++++ ID_LIKE='rhel centos fedora'
++++ VERSION_ID=9.1
++++ PLATFORM_ID=platform:el9
++++ PRETTY_NAME='Rocky Linux 9.1 (Blue Onyx)'
++++ ANSI_COLOR='0;32'
++++ LOGO=fedora-logo-icon
++++ CPE_NAME=cpe:/o:rocky:rocky:9::baseos
++++ HOME_URL=https://rockylinux.org/
++++ BUG_REPORT_URL=https://bugs.rockylinux.org/
++++ ROCKY_SUPPORT_PRODUCT=Rocky-Linux-9
++++ ROCKY_SUPPORT_PRODUCT_VERSION=9.1
++++ REDHAT_SUPPORT_PRODUCT='Rocky Linux'
++++ REDHAT_SUPPORT_PRODUCT_VERSION=9.1
+++ echo rocky
++ lsb_dist=rocky
++ echo rocky
+ lsb_dist=rocky
++ echo rocky
++ tr '[:upper:]' '[:lower:]'
+ lsb_dist=rocky
+ echo 'current system is rocky'
current system is rocky
+ case "$lsb_dist" in
+ utils_info 'unknown system to use /lib/systemd/system/docker.service'
/var/lib/sealer/data/my-cluster/rootfs/scripts/docker.sh: line 97: utils_info: command not found

Does this pull request fix one issue?

Describe how you did it

Describe how to verify it

# ./auto-build.sh --k8s-version=v1.22.15 --platform=amd64

# sealer tag docker.io/sealerio/kubernetes  docker.io/myaccount/kubernetes:v1.22.15

# sealer push docker.io/myaccount/kubernetes:v1.22.15

# sealer run docker.io/myaccount/kubernetes:v1.22.15 --masters xxxx --nodes xxxx -p xxxx

It's worked

+ set -e
+++ dirname /var/lib/sealer/data/my-cluster/rootfs/scripts/docker.sh
++ cd /var/lib/sealer/data/my-cluster/rootfs/scripts
++ pwd
+ scripts_path=/var/lib/sealer/data/my-cluster/rootfs/scripts
+ image_dir=/var/lib/sealer/data/my-cluster/rootfs/scripts/../images
+ DOCKER_VERSION=19.03.14-sealer
+ storage=/var/lib/docker
+ mkdir -p /var/lib/docker
+ utils_command_exists docker
+ command -v docker
++ get_distribution
++ lsb_dist=
++ '[' -r /etc/os-release ']'
+++ . /etc/os-release
++++ NAME='Rocky Linux'
++++ VERSION='9.1 (Blue Onyx)'
++++ ID=rocky
++++ ID_LIKE='rhel centos fedora'
++++ VERSION_ID=9.1
++++ PLATFORM_ID=platform:el9
++++ PRETTY_NAME='Rocky Linux 9.1 (Blue Onyx)'
++++ ANSI_COLOR='0;32'
++++ LOGO=fedora-logo-icon
++++ CPE_NAME=cpe:/o:rocky:rocky:9::baseos
++++ HOME_URL=https://rockylinux.org/
++++ BUG_REPORT_URL=https://bugs.rockylinux.org/
++++ ROCKY_SUPPORT_PRODUCT=Rocky-Linux-9
++++ ROCKY_SUPPORT_PRODUCT_VERSION=9.1
++++ REDHAT_SUPPORT_PRODUCT='Rocky Linux'
++++ REDHAT_SUPPORT_PRODUCT_VERSION=9.1
+++ echo rocky
++ lsb_dist=rocky
++ echo rocky
+ lsb_dist=rocky
++ echo rocky
++ tr '[:upper:]' '[:lower:]'
+ lsb_dist=rocky
+ echo 'current system is rocky'
current system is rocky
+ case "$lsb_dist" in
+ cp /var/lib/sealer/data/my-cluster/rootfs/scripts/../etc/docker.service /usr/lib/systemd/system/docker.service
+ '[' -d /etc/docker/ ']'
+ mkdir /etc/docker/ -p
+ chmod -R 755 /var/lib/sealer/data/my-cluster/rootfs/scripts/../cri
+ tar -zxvf /var/lib/sealer/data/my-cluster/rootfs/scripts/../cri/docker.tar.gz -C /usr/bin
containerd
containerd-shim
ctr
docker
docker-init
docker-proxy
dockerd
runc

Special notes for reviews

Signed-off-by: orccn <redorc@163.com>
@ekuu ekuu force-pushed the add_rocky_linux branch from 8a74103 to 96e8b92 Compare March 7, 2023 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant