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

Bug 2053003

Summary: [MTV] Plan execution is stuck on hooks
Product: Migration Toolkit for Virtualization Reporter: Igor Braginsky <ibragins>
Component: GeneralAssignee: Marek Aufart <maufart>
Status: CLOSED ERRATA QA Contact: Igor Braginsky <ibragins>
Severity: high Docs Contact: Richard Hoch <rhoch>
Priority: high    
Version: 2.3.0CC: istein, jortel, maufart
Target Milestone: ---Keywords: Regression
Target Release: 2.3.0   
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: 2022-04-04 18:03:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Logs of plan none

Description Igor Braginsky 2022-02-10 12:30:07 UTC
Created attachment 1860343 [details]
Logs of plan

Description of problem:Plan execution is stuck on hooks, both pre-hook and post-hook


Version-Release number of selected component (if applicable): MTV 2.3.0-24


How reproducible: 100%


Steps to Reproduce:
1. Create a new plan
2. Add a hook on respective step
3. Run the plan

Actual results:
Plan is stuck on pre-hook or post-hook depending on which of them was configured

Expected results:
Plan succeeds and hooks are performed

Additional info:
Example hook was tried that worked before:
```
---
- name: Main
  hosts: localhost
  tasks:
  - name: Load Plan
    include_vars:
      file: plan.yml
      name: plan
  - name: Load Workload
    include_vars:
      file: workload.yml
      name: workload
```

Comment 1 Marek Aufart 2022-02-16 09:39:37 UTC
Development note, the error in job's created pod is:
$ oc logs pods/plan1hook-vm-3696-prehook-m--1-qfn7n -n openshift-mtv -f
usage: ansible-runner [-h] [--version] [--debug] [--logfile LOGFILE]
                      [-b BINARY] [-i IDENT]
                      [--rotate-artifacts ROTATE_ARTIFACTS]
                      [--artifact-dir ARTIFACT_DIR]
                      [--project-dir PROJECT_DIR] [--inventory INVENTORY] [-j]
                      [--omit-event-data] [--only-failed-event-data] [-q] [-v]
                      {run,start,stop,is-alive,transmit,worker,process} ...
ansible-runner: error: argument command: invalid choice: '/tmp/hook/playbook.yml' (choose from 'run', 'start', 'stop', 'is-alive', 'transmit', 'worker', 'process')

Comment 3 Jeff Ortel 2022-02-16 15:26:17 UTC
The hook running in MTV has not changed.  The regression must have been introduced by an update to the quay.io/konveyor/hook-runner:latest image updated 16 days ago.

Comment 4 Ilanit Stein 2022-02-17 07:11:36 UTC
Fixed in MTV-2.3.0-32
Index image v4.9: iib:178078
Index image v4.10: iib:178080

Comment 5 Igor Braginsky 2022-02-17 08:59:40 UTC
Validated on MTV 2.3.0-32, pre-hook passed normally. Moving to verified.

Comment 9 errata-xmlrpc 2022-04-04 18:03:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (MTV 2.3.0 images), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHEA-2022:1183