Bug 1506611 - OVF update occur each time domain is deactivate even though there is nothing to update
Summary: OVF update occur each time domain is deactivate even though there is nothing ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.0
: ---
Assignee: Eyal Shenitzky
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-26 12:51 UTC by Eyal Shenitzky
Modified: 2017-12-20 11:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:32:06 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
engine and vdsm logs (1.23 MB, application/zip)
2017-10-26 12:51 UTC, Eyal Shenitzky
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 83338 0 master MERGED core: Verify before performing OVF update 2017-11-02 09:02:24 UTC

Description Eyal Shenitzky 2017-10-26 12:51:02 UTC
Created attachment 1343723 [details]
engine and vdsm logs

Description of problem:

Each time a storage domain is deactivated OVF update occurs.
The OVf update occurs even though there is nothing to be updated.


Version-Release number of selected component (if applicable):
4.2_master from commit - 6f4cbc5f505196a8820ccf9ebd43b49508e8ce5d

How reproducible:
100%

Steps to Reproduce:
1. Create storage domain
2. Create a VM with disk
3. Deactivate the storage domain
4. Activate the storage domain
5. Deactivate the storage domain

Actual results:
OVF update occurs when deactivating the domain for the second time, even though  
no operation occurred between the first deactivation to the second one

Expected results:
OVF update should occur for the first deactivation.
OVF update shouldn't occur in case there was no change in the environment/entities state

Additional info:
Engine and VDSM logs attached

Comment 1 Raz Tamir 2017-11-15 09:29:36 UTC
Eyal,

I tested on ovirt engine-4.2.0-0.0.master.20171113223918.git25568c3.el7.centos
and I still see



2017-11-15 11:18:05,625+02 INFO  [org.ovirt.engine.core.bll.storage.domain.UpdateOvfStoreForStorageDomainCommand] (EE-ManagedThreadFactory-engine-Thread-23300) [225c33c2-97df-4dc8-b34a-d15ec5d4bce7] Running command: UpdateOvfStoreForStora
geDomainCommand internal: true. Entities affected :  ID: d6de0969-56ce-475c-8154-661c56f3d401 Type: StorageAction group MANIPULATE_STORAGE_DOMAIN with role type ADMIN

also for the second time.

What exactly should I look for to see that the ovf update is not happening for the second time?

Comment 2 Eyal Shenitzky 2017-11-19 07:44:51 UTC
There are few steps which take place during deactivation of storage domain:

1. Update of the OVF entities for all the pool (dc) in the DB.
2. Write updated data using the VDSM to the OVF_STORE files.

Before this fix, step 2 always take place even though there was no need for it because of no change in the entities occur.

We now lunch step 2 according to the results of step 1 that tells us if there is something to update.

The log you should see for step 1 is:

2017-11-15 11:18:05,625+02 INFO  2017-11-19 09:27:28,128+02 INFO  [org.ovirt.engine.core.bll.storage.domain.UpdateOvfStoreForStorageDomainCommand] (EE-ManagedThreadFactory-engine-Thread-20) [96f880a3-6ee6-4af7-b31a-a1c34be2daf6] Running command: UpdateOvfStoreForStorageDomainCommand internal: true. Entities affected :  ID: 0d7d11b1-4189-4fe5-beb7-acc480a021dd Type: StorageAction group MANIPULATE_STORAGE_DOMAIN with role type ADMIN


The log you should see for step 2 is:

2017-11-19 09:27:28,397+02 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStorageDomainCommand] (EE-ManagedThreadFactory-engine-Thread-20) [96f880a3-6ee6-4af7-b31a-a1c34be2daf6] Running command: ProcessOvfUpdateForStorageDomainCommand internal: true. Entities affected :  ID: 0d7d11b1-4189-4fe5-beb7-acc480a021dd Type: StorageAction group MANIPULATE_STORAGE_DOMAIN with role type ADMIN

Therefore, for the first deactivation, you should see both log messages.
For the second deactivation, you should see only the first log message.

Comment 3 Raz Tamir 2017-11-19 10:31:55 UTC
Eyal I still see both steps in engine.log:
2017-11-19 12:27:54,274+02 INFO  [org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand] (default task-4) [a642ccd8-c1b6-461f-877d-edde13612b04] Lock Acquired to object 'EngineLock:{exclusiveLocks='[9f3381fc-c34d-4b2f-ac1b-d668b9cf6944=STORAGE]', sharedLocks='[65425882-8da9-4046-9001-03b0667d6ac3=POOL]'}'
2017-11-19 12:27:54,432+02 INFO  [org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [a642ccd8-c1b6-461f-877d-edde13612b04] Running command: DeactivateStorageDomainWithOvfUpdateCommand internal: false. Entities affected :  ID: 9f3381fc-c34d-4b2f-ac1b-d668b9cf6944 Type: StorageAction group MANIPULATE_STORAGE_DOMAIN with role type ADMIN
2017-11-19 12:27:54,506+02 INFO  [org.ovirt.engine.core.bll.storage.domain.UpdateOvfStoreForStorageDomainCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [a642ccd8-c1b6-461f-877d-edde13612b04] Running command: UpdateOvfStoreForStorageDomainCommand internal: true. Entities affected :  ID: 9f3381fc-c34d-4b2f-ac1b-d668b9cf6944 Type: StorageAction group MANIPULATE_STORAGE_DOMAIN with role type ADMIN
2017-11-19 12:27:54,539+02 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [40de21fb] Running command: ProcessOvfUpdateForStoragePoolCommand internal: true. Entities affected :  ID: 65425882-8da9-4046-9001-03b0667d6ac3 Type: StoragePool
2017-11-19 12:27:54,793+02 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [40de21fb] Attempting to update VM OVFs in Data Center 'golden_env_mixed'
2017-11-19 12:27:54,804+02 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [40de21fb] Successfully updated VM OVFs in Data Center 'golden_env_mixed'
2017-11-19 12:27:54,804+02 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [40de21fb] Attempting to update template OVFs in Data Center 'golden_env_mixed'
2017-11-19 12:27:54,807+02 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [40de21fb] Successfully updated templates OVFs in Data Center 'golden_env_mixed'
2017-11-19 12:27:54,808+02 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [40de21fb] Attempting to remove unneeded template/vm OVFs in Data Center 'golden_env_mixed'
2017-11-19 12:27:54,813+02 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [40de21fb] Successfully removed unneeded template/vm OVFs in Data Center 'golden_env_mixed'
2017-11-19 12:27:54,826+02 INFO  [org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStoragePoolCommand] (EE-ManagedThreadFactory-engine-Thread-163931) [40de21fb] Lock freed to object 'EngineLock:{exclusiveLocks='[9f3381fc-c34d-4b2f-ac1b-d668b9cf6944=STORAGE]', sharedLocks='[65425882-8da9-4046-9001-03b0667d6ac3=POOL]'}'

Comment 4 Raz Tamir 2017-11-20 08:50:42 UTC
Talked with Eyal f2f - Verified on ovirt-engine-4.2.0-0.0.master.20171116212005.git61ffb5f.el7.centos

Comment 5 Sandro Bonazzola 2017-12-20 11:32:06 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.


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