Bug 1987479

Summary: Migration hooks do not run because the Controller does not have permissions
Product: Migration Toolkit for Virtualization Reporter: Igor Braginsky <ibragins>
Component: OperatorAssignee: Franco Bladilo <fbladilo>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: urgent Docs Contact: Avital Pinnick <apinnick>
Priority: unspecified    
Version: 2.1.0CC: apinnick, fbladilo, fdupont, istein, jortel
Target Milestone: ---   
Target Release: 2.1.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: v2v, blocker
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-26 07:09:27 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:

Description Igor Braginsky 2021-07-29 14:58:43 UTC
Description of problem:
Hook can't be performed due to lacking permissions of forklift-controller. Controller tries to create a config map and it can't, so migration never ends due to hook is hanged up

Version-Release number of selected component (if applicable): 2.1-34


How reproducible: 100%


Steps to Reproduce:
1. Create a new plan
2. During creation add a PreHook
3. Run the plan

Actual results:
Plan is hanged up on hook execution

Expected results:


Additional info:
# oc logs -c controller forklift-controller-6d4f69cfd6-v6cms
E0729 13:58:24.246413       1 reflector.go:127] pkg/mod/k8s.io/client-go.3/tools/cache/reflector.go:156: Failed to watch *v1.ConfigMap: failed to list *v1.ConfigMap:configmaps is forbidden: User "system:serviceaccount:openshift-mtv:forklift-controller" cannot list resource "configmaps" in API group "" at the cluster scope

Comment 1 Jeff Ortel 2021-07-29 15:42:13 UTC
We need the controller rule to include perms to CRUD on ConfigMap and Job.

Comment 2 Franco Bladilo 2021-07-30 01:17:33 UTC
RBAC fixes present in build 2.1.0-36 / IIB:94891 , please give it a try and let us know.

Comment 3 Igor Braginsky 2021-08-02 11:40:19 UTC
Verified on 2.1-36, IIB:94891

Comment 6 errata-xmlrpc 2021-08-26 07:09:27 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 (Migration Toolkit for Virtualization 2.1.0), 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-2021:3278