Merge lp:~rodsmith/maas-cert-server/fix-deployment-failures into lp:~hardware-certification/maas-cert-server/trunk

Proposed by Rod Smith
Status: Merged
Approved by: Jeff Lane 
Approved revision: 53
Merged at revision: 53
Proposed branch: lp:~rodsmith/maas-cert-server/fix-deployment-failures
Merge into: lp:~hardware-certification/maas-cert-server/trunk
Diff against target: 71 lines (+29/-10)
3 files modified
debian/changelog (+5/-2)
preseed/curtin_userdata_cert (+12/-4)
preseed/curtin_userdata_ocp (+12/-4)
To merge this branch: bzr merge lp:~rodsmith/maas-cert-server/fix-deployment-failures
Reviewer Review Type Date Requested Status
Jeff Lane  Approve
Review via email: mp+292336@code.launchpad.net

Description of the change

Improve the preseed files' handling of /etc/network/interfaces by having them set the "auto" bringup option for a given interface if and only if the interface can be brought up via dhclient during deployment. If an interface exists but cannot be brought up in this way, its entry is created, but the "auto" option is commented out and a comment advising that cabling be checked is added. This should improve deployment reliability when only some NICs are cabled.

To post a comment you must log in.
Revision history for this message
Jeff Lane  (bladernr) wrote :

Thanks,

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2016-04-06 14:18:09 +0000
+++ debian/changelog 2016-04-20 02:02:59 +0000
@@ -1,9 +1,12 @@
1maas-cert-server (0.2.16-0ppa1) UNRELEASED; urgency=medium1maas-cert-server (0.2.16-0ppa1) trusty; urgency=medium
2
3 * Fix preseeds so that they produce fewer deployment failures if one
4 or more network ports are unplugged at time of deployment.
25
3 * Fix maniacs-setup to support a user home directory named other than6 * Fix maniacs-setup to support a user home directory named other than
4 after the username7 after the username
58
6 -- Rod Smith <rod.smith@canonical.com> Wed, 06 Apr 2016 10:15:32 -04009 -- Rod Smith <rod.smith@canonical.com> Tue, 19 Apr 2016 14:29:07 -0400
710
8maas-cert-server (0.2.15-0ppa1) trusty; urgency=medium11maas-cert-server (0.2.15-0ppa1) trusty; urgency=medium
912
1013
=== modified file 'preseed/curtin_userdata_cert'
--- preseed/curtin_userdata_cert 2016-03-25 19:17:12 +0000
+++ preseed/curtin_userdata_cert 2016-04-20 02:02:59 +0000
@@ -84,10 +84,18 @@
84 echo "# This file created by maas-cert-server curtin preseed script" > /etc/network/interfaces;84 echo "# This file created by maas-cert-server curtin preseed script" > /etc/network/interfaces;
85 echo "auto lo" >> /etc/network/interfaces;85 echo "auto lo" >> /etc/network/interfaces;
86 echo "iface lo inet loopback\n" >> /etc/network/interfaces;86 echo "iface lo inet loopback\n" >> /etc/network/interfaces;
87 echo "auto" >> /etc/network/interfaces;87 for i in `ls /sys/class/net|sort |grep -v -E '(lo|wlan)'`; do
88 for i in `ls /sys/class/net|sort |grep -v -E '(lo|wlan)'`; do 88 if [ `cat /sys/class/net/$i/operstate` != "up" ] ; then
89 /bin/sed -i "/^[ \t]*auto lo.*/! { /^auto/ s/$/ $i/ }" /etc/network/interfaces ;89 dhclient -nw $i ;
90 echo "iface $i inet dhcp" >> /etc/network/interfaces ;90 sleep 15 ;
91 if [ `cat /sys/class/net/$i/operstate` != "up" ] ; then
92 echo "# $i available but inoperative; check its cabling and DHCP server!" >> /etc/network/interfaces ;
93 echo -n "#" >> /etc/network/interfaces ;
94 fi;
95 dhclient -r $i ;
96 fi;
97 echo "auto $i" >> /etc/network/interfaces ;
98 echo "iface $i inet dhcp\n" >> /etc/network/interfaces ;
91 done;99 done;
92 echo "Done.";100 echo "Done.";
93101
94102
=== modified file 'preseed/curtin_userdata_ocp'
--- preseed/curtin_userdata_ocp 2016-03-21 16:58:29 +0000
+++ preseed/curtin_userdata_ocp 2016-04-20 02:02:59 +0000
@@ -71,10 +71,18 @@
71 echo "# This file created by maas-cert-server curtin preseed script" > /etc/network/interfaces71 echo "# This file created by maas-cert-server curtin preseed script" > /etc/network/interfaces
72 echo "auto lo" >> /etc/network/interfaces;72 echo "auto lo" >> /etc/network/interfaces;
73 echo "iface lo inet loopback\n" >> /etc/network/interfaces;73 echo "iface lo inet loopback\n" >> /etc/network/interfaces;
74 echo "auto" >> /etc/network/interfaces;74 for i in `ls /sys/class/net|sort |grep -v -E '(lo|wlan)'`; do
75 for i in `ls /sys/class/net|sort |grep -v -E '(lo|wlan)'`; do 75 if [ `cat /sys/class/net/$i/operstate` != "up" ] ; then
76 /bin/sed -i "/^[ \t]*auto lo.*/! { /^auto/ s/$/ $i/ }" /etc/network/interfaces76 dhclient -nw $i ;
77 echo "iface $i inet dhcp" >> /etc/network/interfaces ;77 sleep 15 ;
78 if [ `cat /sys/class/net/$i/operstate` != "up" ] ; then
79 echo "# $i available but inoperative; check its cabling and DHCP server!" >> /etc/network/interfaces ;
80 echo -n "#" >> /etc/network/interfaces ;
81 fi;
82 dhclient -r $i ;
83 fi;
84 echo "auto $i" >> /etc/network/interfaces ;
85 echo "iface $i inet dhcp\n" >> /etc/network/interfaces ;
78 done;86 done;
79 echo "Done.";87 echo "Done.";
8088

Subscribers

People subscribed via source and target branches

to status/vote changes: