Bug 1987479 - Migration hooks do not run because the Controller does not have permissions
Summary: Migration hooks do not run because the Controller does not have permissions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: Operator
Version: 2.1.0
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
: 2.1.0
Assignee: Franco Bladilo
QA Contact: Ilanit Stein
Avital Pinnick
URL:
Whiteboard: v2v, blocker
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-29 14:58 UTC by Igor Braginsky
Modified: 2021-08-26 07:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-26 07:09:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor forklift-operator pull 143 0 None closed Bug: 1987479 RBAC fix for hooks 2021-07-29 17:33:59 UTC
Red Hat Product Errata RHEA-2021:3278 0 None None None 2021-08-26 07:09:32 UTC

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


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