Bug 1366270
| Summary: | hosted-engine-setup (and cockpit) accepts host address with an underscore while the engine correctly refuses them | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Sachin Raje <sraje> |
| Component: | ovirt-hosted-engine-setup | Assignee: | Simone Tiraboschi <stirabos> |
| Status: | CLOSED ERRATA | QA Contact: | Nikolai Sednev <nsednev> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.6.6 | CC: | lsurette, melewis, michal.skrivanek, ycui, ykaul, ylavi, yzhao |
| Target Milestone: | ovirt-4.1.0-alpha | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | integration | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Previously, hosted-engine-setup and cockpit incorrectly accepted host addresses containing underscores. The Manager correctly refused the addresses. This meant that hosted-engine-setup would fail while trying to add the host to the Manager and the user had to cleanup and restart the installation. Now, the host address syntax is validated in hosted-engine-setup and hosted-engine-setup will refuse to deploy is the address syntax is invalid.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-04-25 00:43:07 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Integration | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1380629 | ||
|
Description
Sachin Raje
2016-08-11 12:51:48 UTC
The engine VM should already re-start from the initial vm.conf till we get a valid OVF_STORE; this sequence can be repeated as many time as we want. I suspect that the issue was somewhere else. OK, in this case the issue was here:
12:13:55,652::heconflib::111::ovirt_hosted_engine_ha.agent.hosted_engine.HostedEngine.config::(validateConfImage) 'version' is not stored in the HE configuration image
We got this since the setup failed before completing.
In this case the setup failed since:
2016-09-06 19:57:24 DEBUG otopi.plugins.gr_he_setup.engine.add_host add_host._closeup:614 Cannot add the host to cluster Default
Traceback (most recent call last):
File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-setup/engine/add_host.py", line 604, in _closeup
otopicons.NetEnv.IPTABLES_ENABLE
File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/brokers.py", line 18305, in add
headers={"Correlation-Id":correlation_id, "Expect":expect}
File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", line 79, in add
return self.request('POST', url, body, headers, cls=cls)
File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", line 122, in request
persistent_auth=self.__persistent_auth
File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/connectionspool.py", line 79, in do_request
persistent_auth)
File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/connectionspool.py", line 156, in __do_request
raise errors.RequestError(response_code, response_reason, response_body)
RequestError:
status: 400
reason: Bad Request
detail: Host address must be a FQDN or a valid IP address
2016-09-06 19:57:24 ERROR otopi.plugins.gr_he_setup.engine.add_host add_host._closeup:622 Cannot automatically add the host to cluster Default:
Host address must be a FQDN or a valid IP address
and at the end:
2016-09-06 19:59:31 DEBUG otopi.context context._executeMethod:128 Stage terminate METHOD otopi.plugins.gr_he_common.core.misc.Plugin._terminate
2016-09-06 19:59:31 ERROR otopi.plugins.gr_he_common.core.misc misc._terminate:180 Hosted Engine deployment failed: this system is not reliable, please check the issue,fix and redeploy
The root cause is that:
2016-09-06 19:59:31 DEBUG otopi.context context.dumpEnvironment:770 ENV OVEHOSTED_NETWORK/host_name=str:'rhv_prod_h01.!!!MASKED!!!'
is not a valid fqdn since it contains underscores which is not an allowed char for an hostname and so the agent is correctly refusing to deploy that host.
Please try again with a valid hostname.
On the other side cockipt and ovirt-hosted-engine-setup should fail before with a clear error.
Works for me on these components on host: rhvm-appliance-4.1.20170126.0-1.el7ev.noarch ovirt-imageio-common-1.0.0-0.el7ev.noarch ovirt-hosted-engine-ha-2.1.0.1-1.el7ev.noarch ovirt-hosted-engine-setup-2.1.0.1-1.el7ev.noarch ovirt-engine-sdk-python-3.6.9.1-1.el7ev.noarch ovirt-host-deploy-1.6.0-1.el7ev.noarch ovirt-vmconsole-1.0.4-1.el7ev.noarch ovirt-node-ng-nodectl-4.1.0-0.20170104.1.el7.noarch libvirt-client-2.0.0-10.el7_3.4.x86_64 qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64 vdsm-4.19.4-1.el7ev.x86_64 sanlock-3.4.0-1.el7.x86_64 ovirt-vmconsole-host-1.0.4-1.el7ev.noarch mom-0.5.8-1.el7ev.noarch ovirt-imageio-daemon-1.0.0-0.el7ev.noarch ovirt-setup-lib-1.1.0-1.el7ev.noarch Linux version 3.10.0-514.6.1.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Sat Dec 10 11:15:38 EST 2016 Linux 3.10.0-514.6.1.el7.x86_64 #1 SMP Sat Dec 10 11:15:38 EST 2016 x86_64 x86_64 x86_64 GNU/Linux Red Hat Enterprise Linux release 7.3 If incorrect FQDN of form a_b_c.some.domain.com being used, then in Cockpit customer being asked again to provide the correct FQDN, till correct FQDN is provided and then deployment continues as expected. |