-
Notifications
You must be signed in to change notification settings - Fork 126
proxmoxve: explicit static IP configuration #1282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -199,13 +199,17 @@ impl MetadataProvider for ProxmoxVECloudConfig { | |
| .find(|r| r.destination.is_ipv4() && r.destination.prefix() == 0) | ||
| { | ||
| kargs.push(format!( | ||
| "ip={}::{}:{}", | ||
| "ip={}::{}:{}:::off", | ||
| network.ip(), | ||
| gateway.gateway, | ||
| network.mask() | ||
| )); | ||
| } else { | ||
| kargs.push(format!("ip={}:::{}", network.ip(), network.mask())); | ||
| kargs.push(format!( | ||
| "ip={}:::{}:::off", | ||
| network.ip(), | ||
| network.mask() | ||
| )); | ||
| } | ||
| } | ||
| IpNetwork::V6(network) => { | ||
|
|
@@ -215,13 +219,17 @@ impl MetadataProvider for ProxmoxVECloudConfig { | |
| .find(|r| r.destination.is_ipv6() && r.destination.prefix() == 0) | ||
| { | ||
| 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() | ||
| )); | ||
| } | ||
|
Comment on lines
221
to
233
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For IPv6 addresses, dracut's colon-separated parser requires them to be enclosed in square brackets (e.g., 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()
));
} |
||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to the kernel arguments format (appending
:::off) will cause the existing unit tests insrc/providers/proxmoxve/tests.rsto fail, as they still assert the old format without the:::offsuffix. Please updatetest_network_kargsandtest_network_kargs_no_gatewayinsrc/providers/proxmoxve/tests.rsto match the new format.