Bug 1327267 - HE Vm's ovf isn't updated according to 'OvfUpdateIntervalInMinutes' value
Summary: HE Vm's ovf isn't updated according to 'OvfUpdateIntervalInMinutes' value
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.HostedEngine
Version: 3.6.5.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.0.0-rc
: 4.0.0
Assignee: Roy Golan
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks: 1337711 1340628
TreeView+ depends on / blocked
 
Reported: 2016-04-14 15:48 UTC by sefi litmanovich
Modified: 2019-11-14 07:49 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The VM definitions are backed up every period of time (an hour) if the version field has been changed since the last backup. Modifying VM's vNics did not updated the version field. Consequence: That caused the VM definitions not being backed up if the change was done on VM's vNics only. Fix: Update the version in vNics manipulations flows. Result: The VM definitions are backed up after vNic changes.
Clone Of:
: 1340628 (view as bug list)
Environment:
Last Closed: 2016-07-05 07:44:17 UTC
oVirt Team: SLA
rule-engine: ovirt-4.0.0+
mgoldboi: planning_ack+
rgolan: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1337711 0 high CLOSED After rebooting HE VM, the newly added vnic comes unplugged 2021-02-22 00:41:40 UTC
oVirt gerrit 57204 0 'None' MERGED engine: bump VM version upon VM nic add/update 2020-12-25 03:11:41 UTC
oVirt gerrit 57453 0 'None' MERGED engine: bump VM version upon VM nic add/update 2020-12-25 03:11:41 UTC

Internal Links: 1337711

Description sefi litmanovich 2016-04-14 15:48:39 UTC
Description of problem:

While testing another bug I set via engine-config OvfUpdateIntervalInMinutes=1.
Then after restarting engine I added a nic to the HE vm.
Setting the agent.log to DEBUG I was able to see the ovf xml every minute, but the new nic I added did not appear in ovf. I checked the log every few minutes although the log IS updated every minute but still no change.
Only after checking log again a few hours later I was able to see the original nic I created.
I then removed the nic, and again followed agent.log, and again it does show the ovf xml every minute but not updated (was able to see the removed nic).

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-ha-1.3.5.2-1.el7ev.noarch
rhevm-3.6.5.3-0.1.el6.noarch

How reproducible:

Steps to Reproduce:
1. setup hosted-engine (in my case using appliance).
2. after engine is running and a new SD was added, HE vm appears and i editable in engine.
3. set engine-config -s OvfUpdateIntervalInMinutes=1 and restart engine.
3. Create network for DC with the vm, can be dummy network.
4. Under the he vm's 'Network Intferaces' add a new nic using the new network profile.
5. on the host run "tail -F /var/log/ovirt-hosted-engine-ha/agent.log | grep -i --color '{new_nic_name}'"

Actual results:
no output at all for a long time (more than 20 minutes).
After few hours (my guess after an hour but only returned to it later) 'nic1' is found.

Expected results:
vm's ovf should be updated after 1 minute as configured.

Additional info:

Comment 1 Roy Golan 2016-04-17 07:34:35 UTC
I don't know why this didn't kick in but msivak already submitted a patch to use a callback on the TX of the UpdateVm so that once it is over the update will be 
called immediately. Tracker updated

Meanwhile I'd like you to run this query before and after you change the nic:

```
select ovf_generation from vm_ovf_generations where vm_guid in (select vm_guid from vm_static where vm_name ='hostedEngine');
```

after the updateVm command is done the generation should bump and the next refresh query should catch that.

Comment 2 Artyom 2016-04-17 08:09:25 UTC
I do not sure if the problem in the OvfUpdateIntervalInMinutes value, because I set it to 5 minutes, added new VNIC to HE VM and waited 1-2 days, to be sure that OVF is updated to new values, but I still do not see new VNIC under OVF data(so after HE VM restart new VNIC appear as unplugged, because start HE VM does not create it)

I also tried query from the comment above:
before add new VNIC:
engine=# select ovf_generation from vm_ovf_generations where vm_guid in (select vm_guid from vm_static where vm_name ='HostedEngine');
 ovf_generation 
----------------
              1

after add new VNIC:
engine=# select ovf_generation from vm_ovf_generations where vm_guid in (select vm_guid from vm_static where vm_name ='HostedEngine');
 ovf_generation 
----------------
              1

Comment 3 Roy Golan 2016-04-17 09:46:26 UTC
small correction, the bump is made directly on the vm_static table so do
```
select db_generation from vm_static where vm_name = 'hostedEngine';
```

But I already see that for the increment of the generations isn't called for NIC operations at all so you can try that and see and that is the root cause.

Comment 5 Marina Kalinin 2016-05-29 21:43:55 UTC
My issue is same is Artyom's  - even after hours I do not see the nic appearing in the database.

Comment 6 Marina Kalinin 2016-05-29 22:00:58 UTC
Any workaround we can suggest to the customers at this point?

Comment 7 sefi litmanovich 2016-06-07 15:11:39 UTC
Verified with:
ENGINE:
rhevm-4.0.0.2-0.1.el7ev.noarch
HOST: 
ovirt-hosted-engine-ha-2.0.0-1.el7ev.noarch
vdsm-4.18.1-11.gita92976e.el7ev.x86_64

Followed steps from my description of the bug,
This time after adding the nic to the HostedEngine vm, the nic appeared in vm's xml (both with dumpxml from virsh and in host's agent.log).
Also verified that the nic is not unplugged after shutting the vm down and re starting it.

Comment 9 Roy Golan 2016-06-23 10:31:10 UTC
*** Bug 1345782 has been marked as a duplicate of this bug. ***

Comment 10 Marina Kalinin 2016-06-24 02:20:31 UTC
So.. I just tested this build and after shutting down my VM, engine would not start.. Just as Nikolai said.
I have quite a legit second logical network, so I will test in details and update the specific bug.

Comment 11 Marina Kalinin 2016-06-24 03:38:46 UTC
I had one vnic that had no network profile defined. So, due to bz#1348640, it didn't start.

I created a temporary vm.conf without this vNic with 'network:None' and HE VM started ok. Once I could login, I removed that third vNic from the VM, waited sometime, shut the VM down. And then just started regularly (hosted-engine --vm-start), and it started fine with the nic plugged.

So, I guess I can say that this issue is verified from my side as well.

Comment 12 Sandro Bonazzola 2016-07-05 07:44:17 UTC
oVirt 4.0.0 has been released, closing current release.


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