File tree Expand file tree Collapse file tree 9 files changed +19
-7
lines changed Expand file tree Collapse file tree 9 files changed +19
-7
lines changed Original file line number Diff line number Diff line change
1
+ 2015-03-13, v0.18.1
2
+ * HELPER: Fix a bug in ConfigureNetwork task that caused a syntax error
3
+ if the SUBNET was missing for a NIC
1
4
2015-03-03, v0.18
2
5
* HELPER: Auto-detect OSFAMILY and ROOT_PARTITION properties if missing
3
6
* HELPER: Add new CofigureNetwork image configuration task
Original file line number Diff line number Diff line change 1
- __version__ = "0.18next "
1
+ __version__ = "0.18.1next "
Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ grep -v "ifconfig_$driver$index" "$CONF" > "$tmp_config"
72
72
cat " $tmp_config " > " $CONF "
73
73
74
74
if [ " $ipv4 " = ' static' ]; then
75
- echo " ifconfig_$driver$index =\" inet $IP netmask $( cidr2mask " ${SUBNET##*/ } " ) \" " >> " $CONF "
75
+ netmask=$( cidr2mask " ${SUBNET##*/ } " )
76
+ echo " ifconfig_$driver$index =\" inet $IP netmask $netmask \" " >> " $CONF "
76
77
if [ -n " $GATEWAY " ]; then
77
78
sed -i ' /^defaultrouter=/d' " $CONF "
78
79
echo " defaultrouter=\" $GATEWAY \" " >> " $CONF "
Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ if [ "$ipv4" != none -o "$ipv6" != none ]; then
73
73
fi
74
74
75
75
if [ " $ipv4 " = ' static' ]; then
76
- echo " inet $IP netmask $( cidr2mask " ${SUBNET##*/ } " ) " >> " $IFCONFIG "
76
+ netmask=$( cidr2mask " ${SUBNET##*/ } " )
77
+ echo " inet $IP netmask $netmask " >> " $IFCONFIG "
77
78
if [ -n " $GATEWAY " ]; then
78
79
sed -i ' /^defaultroute=/d' " $RC_CONF "
79
80
echo " defaultroute=$GATEWAY " >> " $RC_CONF "
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ SYSCTL="$SNF_IMAGE_TARGET/etc/sysctl.conf"
69
69
cat /dev/null > " $HOSTNAME "
70
70
71
71
if [ " $ipv4 " = ' static' ]; then
72
- echo " inet $IP $( cidr2mask " ${SUBNET##*/ } " ) NONE" >> " $HOSTNAME "
72
+ netmask=$( cidr2mask " ${SUBNET##*/ } " )
73
+ echo " inet $IP $netmask NONE" >> " $HOSTNAME "
73
74
if [ -n " $GATEWAY " ]; then
74
75
echo " $GATEWAY " > " $MYGATE "
75
76
fi
Original file line number Diff line number Diff line change @@ -70,7 +70,8 @@ echo -e "DEVICE=eth${index}\nONBOOT=yes\nHWADDR=$MAC" > "$IFCFG"
70
70
echo " NM_CONTROLLED=yes" >> " $IFCFG "
71
71
72
72
if [ " $ipv4 " = ' static' ]; then
73
- echo -e " BOOTPROTO=static\nIPADDR=$IP \nNETMASK=$( cidr2mask " ${SUBNET##*/ } " ) " >> " $IFCFG "
73
+ netmask=$( cidr2mask " ${SUBNET##*/ } " )
74
+ echo -e " BOOTPROTO=static\nIPADDR=$IP \nNETMASK=$netmask " >> " $IFCFG "
74
75
elif [ " $ipv4 " = ' dhcp' ]; then
75
76
echo -e " BOOTPROTO=dhcp" >> " $IFCFG "
76
77
else
Original file line number Diff line number Diff line change @@ -92,6 +92,11 @@ for index in $(seq 0 $((NIC_COUNT-1))); do
92
92
done
93
93
done
94
94
95
+ # If the subnet is missing, the card cannot be configure in a static way
96
+ if [ -z " ${SUBNET} " ]; then
97
+ dhcp=yes
98
+ fi
99
+
95
100
if [ -n " ${IP} " ]; then
96
101
ipv4=yes
97
102
fi
Original file line number Diff line number Diff line change 1
- 0.18next
1
+ 0.18.1next
Original file line number Diff line number Diff line change 1
- m4_define ( [ devflow_version] , [ 0.18next ] )
1
+ m4_define ( [ devflow_version] , [ 0.18.1next ] )
You can’t perform that action at this time.
0 commit comments