Hi everyone. posted this earlier in the <#C3ASABBD...
# rke2
b
Hi everyone. posted this earlier in the #general which probably is not the right place... I'm trying to run a rke2 cluster based on Flatcar Linux in Azure. During provisioning of the nodes (Rancher 2.8.1), the process stops, because Flatcar Linux has a read only /usr fs. The oem-cloudinit.service fails while trying to write the install.sh script to
/usr/local/custom_script
. I found some (Rancher-) github issues related to a read only /usr fs, but they were related to the agent binary location itself and not the script to install the agent. So, right now I am not sure if this is a bug, or if I am just not able to find the correct setting for this. oem service log:
Copy code
Feb 22 15:26:53 test-1-controlplane-57f125f9-2b7w9 bash[1704]: 2024/02/22 15:26:53 Fetching user-data from datasource of type "waagent"
Feb 22 15:26:53 test-1-controlplane-57f125f9-2b7w9 bash[1704]: 2024/02/22 15:26:53 Attempting to read from "/var/lib/waagent/CustomData"
Feb 22 15:26:53 test-1-controlplane-57f125f9-2b7w9 bash[1704]: 2024/02/22 15:26:53 line 3: warning: unrecognized key "runcmd"
Feb 22 15:26:53 test-1-controlplane-57f125f9-2b7w9 bash[1704]: 2024/02/22 15:26:53 line 8: error: file cannot be written to a read-only filesystem
Feb 22 15:26:53 test-1-controlplane-57f125f9-2b7w9 bash[1704]: 2024/02/22 15:26:53 Set hostname to test-1-controlplane-57f125f9-2b7w9
Feb 22 15:26:53 test-1-controlplane-57f125f9-2b7w9 bash[1704]: 2024/02/22 15:26:53 Running part "cloud-config.yaml" (cloud-config)
Feb 22 15:26:53 test-1-controlplane-57f125f9-2b7w9 bash[1704]: 2024/02/22 15:26:53 Writing file to "/usr/local/custom_script/install.sh"
Feb 22 15:26:53 test-1-controlplane-57f125f9-2b7w9 bash[1704]: 2024/02/22 15:26:53 Failed to run part "cloud-config.yaml": error applying cloud-config: mkdir /usr/local/custom_script: read-only file system
If I run the script by hand (grabbing and unzipping it from the cloud-init at
/var/lib/waagent/CustomData
) everything works fine and the node comes up in the rancher web interface as running after a while. I am also running the Rancher controlplane (the rancher webui, etc.) on a Flatcar Linux VM without any issues. Now I'm searching for a way to either tell Rancher or Azure to save this file at /opt or some other writeable location. Is this possble? Am I looking in the wrong location? I could not really find answers to this in the Rancher or Azure docs.