Skip to content

hook-docker: bracket IPv6 hosts in dockerd syslog log driver URL#328

Open
rahulbabu95 wants to merge 1 commit into
tinkerbell:mainfrom
rahulbabu95:fix/hook-docker-ipv6-syslog-bracket
Open

hook-docker: bracket IPv6 hosts in dockerd syslog log driver URL#328
rahulbabu95 wants to merge 1 commit into
tinkerbell:mainfrom
rahulbabu95:fix/hook-docker-ipv6-syslog-bracket

Conversation

@rahulbabu95

Copy link
Copy Markdown
Contributor

Bare IPv6 addresses passed via the syslog_host= kernel cmdline were not bracketed in the dockerd syslog log driver URL, producing a malformed value that dockerd cannot parse. Use net.JoinHostPort so IPv6 is bracketed correctly (e.g. udp://[fd00:80:66::1]:514); IPv4 and hostname inputs are unchanged.

Also skip configuring the syslog log driver when the syslog host is empty.

Description

Fixes: #

How Has This Been Tested?

When syslod_host is set to ipv6 address like syslog_host=fd00:80:66::1,
/etc/docker/daemon.json
{
"debug": true,
"log-driver": "syslog",
"log-opts": {
"syslog-address": "udp://fd00:80:66::1:514"
}
}
dockerd crashes with:

error starting up Docker exit status 1 
will retry in 10 seconds

After the fix:

{
"debug": true,
"log-driver": "syslog",
"log-opts": {
"syslog-address": "udp://[fd00:80:66::1]:514"
}
}
dockerd is able to initialize properly.

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@rahulbabu95 rahulbabu95 force-pushed the fix/hook-docker-ipv6-syslog-bracket branch from f1fbc27 to 8dfd012 Compare July 8, 2026 00:45
Bare IPv6 addresses passed via the `syslog_host=` kernel cmdline
were not bracketed in the dockerd syslog log driver URL, producing
a malformed value that dockerd cannot parse. Use net.JoinHostPort
so IPv6 is bracketed correctly (e.g. `udp://[fd00:80:66::1]:514`);
IPv4 and hostname inputs are unchanged.

Also skip configuring the syslog log driver when the syslog host
is empty.

Signed-off-by: Rahul Ganesh <rahulbabu95@gmail.com>
Signed-off-by: Rahul <rahulbabu95@gmail.com>
@rahulbabu95 rahulbabu95 force-pushed the fix/hook-docker-ipv6-syslog-bracket branch from 8dfd012 to c1eda74 Compare July 8, 2026 00:47
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.

1 participant