virtualbox scripts calls ping incorrectly

Bug #1412459 reported by Vasiliy Pleshakov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Serhii Ovsianikov

Bug Description

in functions/product.sh in function enable_outbound_network_for_product_vm() we call ping utility with '-c' argument.
Unfortunately in CYGWIN it runs windows version of ping utility and there is no '-c' argument.

Steps to reproduce:
  1. get windows
  2. install cygwin with default packages
  3. download and unpack vbox scripts.
  4. put MirantisOpenStack-5.1.iso in it's iso directory.
  5. run launch.sh in CYGWIN console and wait until MOS installation finish.
  6. put '-x' into shebang line in actions/master-node-enable-internet.sh script to enable debug output.
  6. run actions/master-node-enable-internet.sh in CYGWIN console

Expected result:
script run ping utility to check for internet connectivity on the host system. And ping should run normally and return true or false depending on internet connectivity.

Actual result:
Ping utility fails with error "Bad option -c" but returns 0 therefore script always decides there is internet connectivity.

Workaround:
Add case-esac part into enable_outbound_network_for_product_vm() function:
    # Check for internet access on the host system
    echo -n "Checking for internet connectivity on the host system... "
    case "$(uname)" in
    CYGWIN*)
        ping_count_opt="-n"
        ;;
    *)
        ping_count_opt="-c"
        ;;
    esac
    if [ "`ping ${ping_count_opt} 5 google.com || ping ${ping_count_opt} 5 wikipedia.com`" ]; then
        echo "OK"
    else
        echo "FAIL"
        print_no_internet_connectivity_banner
    return 1
    fi

Revision history for this message
Vasiliy Pleshakov (vpleshakov) wrote :
Changed in fuel:
assignee: nobody → Fuel Library Team (fuel-library)
importance: Undecided → High
status: New → Triaged
tags: added: low-hanging-fruit
Changed in fuel:
milestone: none → 6.0.1
assignee: Fuel Library Team (fuel-library) → Serhiy Ovsianikov (sovsianikov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-main (master)

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

Changed in fuel:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-docs (master)

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

Changed in fuel:
assignee: Serhiy Ovsianikov (sovsianikov) → Meg McRoberts (dreidellhasa)
Changed in fuel:
assignee: Meg McRoberts (dreidellhasa) → Serhiy Ovsianikov (sovsianikov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-docs (master)

Reviewed: https://review.openstack.org/150948
Committed: https://git.openstack.org/cgit/stackforge/fuel-docs/commit/?id=f2b02d3666cf2c4b1fc57763292a6cce08630544
Submitter: Jenkins
Branch: master

commit f2b02d3666cf2c4b1fc57763292a6cce08630544
Author: Meg McRoberts <email address hidden>
Date: Wed Jan 28 12:07:27 2015 -0800

    Add ping to the list of commands needed for cygwin

    This should be applied to master, stable/6.0, and stable/5.1

    Change-Id: Ia591b151dc05d560b11f39cf3adb5301b4059f15
    Partial-Bug: 1412459

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-docs (stable/6.0)

Fix proposed to branch: stable/6.0
Review: https://review.openstack.org/153756

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-docs (stable/6.0)

Reviewed: https://review.openstack.org/153756
Committed: https://git.openstack.org/cgit/stackforge/fuel-docs/commit/?id=0e5113703e18146cd289a6418200f28825dd44ad
Submitter: Jenkins
Branch: stable/6.0

commit 0e5113703e18146cd289a6418200f28825dd44ad
Author: Meg McRoberts <email address hidden>
Date: Wed Jan 28 12:07:27 2015 -0800

    Add ping to the list of commands needed for cygwin

    This should be applied to master, stable/6.0, and stable/5.1

    Change-Id: Ia591b151dc05d560b11f39cf3adb5301b4059f15
    Partial-Bug: 1412459
    (cherry picked from commit f2b02d3666cf2c4b1fc57763292a6cce08630544)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-main (master)

Reviewed: https://review.openstack.org/149755
Committed: https://git.openstack.org/cgit/stackforge/fuel-main/commit/?id=af0c869d891b2e90a8be03c08aaaba1eb7e2ab79
Submitter: Jenkins
Branch: master

commit af0c869d891b2e90a8be03c08aaaba1eb7e2ab79
Author: Serhiy Ovsianikov <email address hidden>
Date: Fri Jan 23 23:01:16 2015 +0200

    VirtualBox scripts calls ping incorrectly

    Fixed checking for Internet connectivity on the host computer,
    fixed bug call ping utility with different arguments and under
    different systems. Added check run docker container cobbler
    on the master node.

    Change-Id: If8a8862faca083f038d184e11c5a0d057eb91b56
    Closes-Bug: #1412459

Changed in fuel:
status: In Progress → Fix Committed
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.