systemvm: emit IPv6 prefix block for redundant VPC VRs in radvd.conf#13127
systemvm: emit IPv6 prefix block for redundant VPC VRs in radvd.conf#13127jeanvetorello wants to merge 2 commits intoapache:4.22from
Conversation
|
@jeanvetorello In some cases, the VR is not the gateway, so advertising the SLAAC prefix is not required. One example is Netris, where this change was originally introduced (see #10458).
It would be good to clearly distinguish these two cases in the implementation/design. |
|
@jeanvetorello |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13127 +/- ##
=========================================
Coverage 17.68% 17.68%
Complexity 15792 15792
=========================================
Files 5922 5922
Lines 533087 533087
Branches 65206 65206
=========================================
Hits 94269 94269
Misses 428176 428176
Partials 10642 10642
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <copilot@github.com>
|
its worked with your sugestion.@weizhouapache File "/opt/cloud/bin/cs/CsVpcGuestNetwork.py", line 110, in add_radvd_conf I've updated the PR with your suggested fix, with a tiny syntactic tweak: if entry['router_guest_ip6'] == entry['router_guest_ip6_gateway'] or self.cl.is_redundant():
self.conf.append(" prefix %s" % full_addr)
... |
Description
Fixes #13121 — IPv6 SLAAC broken on Redundant VPC Virtual Router due to a missing
Prefix Information Option (PIO) in
radvd.conf.In
CsVpcGuestNetwork.add_radvd_conf(), theprefix { ... }block was emittedonly when
router_guest_ip6 == router_guest_ip6_gateway. That condition is truefor non-redundant VRs (where the router itself is the gateway), but never for
redundant VRs:
As a result, on a redundant VPC tier the radvd daemon was started but advertised
RAs without a Prefix Information Option, so guest VMs could only configure
link-local
fe80::addresses and never obtained a global IPv6 via SLAAC.The fix removes the conditional and always emits the prefix block when radvd is
configured for the tier. This aligns the VPC path with the non-VPC path
(
systemvm/debian/opt/cloud/bin/setup/common.sh+radvd.conf.tmpl), whichalready emits the prefix block unconditionally.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
N/A — config file change.
How Has This Been Tested?
Tested on a VPC with IPv6 enabled and Redundant VR enabled, SystemVM template
based on Debian, SLAAC only (no DHCPv6).
Before the fix:
cat /etc/radvd.confon the primary VR showed theinterface ethX { ... }block but no
prefixsection.tcpdump -i ethX -vv 'icmp6 and ip6[40] = 134'showed Router Advertisementswithout a Prefix Information Option.
fe80::address.After the fix:
/etc/radvd.confcontains the expectedprefix <gateway>/64 { AdvOnLink on; AdvAutonomous on; };block.tcpdumpconfirms RAs include the Prefix Information Option.via
CsRedundant._disable_radvd, so no duplicate RAs are emitted; onpromotion, radvd is started with the correct configuration.
Non-redundant VPC VRs are unchanged (
router_guest_ip6 == router_guest_ip6_gatewayin that case, which already produced the same output as the unconditional path).