fix bug: waagent could not get IPv4 if IPv6 is enabled on FreeBSD #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1. Customer Scenario Impact
waagent could get IPv4 if IPv6 is enabled on FreeBSD, thus FreeBSD VM provioning always fail in azure. Attach the error log of waagent.
In FreeBSD VM:
vi /etc/rc.conf
ifconfig_hn0="SYNCDHCP"
ifconfig_hn0_ipv6="inet6 accept_rtadv"
. 3. Root Cause
In GetFreeBSDEthernetInfo function in waagent.py:
cmd='ifconfig | grep -A1 -B2 ether | grep -B3 inet | grep -A3 UP '
When IPv6 is enabled, it will always get the IPv6 address
#4. Fix & Work around:
Disable IPv6 in the FreeBSD vhd