Skip to content

1.97.1: the Docker image starts Keepalived again on a volume from an older image - #7

Merged
avandeputte merged 1 commit into
mainfrom
fix/keepalived-config-opts
Oct 17, 2026
Merged

avandeputte merged 1 commit into
mainfrom
fix/keepalived-config-opts

Conversation

@avandeputte

Copy link
Copy Markdown
Owner

Closes #6

What broke

1.97.0 moved the image to Debian 13, whose Keepalived (2.3.3) is built reproducibly. That build moves the build-options string out of the binary into /etc/keepalived/keepalived.config-opts, and Keepalived exits with Unable to read build config options file when it is missing. The file is informational only; Keepalived does not check its contents.

/etc/keepalived is a volume. Docker seeds a named volume from the image only when the volume is created empty, so a volume populated by 1.96.0 hides the image's copy. Fresh installs, host installs and the Proxmox container are unaffected; every Docker upgrade from an older image is.

The fix

  • Dockerfile: keep an image-only copy at /usr/sbin/keepalived.config-opts, a fallback location Keepalived also reads when launched by full path.
  • docker/entrypoint.sh: copy it into /etc/keepalived/ on every start. This is needed because the app validates configs with a bare keepalived -t from its own directory, where the fallback does not apply (verified). Refreshing on every start also keeps the file matching the binary across future Keepalived bumps.

Verified

Built the image locally and ran it against a directory holding only a keepalived.conf, the shape of an upgraded volume: the entrypoint adds the file, and both keepalived -t and /usr/sbin/keepalived -t pass. Against an empty directory the file is created too. Before the change the same directory fails with the reported message.

…older image

Debian 13 builds Keepalived reproducibly, which moves its build-options
string out of the binary into /etc/keepalived/keepalived.config-opts, and
Keepalived refuses to start without that file ("Unable to read build config
options file"). /etc/keepalived is a volume, and Docker only seeds a volume
from the image when it is created empty, so every node upgraded from 1.96.0
kept a volume without the file and lost its VIP.

The image now keeps a copy next to the binary, a location Keepalived also
accepts, and the entrypoint refreshes /etc/keepalived/keepalived.config-opts
from it on every start, so the file is there for the bare `keepalived -t`
the app runs and always matches the binary in the image.

Closes #6
@avandeputte
avandeputte merged commit 3e8333c into main Oct 17, 2026
1 check passed
@avandeputte
avandeputte deleted the fix/keepalived-config-opts branch October 17, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docker] Upgrading from version 1.96.0 to version 1.97.0 results in invalid config

1 participant