Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions deploy/kicbase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ RUN rm -rf \
/usr/share/doc/* \
/usr/share/man/* \
/usr/share/local/*

# Per https://systemd.io/CONTAINER_INTERFACE/, /etc/machine-id must be present
# but empty in a container image so it is freshly initialized on each boot.
# Remove /var/lib/dbus/machine-id so that systemd-machine-id-setup cannot fall
# back to a baked-in value, which would make every container share the same ID.
RUN truncate -s 0 /etc/machine-id && rm -f /var/lib/dbus/machine-id
RUN echo "kic! Build: ${COMMIT_SHA} Time :$(date)" > "/kic.txt"

# squash all layers into one
Expand Down
9 changes: 0 additions & 9 deletions deploy/kicbase/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,6 @@ retryable_fix_cgroup() {
exit 31
}

fix_machine_id() {
# Deletes the machine-id embedded in the node image and generates a new one.
# This is necessary because both kubelet and other components like weave net
# use machine-id internally to distinguish nodes.
echo 'INFO: clearing and regenerating /etc/machine-id' >&2
rm -f /etc/machine-id
systemd-machine-id-setup
}

fix_product_name() {
# this is a small fix to hide the underlying hardware and fix issue #426
Expand Down Expand Up @@ -545,7 +537,6 @@ configure_containerd
configure_proxy
fix_mount
retryable_fix_cgroup
fix_machine_id
fix_product_name
fix_product_uuid
select_iptables
Expand Down