Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator-sdk run bundle stopped working after changing user in Dockerfile #984

Open
Deixx opened this issue Jul 4, 2022 · 9 comments
Open

Comments

@Deixx
Copy link

Deixx commented Jul 4, 2022

After PR #982 was merged operator-sdk run bundle stopped working.

INFO[0008] Successfully created registry pod: registry-my-operator-bundle-v0-0-1
INFO[0008] Created CatalogSource: my-operator-catalog
INFO[0008] OperatorGroup "operator-sdk-og" created
INFO[0008] Created Subscription: my-operator-v0-0-1-sub
FATA[0600] Failed to run bundle: install plan is not available for the subscription my-operator-v0-0-1-sub: timed out waiting for the condition
# kubectl logs pod/registry-my-operator-bundle-v0-0-1
mkdir: can't create directory '/database': Permission denied

Looks like USER 1001 does not have permission to create directories.

Changing opm version in registry pod from latest to v1.23.0 allowed for pod successful start.

@sthaha
Copy link

sthaha commented Jul 5, 2022

This blocks our CI that relies on run bundle. Any workarounds for this until the bug is fixed?

@joelanford
Copy link
Member

As a workaround, can you try specifying --index-image=quay.io/operator-framework/opm:v1.23.0 in the run bundle invocation?

@sthaha
Copy link

sthaha commented Jul 6, 2022

Thank you! pinning the index-image does fix it!

czunker added a commit to mondoohq/mondoo-operator that referenced this issue Jul 6, 2022
Workaround for operator-framework/operator-registry#984

Fixes #429

Signed-off-by: Christian Zunker <christian@mondoo.com>
@grokspawn grokspawn linked a pull request Jul 6, 2022 that will close this issue
5 tasks
chris-rock pushed a commit to mondoohq/mondoo-operator that referenced this issue Jul 7, 2022
Workaround for operator-framework/operator-registry#984

Fixes #429

Signed-off-by: Christian Zunker <christian@mondoo.com>
czunker added a commit to mondoohq/mondoo-operator that referenced this issue Jul 7, 2022
This prevents `permission denied` errors.

Workaround for operator-framework/operator-registry#984

Fixes #429

Signed-off-by: Christian Zunker <christian@mondoo.com>
czunker added a commit to mondoohq/mondoo-operator that referenced this issue Jul 7, 2022
This prevents `permission denied` errors.

Workaround for operator-framework/operator-registry#984

Fixes #429

Signed-off-by: Christian Zunker <christian@mondoo.com>
@pohly
Copy link

pohly commented Aug 4, 2022

I also ran into this.

So even if operator-sdk is pinned to a fixed, known-good version (which we do in PMEM-CSI), it will then still pull random versions of other components (like this quay.io/operator-framework/opm image) at runtime? That sounds like a major deficiency in the release process for operator-sdk: I expect a released version to be fully deterministic.

pohly added a commit to pohly/pmem-CSI that referenced this issue Aug 4, 2022
"operator-sdk run" pulls the latest version of certain images, which started to
break after an quay.io/operator-framework/opm update. Pinning to a known
version in our invocation is a workaround for that
bug (operator-framework/operator-registry#984).
@cniackz
Copy link

cniackz commented Aug 16, 2022

I was running into the same issue:

$ operator-sdk run bundle quay.io/cniackz4/minio-operator:v4.4.17
INFO[0056] Successfully created registry pod: quay-io-cniackz4-minio-operator-v4-4-17 
INFO[0056] Created CatalogSource: minio-operator-catalog 
INFO[0056] OperatorGroup "operator-sdk-og" created      
INFO[0056] Created Subscription: minio-operator-v4-4-17-sub 
FATA[0120] Failed to run bundle: install plan is not available for the subscription minio-operator-v4-4-17-sub: timed out waiting for the condition 

Where the logs were showing:

mkdir: can't create directory '/database': Permission denied

I applied the flag --index-image=quay.io/operator-framework/opm:v1.23.0 and it worked:

$ operator-sdk run bundle quay.io/cniackz4/minio-operator:v4.4.17 --index-image=quay.io/operator-framework/opm:v1.23.0
INFO[0013] Successfully created registry pod: quay-io-cniackz4-minio-operator-v4-4-17 
INFO[0013] Created CatalogSource: minio-operator-catalog 
INFO[0013] OperatorGroup "operator-sdk-og" created      
INFO[0013] Created Subscription: minio-operator-v4-4-17-sub 
INFO[0016] Approved InstallPlan install-n8trk for the Subscription: minio-operator-v4-4-17-sub 
INFO[0016] Waiting for ClusterServiceVersion "default/minio-operator.v4.4.17" to reach 'Succeeded' phase 
INFO[0016]   Waiting for ClusterServiceVersion "default/minio-operator.v4.4.17" to appear 
INFO[0032]   Found ClusterServiceVersion "default/minio-operator.v4.4.17" phase: Pending 
INFO[0033]   Found ClusterServiceVersion "default/minio-operator.v4.4.17" phase: InstallReady 
INFO[0036]   Found ClusterServiceVersion "default/minio-operator.v4.4.17" phase: Installing 
INFO[0055]   Found ClusterServiceVersion "default/minio-operator.v4.4.17" phase: InstallReady 
INFO[0056]   Found ClusterServiceVersion "default/minio-operator.v4.4.17" phase: Installing 
INFO[0057]   Found ClusterServiceVersion "default/minio-operator.v4.4.17" phase: Succeeded 
INFO[0057] OLM has successfully installed "minio-operator.v4.4.17" 

Thank you guys, and hopefully this is going to be solved in latest and greatest version 👍

@kaovilai
Copy link

kaovilai commented Oct 5, 2022

Can everyone confirm if latest work for them again? I think it is working now.. at least for operator-sdk downloaded from relases

https://github.com/operator-framework/operator-sdk/releases/download/v1.23.0/operator-sdk_darwin_arm64

@kaovilai
Copy link

kaovilai commented Oct 5, 2022

looking at the pod in the namespace generated.. it's still using opm:latest image but just wanted to note here.

@sthaha
Copy link

sthaha commented Oct 6, 2022

It "works" for us but we we now have a new problem that is related to FBC ( configmap) supporting only a max of 1 MB.

@sarroutbi
Copy link

Hello. What is the status of this issue? Is it expected to be fixed in the short term? Should we start pinning our deployments to the correct opm version (v1.23.0)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants