Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1518887

Summary: ovirt-ha-agent fails parsing the OVF_STORE due to a change in OVF namespace URI
Product: [oVirt] ovirt-hosted-engine-ha Reporter: Simone Tiraboschi <stirabos>
Component: AgentAssignee: Martin Sivák <msivak>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 2.2.0CC: bugs, michal.skrivanek, ykaul
Target Milestone: ovirt-4.2.0Keywords: AutomationBlocker, Regression, Triaged, ZStream
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1530605 (view as bug list) Environment:
Last Closed: 2017-12-20 11:03:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1530605    

Description Simone Tiraboschi 2017-11-29 17:28:28 UTC
Description of problem: changed the OVF structure replacing '' with ''

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/", line 131, in _run_agent
    return action(he)
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/agent/", line 55, in action_proper
    return he.start_monitoring()
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/agent/", line 428, in start_monitoring
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/env/", 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/", 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/", line 286, in confFromOvf
    vmConf = toDict(ovf)
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/ovf/", 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: '{}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:

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: '{}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: 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.