Skip to content

Allow live update of ipv4/ipv6.address.external - #3772

Merged
stgraber merged 2 commits into
lxc:mainfrom
0xk1f0:external-no-nic-remove
Aug 4, 2026
Merged

stgraber merged 2 commits into
lxc:mainfrom
0xk1f0:external-no-nic-remove

Conversation

@0xk1f0

@0xk1f0 0xk1f0 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Currently, a change of either ipv4 or ipv6.address.external of an instance's NIC triggers a full re-attach. For these two properties, this action is not strictly needed and limits when they can be applied. As of right now, I was seeing errors when applying a .external address when an instance's agent is not fully ready yet.

This fix exempts these two properties in UpdatableFields and additionally makes sure stale SNAT rules are replaced correctly when addresses change.

0xk1f0 added 2 commits August 4, 2026 14:58
CreateLogicalRouterNAT only matched existing rules on the exact
pair, so re-running it for a per NIC egress SNAT rule with a new
external address left the previous rule for that internal IP in
place instead of replacing it.

Signed-off-by: 0xk1f0 <dev@k1f0.dev>
Changing ipv4.address.external or ipv6.address.external on a NIC
attached to a running instance was not in UpdatableFields, so it
triggered a full device remove and re-add instead of an in-place
update. This in turn triggered an error when the instance's agent
is not up and running.

Signed-off-by: 0xk1f0 <dev@k1f0.dev>
@0xk1f0
0xk1f0 requested a review from stgraber as a code owner August 4, 2026 14:18
@stgraber
stgraber merged commit 6753c0d into lxc:main Aug 4, 2026
56 of 57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants