Skip to content

proxmoxve: explicit static IP configuration - #1282

Merged
prestist merged 3 commits into
coreos:mainfrom
tormath1:tormath1/proxmox
Jul 21, 2026
Merged

proxmoxve: explicit static IP configuration#1282
prestist merged 3 commits into
coreos:mainfrom
tormath1:tormath1/proxmox

Conversation

@tormath1

@tormath1 tormath1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This costs nothing to append - dracut explodes this 'ip=' into variables1, and downstream libraries might default to 'dhcp' if the 'autoconf' variable is empty.


Related to: flatcar/Flatcar#2002, flatcar/scripts#3677

(cc @theoraim)

Footnotes

  1. https://github.com/dracutdevs/dracut/blob/5d2bda46f4e75e85445ee4d3bd3f68bf966287b9/modules.d/40network/net-lib.sh#L541

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Proxmox VE cloud-config provider to append :::off to the generated ip= kernel arguments for both IPv4 and IPv6 network configurations. Feedback suggests using network::dracut_addr to properly format IPv6 addresses to avoid parsing issues with dracut, and reminds the author to update the corresponding unit tests to match the new kernel argument format.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines 217 to 225
kargs.push(format!(
"ip={}::{}:{}",
"ip={}::{}:{}:::off",
network.ip(),
gateway.gateway,
network.prefix()
));
} else {
kargs.push(format!("ip={}:::{}", network.ip(), network.prefix()));
kargs.push(format!("ip={}:::{}:::off", network.ip(), network.prefix()));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

For IPv6 addresses, dracut's colon-separated parser requires them to be enclosed in square brackets (e.g., [2001:db8::1]) so that the colons in the IPv6 address are not mistaken for field separators. Since you are modifying these lines, please use the helper network::dracut_addr to correctly format the IPv6 addresses.

                                kargs.push(format!(
                                    "ip={}::{}:{}:::off",
                                    network::dracut_addr(&IpAddr::V6(network.ip())),
                                    network::dracut_addr(&gateway.gateway),
                                    network.prefix()
                                ));
                            } else {
                                kargs.push(format!(
                                    "ip={}:::{}:::off",
                                    network::dracut_addr(&IpAddr::V6(network.ip())),
                                    network.prefix()
                                ));
                            }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tormath1 I think this is a valid bug, it looks like the KubeVirt provider already does this correctly (src/providers/kubevirt/cloudconfig.rs:204).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, this is now done and tests are updated as well.

Comment thread src/providers/proxmoxve/cloudconfig.rs
@tormath1
tormath1 force-pushed the tormath1/proxmox branch 2 times, most recently from b3b0531 to c181f17 Compare June 30, 2026 13:47

@prestist prestist left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise I think this is gtg, Thank you!

And it might be good to mention the bug fix in a release note entry

tormath1 added 2 commits July 17, 2026 10:23
This costs nothing to append - dracut explodes this 'ip=' into variables[^1],
and downstream libraries might default to 'dhcp' if the 'autoconf'
variable is empty.

[^1]: https://github.com/dracutdevs/dracut/blob/5d2bda46f4e75e85445ee4d3bd3f68bf966287b9/modules.d/40network/net-lib.sh#L541

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
With 'dracut_addr' we properly escape the IPv6 (with brackets)

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
@tormath1

Copy link
Copy Markdown
Contributor Author

Otherwise I think this is gtg, Thank you!

And it might be good to mention the bug fix in a release note entry

Thanks! Changelog entry has been added.

@prestist
prestist merged commit c31a0cf into coreos:main Jul 21, 2026
10 checks passed
@tormath1
tormath1 deleted the tormath1/proxmox branch July 23, 2026 13:42
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.

2 participants