[RFE] ping_metadata_ip in 20-os-net-config should be waiting for X second(s) between each ping

Bug #1735849 reported by David Vallee Delisle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
David Vallee Delisle

Bug Description

os-net-config just sends a bunch of pings without waiting for anything in /usr/libexec/os-refresh-config/configure.d/20-os-net-config. There are some situations where a ping will fail instantly thus not leaving enough time for a port to come up.

Current code:
~~~
   until ping -c 1 $METADATA_IP &> /dev/null; do
      COUNT=$(( $COUNT + 1 ))
      if [ $COUNT -eq 10 ]; then
        echo "FAILURE"
        echo "$METADATA_IP is not pingable." >&2
        exit 1
      fi
    done
~~~

It could be like this:
~~~
   until ping -c 1 -W 1 $METADATA_IP > /dev/null; do
      COUNT=$(( $COUNT + 1 ))
      if [ $COUNT -eq $METADATA_IP_PING_TIMEOUT ]; then
        echo "FAILURE"
        echo "$METADATA_IP is not pingable." >&2
        exit 1
      fi
    done
~~~

That way, we are going to try 1 ping every second, for $METADATA_IP_PING_TIMEOUT and it's going to be possible to define that amount of time.

Steps to Reproduce:
1. Disable portfast on switches
2. overcloud deploy
3.

Actual results:
Overcloud deploy fails because the ports can take 15-30 seconds to come up

Expected results:
os-net-config should wait a bit more time before failing

Dan Sneddon (dsneddon)
Changed in os-net-config:
assignee: nobody → Dan Sneddon (dsneddon)
importance: Undecided → Medium
affects: os-net-config → tripleo
Revision history for this message
David Vallee Delisle (valleedelisle) wrote :

I went ahead and submitted a patch https://review.openstack.org/#/c/536041/

Changed in tripleo:
assignee: Dan Sneddon (dsneddon) → David Vallee Delisle (valleedelisle)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.openstack.org/567586

Changed in tripleo:
milestone: none → rocky-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-image-elements (master)

Reviewed: https://review.openstack.org/536041
Committed: https://git.openstack.org/cgit/openstack/tripleo-image-elements/commit/?id=d0de91cd78d88fcb10c88bdb3fa4769e37e22280
Submitter: Zuul
Branch: master

commit d0de91cd78d88fcb10c88bdb3fa4769e37e22280
Author: David Vallee Delisle <email address hidden>
Date: Sat Jan 20 12:15:11 2018 -0500

    Add a 60 seconds timeout to ping_metadata_ip()

    Closes-Bug: #1735849

    Change-Id: I1004c2d764339c30653e2f4a3c7aee1343a20b4e

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-image-elements 9.0.0.0b2

This issue was fixed in the openstack/tripleo-image-elements 9.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/567586
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=ea4e58256784c24b90d736a2c7f1d43a404362cd
Submitter: Zuul
Branch: master

commit ea4e58256784c24b90d736a2c7f1d43a404362cd
Author: David Vallee Delisle <email address hidden>
Date: Thu May 10 09:24:21 2018 -0400

    Add a 60 seconds timeout to ping_metadata_ip()

    Change-Id: I1e476093a16848a4fd702eb8efacc420b6c2255a
    Closes-Bug: #1735849

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 10.0.0

This issue was fixed in the openstack/tripleo-heat-templates 10.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.