** Description changed:
- Reconfiguring between an IPv4-based and an IPv6-based MAAS_URL broke the
- ‘generator’ setting in my pserv.yaml: it ended up being the full IPv4
- netloc, with most of the IPv6 netloc tacked onto it.
+ Reconfiguring when the existing MAAS_URL used an IPv6 host address broke
+ the ‘generator’ setting in my pserv.yaml: it ended up being the full
+ newly configured netloc, with most of the previous IPv6 netloc tacked
+ onto it.
I think that's because the regex in maas-cluster-controller.postinst
mistakes the first colon in an IPv6 address for the beginning of a port
specifier:
- sed -i "s|MAAS_URL=.*|MAAS_URL=\"$RET\"|" /etc/maas/maas_cluster.conf
- # Extract the hostname part.
- HOSTPART=$(echo $RET|awk '{ split($0,array,"/")} END{print array[3]
}')
- # And substitute it in-place in pserv.yaml on an indented,
non-commented
- # line.
- sed -ri
"s|^([[:space:]]+)(#+[[:space:]]*)?(generator:[[:space:]]+https?://)[^:/]+|\1\3$HOSTPART|"
/etc/maas/pserv.yaml
+ sed -i "s|MAAS_URL=.*|MAAS_URL=\"$RET\"|" /etc/maas/maas_cluster.conf
+ # Extract the hostname part.
+ HOSTPART=$(echo $RET|awk '{ split($0,array,"/")} END{print array[3]
}')
+ # And substitute it in-place in pserv.yaml on an indented,
non-commented
+ # line.
+ sed -ri
"s|^([[:space:]]+)(#+[[:space:]]*)?(generator:[[:space:]]+https?://)[^:/]+|\1\3$HOSTPART|"
/etc/maas/pserv.yaml
These things are still best done in Python I suppose.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1373261
Title:
pserv.yaml rewrite breaks when MAAS URL uses IPv6 address
To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1373261/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs