mirror of
https://github.com/rancher/k3k.git
synced 2026-08-18 03:46:31 +00:00
set machine id on server pod if not exists (#1011)
This commit is contained in:
@@ -135,6 +135,11 @@ configure_cgroups() {
|
||||
EXTRA_ARGS="{{.EXTRA_ARGS}}"
|
||||
configure_cgroups
|
||||
|
||||
if [ ! -f /etc/machine-id ]; then
|
||||
MACHINE_ID=$(printf '%s' "$POD_NAME" | md5sum | cut -d' ' -f1)
|
||||
printf '%s' "$MACHINE_ID" > /etc/machine-id
|
||||
fi
|
||||
|
||||
case "{{.CLUSTER_MODE}}" in
|
||||
"ha")
|
||||
start_ha_node
|
||||
|
||||
Reference in New Issue
Block a user