Damans227 commented on code in PR #13795:
URL: https://github.com/apache/cloudstack/pull/13795#discussion_r3974968240
##########
systemvm/debian/opt/cloud/bin/setup/common.sh:
##########
@@ -573,10 +573,42 @@ setup_dnsmasq() {
fi
}
+enable_ipv6_link_local() {
+ local eth=$1
+ log_it "Enabling IPv6 link-local on interface $eth"
+ # Generate the link-local address with EUI-64 based on the MAC address so
+ # the address can be calculated by the Management Server
+ sysctl -w net.ipv6.conf.${eth}.addr_gen_mode=0
+ # Only a link-local address is wanted, no SLAAC/RA configuration
+ sysctl -w net.ipv6.conf.${eth}.accept_ra=0
+ sysctl -w net.ipv6.conf.${eth}.autoconf=0
+ sysctl -w net.ipv6.conf.${eth}.disable_ipv6=0
Review Comment:
tested this on a lab and it gets undone a few seconds later, so the feature
doesnt survive a boot.
this sets the runtime value only. the template ships
`net.ipv6.conf.all.disable_ipv6 = 1` in `/etc/sysctl.conf`, and
`bootstrap.sh:104` runs `sysctl -p` after `setup_sshd`. boot order on the ssvm:
```
00:43:15 Configuring sshd
00:43:15 Enabling IPv6 link-local on interface eth0
00:43:17 Interface eth0 has IPv6 link-local address fe80::c00:a9ff:fefe:cadc
00:43:17 Configuring sshd to also listen on fe80::c00:a9ff:fefe:cadc%eth0
00:43:19 Executing cloud-early-config
00:43:20 Bootstrapping systemvm appliance <- sysctl -p in here
```
end state, address gone and sshd only on v4:
```
$ ip -6 addr show dev eth0
(nothing)
$ sysctl -n net.ipv6.conf.eth0.disable_ipv6
1
$ ss -tln | grep 3922
LISTEN 0 128 169.254.202.220:3922 0.0.0.0:*
```
showed it directly on the vm:
```
$ sysctl -qw net.ipv6.conf.eth0.disable_ipv6=0
$ ip -6 addr show dev eth0 scope link
inet6 fe80::c00:a9ff:fefe:cadc/64 scope link
$ sysctl -p
$ ip -6 addr show dev eth0 scope link
(gone)
```
so `listSystemVms` shows a `linklocalip6` that nothing answers on. ping6 and
ssh to it both time out from the host.
the design is fine by the way, once i left ipv6 on and restarted sshd it
worked end to end over `fe80::...%cloud0` on 3922.
can we clear the persistent one too? `common.sh:126-129` already does that
for `net.ipv6.conf.all.disable_ipv6` including rewriting sysctl.conf.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]