Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1343023

Summary: rhevm-guest-agent after_migration hook run with 'no migration' cluster policy
Product: [oVirt] ovirt-engine Reporter: sefi litmanovich <slitmano>
Component: BLL.VirtAssignee: jniederm
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: bugs, vfeenstr
Target Milestone: ovirt-4.0.1Flags: michal.skrivanek: ovirt-4.0.z?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-16 08:27:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rhevm-guest-agent logs none

Description sefi litmanovich 2016-06-06 10:59:01 UTC
Created attachment 1165150 [details]
rhevm-guest-agent logs

Description of problem:

In 4.0 new rhevm-guest-agent hooks are available for certain cases.
Setting before and after migration hooks on vm is possible by adding scripts to:
/etc/ovirt-guest-agent/hooks.d/before_migration
/etc/ovirt-guest-agent/hooks.d/after_migration

These hooks should be enabled when using 1 of the two new cluster migration policies: 'safe but may not converge' and 'should converge but guest may notice a pause' but hooks should be disabled if 'no policy' is chosen as cluster migration policy.
In practice when policy is set to 'no policy' the after_migration hooks will be invoked after all, and only these.

Version-Release number of selected component (if applicable):
vdsm-4.18 on hosts. 
On vm: rhevm-guest-agent-common-1.0.12-1

How reproducible:
always

Steps to Reproduce:
Case 1 - cause bug:
1. Create a rhel 7.2 vm with rhevm-guest-agent-common-1.0.12-1.
2. Start the vm.
3. On the vm add a script to /etc/ovirt-guest-agent/hooks.d/before_migration - with some bash command.. touch test e.g.
add another script that does something to /etc/ovirt-guest-agent/hooks.d/after_migration.
set both scripts permissions to executable. 
4. Set cluster migration policy to 'No Policy'
5. migrate vm

Actual results:
The script that was placed in after_migration folder ran although hooks should be disabled.

Expected results:
Both scripts do not run

Comment 1 Vinzenz Feenstra [evilissimo] 2016-06-16 08:27:10 UTC

*** This bug has been marked as a duplicate of bug 1344361 ***