Skip to content
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

SLEMicro is installing the wrong rke2-selinux rpm #4826

Closed
galal-hussein opened this issue Oct 2, 2023 · 2 comments
Closed

SLEMicro is installing the wrong rke2-selinux rpm #4826

galal-hussein opened this issue Oct 2, 2023 · 2 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@galal-hussein
Copy link
Contributor

galal-hussein commented Oct 2, 2023

Environmental Info:
RKE2 Version:
any

Node(s) CPU architecture, OS, and Version:
slemicro 5.4

Cluster Configuration:
1 server

Describe the bug:
Installing rke2 on sle-micro using the official image https://www.suse.com/download/sle-micro/ causing rke2 to install microos rpm instead of the slemicro rpm

Steps To Reproduce:

Expected behavior:
The install script to install the slemicro rpm

Actual behavior:
the install script is picking up the microos version

Additional context / logs:
The issue is caused because the install script is checking for VARIANT_ID variable, however the official image has only ID variable.

@galal-hussein galal-hussein self-assigned this Oct 2, 2023
@galal-hussein galal-hussein added the kind/bug Something isn't working label Oct 2, 2023
@galal-hussein
Copy link
Contributor Author

A followup on the issue for rke2, slemicro seems to have a trouble installing rke2 using the official image of slemicro, even after editing the environment variable, the reason is that it seems that slemicro is built on older version of rpmbuild and it causes some macros (specifically %selinux_relabel_pre macro) to have different paths, to solve this issue the rpm has to be built with newer rpmbuild package.

@ShylajaDevadiga
Copy link
Contributor

Validated on rke2 version v1.28.2+rke2r1 using latest update to install script. Correct rpm package for SLE-Micro is installed.

localhost:~ # curl -sfL https://get.rke2.io | sudo INSTALL_RKE2_VERSION=v1.28.2+rke2r1 INSTALL_RKE2_CHANNEL=latest  INSTALL_RKE2_METHOD=rpm sh -
localhost:~ # sudo systemctl enable rke2-server

localhost:~ # sudo systemctl start rke2-server

localhost:~ # rke2 -v
rke2 version v1.28.2+rke2r1 (7466261e4792e68baa2cc0c2afd3dcc929d72061)
go version go1.20.8 X:boringcrypto

localhost:~ # cat /etc/os-release 
NAME="SLE Micro"
VERSION="5.4"
VERSION_ID="5.4"
PRETTY_NAME="SUSE Linux Enterprise Micro 5.4"
ID="sle-micro"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sle-micro:5.4"

localhost:~ # rpm -qa|grep selinux
python3-selinux-3.4-150400.1.8.x86_64
libselinux1-3.4-150400.1.8.x86_64
selinux-policy-20221019-150400.2.6.noarch
selinux-tools-3.4-150400.1.8.x86_64
container-selinux-2.188.0-150400.1.13.noarch
patterns-microos-selinux-5.4.0-150400.1.1.x86_64
selinux-policy-targeted-20221019-150400.2.6.noarch
rke2-selinux-0.15-1.slemicro.noarch

localhost:~ # sudo cat /var/lib/rancher/rke2/agent/etc/containerd/config.toml|grep selinux
  enable_selinux = true

localhost:~ # kubectl get nodes
NAME                    STATUS   ROLES                       AGE    VERSION
localhost.localdomain   Ready    control-plane,etcd,master   109s   v1.28.2+rke2r1

localhost:~ # kubectl get pods -A
NAMESPACE     NAME                                                   READY   STATUS      RESTARTS   AGE
kube-system   cloud-controller-manager-localhost.localdomain         1/1     Running     0          60s
kube-system   etcd-localhost.localdomain                             1/1     Running     0          84s
kube-system   helm-install-rke2-canal-9gnlq                          0/1     Completed   0          103s
kube-system   helm-install-rke2-coredns-q46tb                        0/1     Completed   0          103s
kube-system   helm-install-rke2-ingress-nginx-jb2jf                  0/1     Completed   0          103s
kube-system   helm-install-rke2-metrics-server-g6qhj                 0/1     Completed   0          103s
kube-system   helm-install-rke2-snapshot-controller-crd-7n6gl        0/1     Completed   0          103s
kube-system   helm-install-rke2-snapshot-controller-g2tvs            0/1     Completed   0          103s
kube-system   helm-install-rke2-snapshot-validation-webhook-fbpm9    0/1     Completed   0          103s
kube-system   kube-apiserver-localhost.localdomain                   1/1     Running     0          56s
kube-system   kube-controller-manager-localhost.localdomain          1/1     Running     0          54s
kube-system   kube-proxy-localhost.localdomain                       1/1     Running     0          90s
kube-system   kube-scheduler-localhost.localdomain                   1/1     Running     0          57s
kube-system   rke2-canal-vngxh                                       2/2     Running     0          85s
kube-system   rke2-coredns-rke2-coredns-67f86d96c-p79fz              1/1     Running     0          85s
kube-system   rke2-coredns-rke2-coredns-autoscaler-d97d9cd9f-tqldz   1/1     Running     0          85s
kube-system   rke2-ingress-nginx-controller-9llkp                    1/1     Running     0          50s
kube-system   rke2-metrics-server-c6fb46b64-l2sr2                    1/1     Running     0          56s
kube-system   rke2-snapshot-controller-59cc9cd8f4-6pfwm              1/1     Running     0          56s
kube-system   rke2-snapshot-validation-webhook-54c5989b65-wgxc2      1/1     Running     0          57s
localhost:~ # 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants