Bug 1667336

Summary: Hosted engine deploys failed with static IPv6 network as value "get_gateway" is undefined.
Product: Red Hat Enterprise Virtualization Manager Reporter: Wei Wang <weiwang>
Component: ovirt-hosted-engine-setupAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: meital avital <mavital>
Severity: urgent Docs Contact:
Priority: high    
Version: 4.3.0CC: cshao, huzhao, lsurette, qiyuan, weiwang, yaniwang, ycui, yturgema
Target Milestone: ovirt-4.3.0Keywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-08 12:32:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1630267    
Attachments:
Description Flags
value "get_gateway" is undefined none

Description Wei Wang 2019-01-18 08:04:52 UTC
Created attachment 1521431 [details]
value "get_gateway" is undefined

Description of problem:
Hosted engine deploys failed with static IPv6 network. After all of the settings input, when it run task "Get default gateway" in validate_gateway.yml,
failed as value "get_gateway" is undefined.

2019-01-18 12:33:57,678+0800 ERROR otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:98 fatal: [localhost]: FAILED! => {"msg": "The task 
includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to have been in 
'/usr/share/ansible/roles/oVirt.hosted-engine-setup/tasks/pre_checks/validate_gateway.yml': line 9, column 5, but may\nbe elsewhere in the file depending on the 
exact syntax problem.\n\nThe offending line appears to be:\n\n  - debug: var=get_gateway\n  - name: Set he_gateway\n    ^ here\n"}

After check the code in the yml file, the shell command #5 "ip r|grep default| awk '{print $3}' is for ipv4, so this is the root cause.


Version-Release number of selected component (if applicable):
RHVH-4.3-20190115.0-RHVH-x86_64-dvd1.iso
cockpit-176-4.el7.x86_64
cockpit-machines-ovirt-176-4.el7.noarch
cockpit-bridge-176-4.el7.x86_64
cockpit-storaged-176-4.el7.noarch
cockpit-ovirt-dashboard-0.12.0-1.el7ev.noarch
cockpit-dashboard-176-4.el7.x86_64
cockpit-system-176-4.el7.noarch
cockpit-ws-176-4.el7.x86_64
ovirt-hosted-engine-ha-2.3.0-1.el7ev.noarch
ovirt-hosted-engine-setup-2.3.2-1.el7ev.noarch
rhvm-appliance-4.3-20190115.0.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Clean install RHVH-4.3-20190115.0-RHVH-x86_64-dvd1.iso
2. Configure the host with static IPv6 network
3. Deploy Hosted-engine with CLI
    #hosted-engine --deploy

Actual results:
Hosted engine deploys failed with static IPv6 network as value "get_gateway" is undefined.

Expected results:
Hosted engine deployed with static IPv6 network should be successful without error.

Additional info:

Comment 2 Wei Wang 2019-02-02 01:09:22 UTC
Test with RHVH-4.3-20190124.0-RHVH-x86_64-dvd1.iso, the bug has been fixed already.
Change the status to "VERIFIED".

Comment 4 errata-xmlrpc 2019-05-08 12:32:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:1050