microshift
microshift copied to clipboard
[BUG] Microshift does not honor /etc/microshift/config.yaml `roles` array
What happened:
Microshift does not apply the roles listed in the config file defined at /etc/microshift/config.yaml despite documented behavior here.
Example:
[core@pi-master-0 ~]$ cat /etc/microshift/config.yaml
---
dataDir: /var/lib/microshift
roles:
- controlplane
- node
nodeName: "pi-master-0"
cluster:
clusterCIDR: "10.42.0.0/16"
serviceCIDR: "10.43.0.0/16"
dns: "10.43.0.10"
domain: cluster.local
Result:
[core@pi-master-0 ~]$ oc get nodes
NAME STATUS ROLES AGE VERSION
pi-master-0 Ready <none> 22h v1.21.0
What you expected to happen:
That the ROLES column of oc get nodes would reflect controlplane,node:
[core@pi-master-0 ~]$ oc get nodes
NAME STATUS ROLES AGE VERSION
pi-master-0 Ready controlplane,node 22h v1.21.0
How to reproduce it (as minimally and precisely as possible):
- Define
/etc/microshift/config.yamlwithrolesarray inclusive of the two documented acceptable rolescontroleplaneandnode - Pull the documented for podman
microshift.servicesystemd unit, enable it, and start it:
$ sudo curl -o /etc/systemd/system/microshift.service \
https://raw.githubusercontent.com/redhat-et/microshift/main/packaging/systemd/microshift-containerized.service
$ sudo systemctl enable microshift.service
$ sudo systemctl start microshift.service
- Execute
oc get nodesand note theROLEScolumn of the output
Environment:
- Microshift version (use
microshift version): latest - Hardware configuration: Raspberry Pi 400 (aarch64, 4GB RAM)
- OS (e.g:
cat /etc/os-release): Fedora CoreOS 35.20220327.3.0 - Kernel (e.g.
uname -a): Linux pi-master-0 5.16.16-200.fc35.aarch64 #1 SMP Sat Mar 19 13:35:51 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux - Others: microshift.service in more readable form:
[core@pi-master-0 ~]$ cat /etc/systemd/system/microshift.service
[Unit]
Description=MicroShift Containerized
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target crio.service
After=network-online.target crio.service
RequiresMountsFor=%t/containers
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/usr/bin/mkdir -p /var/lib/kubelet ; /usr/bin/mkdir -p /var/hpvolumes
ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStart=/bin/podman run \
--cidfile=%t/%n.ctr-id \
--cgroups=no-conmon \
--rm \
--replace \
--sdnotify=container \
--label io.containers.autoupdate=registry \
--network=host \
--privileged \
-d \
--name microshift \
-v /var/hpvolumes:/var/hpvolumes:z,rw,rshared \
-v /var/run/crio/crio.sock:/var/run/crio/crio.sock:rw,rshared \
-v microshift-data:/var/lib/microshift:rw,rshared \
-v /var/lib/kubelet:/var/lib/kubelet:z,rw,rshared \
-v /var/log:/var/log \
-v /etc:/etc quay.io/microshift/microshift:latest
ExecStop=/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target default.target