Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1295041 - [RFE] add IPv6 support to ovirt-setup-lib
[RFE] add IPv6 support to ovirt-setup-lib
Status: CLOSED CURRENTRELEASE
Product: ovirt-setup-lib
Classification: oVirt
Component: RFEs (Show other bugs)
1.0.0
Unspecified Unspecified
high Severity medium (vote)
: ovirt-4.2.6
: ---
Assigned To: Yedidyah Bar David
Roni
: FutureFeature
Depends On:
Blocks: RHEV_IPv6 1613507 1613661
  Show dependency treegraph
 
Reported: 2016-01-01 04:26 EST by Yevgeny Zaspitsky
Modified: 2018-09-03 11:08 EDT (History)
8 users (show)

See Also:
Fixed In Version: ovirt-setup-lib-1.1.5-1
Doc Type: Enhancement
Doc Text:
Previously, the engine-setup tool did not support host names that only resolved to an IPv6 address. In this release, the engine-setup tool supports host names that only resolve to an IPv6 address.
Story Points: ---
Clone Of:
: 1613507 (view as bug list)
Environment:
Last Closed: 2018-09-03 11:08:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.2+
mburman: testing_plan_complete-
ylavi: planning_ack+
rule-engine: devel_ack+
mburman: testing_ack+


Attachments (Terms of Use)
terminal log of engine-setup (264.16 KB, text/plain)
2018-06-29 06:44 EDT, Dominik Holler
no flags Details
setup-engine_with_ipv4 (10.70 KB, text/plain)
2018-07-03 10:09 EDT, Roni
no flags Details
setup-engine_with_ipv6 (12.85 KB, text/plain)
2018-07-03 10:09 EDT, Roni
no flags Details
setup-engine_ipv6_no_virbr0 (11.46 KB, text/plain)
2018-07-03 10:39 EDT, Roni
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 92832 master MERGED hostname: Support IPv6 2018-08-06 09:43 EDT
oVirt gerrit 93494 ovirt-4.2 MERGED hostname: Support IPv6 2018-08-07 09:08 EDT
oVirt gerrit 93495 ovirt-4.2 MERGED hostname: Drop IPv6 scope ID if found 2018-08-07 09:08 EDT

  None (edit)
Description Yevgeny Zaspitsky 2016-01-01 04:26:12 EST
Description of problem:
Setup does not allow defining engine hostname as one that resolves to ipv6 address only.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Red Hat Bugzilla Rules Engine 2016-01-10 02:22:06 EST
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.
Comment 2 Sandro Bonazzola 2016-01-21 10:06:51 EST
Simone, is this ovirt-setup-lib related? Or ovirt-engine-setup?
Comment 3 Simone Tiraboschi 2016-02-01 06:36:30 EST
(In reply to Sandro Bonazzola from comment #2)
> Simone, is this ovirt-setup-lib related? Or ovirt-engine-setup?

Probably both
Comment 4 Dominik Holler 2018-06-29 06:44 EDT
Created attachment 1455492 [details]
terminal log of engine-setup

engine-setup works in IPv6. Ip is important to use engine-setup in offline mode, because the repos are net yet IPv6. After engine-setup webadmin is accessible via IPv6.
Comment 5 Roni 2018-07-03 10:09 EDT
Created attachment 1456252 [details]
setup-engine_with_ipv4
Comment 6 Roni 2018-07-03 10:09 EDT
Created attachment 1456253 [details]
setup-engine_with_ipv6
Comment 7 Roni 2018-07-03 10:13:38 EDT
There is an issue with IPv6 FQDN resolving.
IPv6 FQDN does not recognize by engine-setup

* A workaround is by setting 'hostname' as FQDN
(hostnamectl --set-hostname FQDN)

* Due to lack of IPv6 DHCP server and Domain Name resolving, 
test is using Static IPv6, and '/etc/hosts'

* Same scenario with IPv4 works fine!


NOTES:
======
1. setup-engine must be run with --offline (see Dominik's comments above) 
2. OVN must be set to 'No' during setup-engine due to following issue: https://bugzilla.redhat.com/show_bug.cgi?id=1593252


Scenario:
=========
1. Disable IPv4 for localhost

set /etc/hosts
#127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
2001::2     engine.ipv6


2. Disable IPv4 and enable only IPv6

cat /etc/sysconfig/network-scripts/ifcfg-eth0 
NAME="eth0"
HWADDR="00:1A:4A:16:98:76"
ONBOOT="yes"
NETBOOT="yes"
UUID="60de5581-79a7-4859-895e-29bf56f902e4"
IPV6INIT="yes"
#BOOTPROTO="dhcp"
BOOTPROTO="none"
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6ADDR="2001::2"

3. run engine-setup --offline
for the OVN question choose 'No'


Results:
========
- engine-setup will give and error, see attached setup-engine_with_ipv6
  WebUI will reject login due to mismatch FQDN 
- same scenario with IPv4 words fine, see attached  setup-engine_with_ipv4
Comment 8 Roni 2018-07-03 10:25:41 EDT
editing above comment....

Scenario:
=========
1. Disable IPv4 for localhost & define the IPv6 FQDN locally
2. Disable IPv4 and add static IPv6
Comment 9 Roni 2018-07-03 10:39 EDT
Created attachment 1456258 [details]
setup-engine_ipv6_no_virbr0
Comment 10 Roni 2018-07-03 11:06:39 EDT
According to Dominik Holler: "this has to be fixed in ovirt-setup-lib"

"<dholler> (I located the code which has to be changed in /usr/lib/python2.7/site-packages/ovirt_setup_lib/hostname.py)"
Comment 11 Yedidyah Bar David 2018-07-04 03:50:48 EDT
(In reply to Roni from comment #7)
> Results:
> ========
> - engine-setup will give and error, see attached setup-engine_with_ipv6

Please always attach the generated logs, as output by engine-setup:


[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20180703153401-4xmmu7.log

Thanks.

In current case, that's not needed:

(In reply to Roni from comment #10)
> According to Dominik Holler: "this has to be fixed in ovirt-setup-lib"
> 
> "<dholler> (I located the code which has to be changed in
> /usr/lib/python2.7/site-packages/ovirt_setup_lib/hostname.py)"

Indeed, in getResolvedAddresses.
Comment 12 Yedidyah Bar David 2018-07-04 03:58:35 EDT
(In reply to Yedidyah Bar David from comment #11)
> Indeed, in getResolvedAddresses.

Patching just this function (removing the third argument AF_INET) is not enough, will look at this later.
Comment 13 Dan Kenigsberg 2018-07-17 03:44:57 EDT
Sandro, may we attempt to solve this sooner than later? This may be raised as a hurdle for SHE-on-ipv6.
Comment 14 Sandro Bonazzola 2018-08-08 02:47:24 EDT
fix for this bug is included in ovirt-setup-lib-1.1.5-1 which is available for testing using https://resources.ovirt.org/pub/yum-repo/ovirt-release42-pre.rpm
Comment 15 Michael Burman 2018-08-20 07:20:16 EDT
Setting oVirt team as Network. I need this bug visible in our sprint board as we are the qa contact of this fix.
Comment 16 Roni 2018-08-20 11:40:59 EDT
verified on: 4.2.6.3-0.1.el7ev
Comment 17 Roni 2018-08-21 02:35:44 EDT
build 4.2.6.3-0.1.el7ev include: ovirt-setup-lib-1.1.5-1.el7ev.noarch

Note You need to log in before you can comment on or make changes to this bug.