Implement DNS resolution for secondary pool addresses
Test Plan: [PASS] AIO-SX/DX IPv4 deployment: - Bootstrap (single-stack) without issues. - Create mgmt vlan network and also secondary pool and test other node bootstrap without issues - check host swact (for AIO-DX) is operational. - check lock/unlock without issues [PASS] AIO-SX/DX IPv6 deployment: Test same as above Story: 2011027 Task: 49768 Change-Id: I30ea3a26a5b46a9aad082e89fba83aa476c50079 Signed-off-by: Tara Nath Subedi <Tara.Subedi@windriver.com>
This commit is contained in:
parent
91ae9c3db2
commit
71eb3ec49f
|
@ -2719,31 +2719,16 @@ else # vlan
|
|||
ilog "Configuring vlan: boot_iface=vlan${mgmt_vlan}"
|
||||
|
||||
# Check whether to use inet or inet6
|
||||
ipv6_addr=$(dig +short AAAA controller.internal)
|
||||
|
||||
if [[ -z "${ipv6_addr}" ]]
|
||||
# Check for IPv4 format (3 digits followed by a dot, repeated 3 times, and another 3 digits)
|
||||
if [[ $mgmt_ip =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]];
|
||||
then
|
||||
# during an upgrade the controller.internal may not be defined
|
||||
# but the scenario could be IPv6. So try to resolve the controller
|
||||
ipv6_addr=$(dig +short AAAA controller)
|
||||
|
||||
# due to the alias in the /etc/dnsmasq.conf:
|
||||
# cname=controller,controller.internal
|
||||
# An IPv4 scenario may answer "controller.internal." even for an IPv6 DIG
|
||||
# for this reason, remove the "controller.internal." from the result
|
||||
fqdn_pattern="controller.internal."
|
||||
ipv6_addr=${ipv6_addr/${fqdn_pattern}/}
|
||||
fi
|
||||
|
||||
if [[ -n "${ipv6_addr}" ]]
|
||||
then
|
||||
boot_address_family=inet6
|
||||
ipv6init=yes
|
||||
dhcpv6c=yes
|
||||
else
|
||||
boot_address_family=inet
|
||||
ipv6init=no
|
||||
dhcpv6c=no
|
||||
else
|
||||
boot_address_family=inet6
|
||||
ipv6init=yes
|
||||
dhcpv6c=yes
|
||||
fi
|
||||
|
||||
# Persist the boot device to the platform configuration. This will get
|
||||
|
|
Loading…
Reference in New Issue