samples/local.sh get IP1 IP2 value not correct with $5

Bug #1549091 reported by Paco Peng
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octavia
Fix Released
Medium
Paco Peng

Bug Description

octavia/devstack/samples/local.sh

 46 IP1=$(nova show node1 | grep "private network" | awk '{print $5}')
 47 IP2=$(nova show node2 | grep "private network" | awk '{print $5}')

need to change $5 to $6 otherwise, parameter $IP will get the IP V6 hexadecimal value

stack@nsj29:~/octavia/devstack/samples$ IP1=$(nova show node1 | grep "private network" | awk '{print $5}')
stack@nsj29:~/octavia/devstack/samples$ echo $IP1
fdc0:7b50:e8d6:0:f816:3eff:feb6:91b5,

stack@nsj29:~/octavia/devstack/samples$ scp -i ${DEVSTACK_LBAAS_SSH_KEY} -o StrictHostKeyChecking=no ${TOP_DIR}/webserver.sh cirros@${IP1}:webserver.sh
ssh: Could not resolve hostname fdc0: Name or service not known
lost connection

stack@nsj29:~/octavia/devstack/samples$ IP1=$(nova show node1 | grep "private network" | awk '{print $6}')
stack@nsj29:~/octavia/devstack/samples$ echo $IP1
10.0.0.121
stack@nsj29:~/octavia/devstack/samples$

stack@nsj29:~/octavia/devstack/samples$ scp -i ${DEVSTACK_LBAAS_SSH_KEY} -o StrictHostKeyChecking=no ${TOP_DIR}/webserver.sh cirros@${IP1}:webserver.sh
webserver.sh 100% 278 0.3KB/s 00:00

Changed in octavia:
assignee: nobody → Paco Peng (pzx-hero-19841002)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to octavia (master)

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

Changed in octavia:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on octavia (master)

Change abandoned by Paco Peng (<email address hidden>) on branch: master
Review: https://review.openstack.org/284527

Changed in octavia:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to octavia (master)

Reviewed: https://review.openstack.org/283929
Committed: https://git.openstack.org/cgit/openstack/octavia/commit/?id=05b3f7dce74cd92051d6aaf00a277da772e6d8ff
Submitter: Jenkins
Branch: master

commit 05b3f7dce74cd92051d6aaf00a277da772e6d8ff
Author: Peng Zhi Xiong <email address hidden>
Date: Fri Feb 19 18:44:52 2016 -0800

    Fixed make sure to get IPv4 value by awk in sample local.sh file

    Since the end user may enable IPv6. the nova-show command will
    display network information format randomly. this fix will make
    sure always get IPv4 value to avoid error in rest steps

    Closes-bug: #1549091
    Change-Id: I69e1fbb6f625e3a9491ee9e69263ed578c03610f

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