Bug 1518887 - ovirt-ha-agent fails parsing the OVF_STORE due to a change in OVF namespace URI
Summary: ovirt-ha-agent fails parsing the OVF_STORE due to a change in OVF namespace URI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-ha
Classification: oVirt
Component: Agent
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ovirt-4.2.0
: ---
Assignee: Martin Sivák
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks: 1530605
TreeView+ depends on / blocked
 
Reported: 2017-11-29 17:28 UTC by Simone Tiraboschi
Modified: 2021-03-11 18:53 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 1530605 (view as bug list)
Environment:
Last Closed: 2017-12-20 11:03:54 UTC
oVirt Team: SLA
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: blocker+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 84933 0 master MERGED Support the proper OVF namespace engine uses since oVirt 4.2 2017-11-30 11:17:14 UTC
oVirt gerrit 85697 0 v2.1.z MERGED Support the proper OVF namespace engine uses since oVirt 4.2 2018-02-06 11:42:13 UTC

Description Simone Tiraboschi 2017-11-29 17:28:28 UTC
Description of problem:
https://gerrit.ovirt.org/#/c/84802/ changed the OVF structure replacing 'http://schemas.dmtf.org/ovf/envelope/1/' with 'http://schemas.dmtf.org/ovf/envelope/1'

and now ovirt-ha-agent fails with:

MainThread::INFO::2017-11-29 18:11:47,247::upgrade::994::ovirt_hosted_engine_ha.lib.upgrade.StorageServer::(upgrade_35_36) Host configuration is already up-to-date
MainThread::INFO::2017-11-29 18:11:47,281::ovf_store::118::ovirt_hosted_engine_ha.lib.ovf.ovf_store.OVFStore::(scan) Found OVF_STORE: imgUUID:d03204ff-8832-4d9a-a065-6c5d0574e3bd, volUUID:ed86bf8b-1089-4b6c-b38c-961808f28860
MainThread::INFO::2017-11-29 18:11:47,362::ovf_store::118::ovirt_hosted_engine_ha.lib.ovf.ovf_store.OVFStore::(scan) Found OVF_STORE: imgUUID:6aac1bc0-e668-4040-b390-9ba6c395b52f, volUUID:3a608038-d2cc-494a-8c50-692f11b1e46f
MainThread::INFO::2017-11-29 18:11:47,424::ovf_store::149::ovirt_hosted_engine_ha.lib.ovf.ovf_store.OVFStore::(getEngineVMOVF) OVF_STORE volume path: /var/run/vdsm/storage/1f71b5f9-5cfa-459c-8ec2-ee48c9731f60/6aac1bc0-e668-4040-b390-9ba6c395b52f/3a608038-d2cc-494a-8c50-692f11b1e46f
MainThread::ERROR::2017-11-29 18:11:47,433::agent::144::ovirt_hosted_engine_ha.agent.agent.Agent::(_run_agent) Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/agent/agent.py", line 131, in _run_agent
    return action(he)
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/agent/agent.py", line 55, in action_proper
    return he.start_monitoring()
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/agent/hosted_engine.py", line 428, in start_monitoring
    self._config.refresh_vm_conf()
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/env/config.py", line 515, in refresh_vm_conf
    content_from_ovf = self._get_vm_conf_content_from_ovf_store()
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/env/config.py", line 443, in _get_vm_conf_content_from_ovf_store
    conf = ovf2VmParams.confFromOvf(heovf)
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/ovf/ovf2VmParams.py", line 286, in confFromOvf
    vmConf = toDict(ovf)
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/ovf/ovf2VmParams.py", line 213, in toDict
    vmParams['vmId'] = tree.find('Content/Section').attrib[OVF_NS + 'id']
  File "lxml.etree.pyx", line 2272, in lxml.etree._Attrib.__getitem__ (src/lxml/lxml.etree.c:55336)
KeyError: '{http://schemas.dmtf.org/ovf/envelope/1/}id'

MainThread::ERROR::2017-11-29 18:11:47,433::agent::145::ovirt_hosted_engine_ha.agent.agent.Agent::(_run_agent) Trying to restart agent
MainThread::INFO::2017-11-29 18:11:47,433::agent::89::ovirt_hosted_engine_ha.agent.agent.Agent::(run) Agent shutting down


Version-Release number of selected component (if applicable):
ovirt-hosted-engine-ha.noarch          2.2.0-0.0.master.20171113160114.20171113160111.git3819ce6.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. deploy hosted-engine and upgrade the engine to latest rpms
2. wait for OVF_STORE creation
3. check the status of ovirt-ha-agent

Actual results:
[root@c74h3 ~]# systemctl status ovirt-ha-agent
● ovirt-ha-agent.service - oVirt Hosted Engine High Availability Monitoring Agent
   Loaded: loaded (/usr/lib/systemd/system/ovirt-ha-agent.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since mer 2017-11-29 18:25:46 CET; 7s ago
  Process: 24857 ExecStart=/usr/share/ovirt-hosted-engine-ha/ovirt-ha-agent (code=exited, status=157)
 Main PID: 24857 (code=exited, status=157)

nov 29 18:25:46 c74h3.localdomain systemd[1]: ovirt-ha-agent.service: main process exited, code=exited, status=157/n/a
nov 29 18:25:46 c74h3.localdomain systemd[1]: Unit ovirt-ha-agent.service entered failed state.
nov 29 18:25:46 c74h3.localdomain systemd[1]: ovirt-ha-agent.service failed.

KeyError: '{http://schemas.dmtf.org/ovf/envelope/1/}id' in /var/log/ovirt-hosted-engine-ha/agent.log



Expected results:
ovirt-ha-agent is up and running correctly parsing the OVF_STORE

Additional info:
https://gerrit.ovirt.org/#/c/84802/ introduced the correct URL, ovirt-ha-agent should be able to correctly handle it but, at the same time, it should be also backward compatible with OVF_STORE created by previous engine releases.

Comment 1 Red Hat Bugzilla Rules Engine 2017-11-29 17:30:40 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Red Hat Bugzilla Rules Engine 2017-11-29 17:32:21 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Nikolai Sednev 2017-12-13 09:30:17 UTC
Using ovirt-engine-appliance-4.2-20171210.1.el7.centos.noarch and ovirt-hosted-engine-setup-2.2.1-0.0.master.20171206172737.gitd3001c8.el7.centos.noarch during and after deployment of SHE on pair of hosts, over Gluster, and after adding some NFS data storage domain, I did not reproduced the original issue, hence moving to verified.

Comment 4 Sandro Bonazzola 2017-12-20 11:03:54 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

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

Comment 6 Yaniv Kaul 2018-01-04 09:10:16 UTC
I'm still seeing this with ha-2.2.3-0.0-master.20171218181916.20171218181911.git4c22b93.el7 - on Ansible based deployment (in OST). Will now check with vintage deployment.

Comment 7 Yaniv Kaul 2018-01-04 09:42:25 UTC
(In reply to Yaniv Kaul from comment #6)
> I'm still seeing this with
> ha-2.2.3-0.0-master.20171218181916.20171218181911.git4c22b93.el7 - on
> Ansible based deployment (in OST). Will now check with vintage deployment.

Also in vintage deployment. I'll open a separate bug.


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