From b91e21243497cf2b36a5998e1b651443ca7f753e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Rousseau?= Date: Mon, 2 Dec 2019 13:06:59 +0100 Subject: [PATCH] Break retry loop on success in dhcp-all-interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If rdisc6 is available, a node using this element will loops until DIB_DHCP_TIMEOUT is reached because of a missing 'break' when rdisc6 return code is 0. This will mark the dhcp-interface@.service unit as failed (because it has the same timeout) and not bring any network interface online. Change-Id: I034dcda94d765f236950ebcbee36789f5bdc515f Closes-Bug: #1854717 Signed-off-by: Hervé Rousseau --- .../dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh | 1 + releasenotes/notes/fix_rdisc6_loop-32a308a97de99f0f.yaml | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 releasenotes/notes/fix_rdisc6_loop-32a308a97de99f0f.yaml diff --git a/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh b/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh index 1e534884..1a2e6963 100755 --- a/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh +++ b/diskimage_builder/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.sh @@ -162,6 +162,7 @@ function inspect_interface() { ipv6_init=True ipv6_AdvManagedFlag=$(echo "$RA" | grep "Stateful address conf." | awk -F: '{ print $2 }') ipv6_AdvOtherConfigFlag=$(echo "$RA" | grep "Stateful other conf." | awk -F: '{ print $2 }') + break elif [ $return_code -eq 1 ]; then sleep 1 elif [ $return_code -eq 2 ]; then diff --git a/releasenotes/notes/fix_rdisc6_loop-32a308a97de99f0f.yaml b/releasenotes/notes/fix_rdisc6_loop-32a308a97de99f0f.yaml new file mode 100644 index 00000000..79aeb28e --- /dev/null +++ b/releasenotes/notes/fix_rdisc6_loop-32a308a97de99f0f.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + The ``dhcp-all-interfaces`` element could not configure network interfaces + properly when ``rdisc6`` is present on the system