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

is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can''t set finalizers on: , <nil>' reason: Create harbor.goharbor.io CR error #698

Closed
jorgemansillacriado opened this issue Jul 6, 2021 · 11 comments · Fixed by #721

Comments

@jorgemansillacriado
Copy link

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior:
I have next error when I try to do apply

is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can''t set finalizers on: , '
reason: Create harbor.goharbor.io CR error
status:
conditions:
- lastTransitionTime: "2021-07-06T07:37:03Z"
status: "True"
type: StorageReady
- lastTransitionTime: "2021-07-06T07:37:03Z"
status: "True"
type: DatabaseReady
- lastTransitionTime: "2021-07-06T07:37:03Z"
status: "True"
type: CacheReady
- lastTransitionTime: "2021-07-06T07:37:03Z"
message: 'harbors.goharbor.io "sample-harbor" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can''t set finalizers on: , '
reason: Create harbor.goharbor.io CR error
status: "False"
type: ServiceReady

Steps to reproduce the problem:
kubectl apply -f

Versions:
Please specify the versions of following systems.

  • harbor operator version: latest
  • harbor version: 2.2.1
  • kubernetes version: [v1.19.0+a5a0987
  • Any additional relevant versions such as CertManager

Additional context:

  • Harbor dependent services:
    • Context info of postgreSQL
    • Context info of Redis
    • Context info of storage
  • Log files: Collect logs and attach them here if have.
  • Kubernetes: How Kubernetes access was provided (what cloud provider, service-account configuration, ...).
@cndoit18
Copy link
Collaborator

cndoit18 commented Jul 7, 2021

Is your version of harbor-operator v1.0.1? I may need more information to help me locate the problem. thank you

@cndoit18
Copy link
Collaborator

cndoit18 commented Jul 7, 2021

I've observed other similar feedback on this issue, It seems to be because of the deployment on openshift. are you also deploying on openshift

@jorgemansillacriado
Copy link
Author

jorgemansillacriado commented Jul 8, 2021

Hi

harbor-operator is v1.0.1

Yes, we're using openshift 4.6

@steven-zou
Copy link
Collaborator

@jorgemansillacriado

As it's hard for us to prepare an openshift planform, I'm wondering is it possible to use your platform to verify a patch provided by @cndoit18 later?

@jorgemansillacriado
Copy link
Author

yes I can probe in my platform don't worry

please give path and I can probe it

@cndoit18
Copy link
Collaborator

Thank you very much, I will provide it here a little later

@KaiReichart
Copy link

KaiReichart commented Jul 23, 2021

We have exactly the same issue, but with the dependent operators. Also more than willing to help/try any patches.

Our Error Messages:

    - lastTransitionTime: '2021-07-23T13:31:00Z'
      message: >-
        tenants.minio.min.io "minio-harborcluster-sample" is forbidden: cannot
        set blockOwnerDeletion if an ownerReference refers to a resource you
        can't set finalizers on: , <nil>
      reason: create minIO CR error
      status: 'False'
      type: StorageReady
    - lastTransitionTime: '2021-07-23T13:31:00Z'
      message: >-
        postgresqls.acid.zalan.do
        "postgresql-cao-argocd-harbor-harborcluster-sample" is forbidden: cannot
        set blockOwnerDeletion if an ownerReference refers to a resource you
        can't set finalizers on: , <nil>
      reason: Create database CR error
      status: 'False'
      type: DatabaseReady
    - lastTransitionTime: '2021-07-23T13:31:00Z'
      message: >-
        secrets "harborcluster-sample-redis" is forbidden: cannot set
        blockOwnerDeletion if an ownerReference refers to a resource you can't
        set finalizers on: , <nil>
      reason: Create redis secret error
      status: 'False'
      type: CacheReady
    - message: New generation detected
      reason: newGeneration
      status: 'True'
      type: InProgress

On OpenShift v4.7.7 and Operator Version 1.0.1

@cndoit18
Copy link
Collaborator

I have provided a solution, can you help me to verify it? Thank you @KaiReichart @jorgemansillacriado

@jorgemansillacriado
Copy link
Author

Hi

I have probe new fix but I have other error, I have same message with every examples
Error from server (MethodNotAllowed): error when creating "minimal_stack_fs.yaml": create not allowed while custom resource definition is terminating

@cndoit18
Copy link
Collaborator

Hi

I have probe new fix but I have other error, I have same message with every examples
Error from server (MethodNotAllowed): error when creating "minimal_stack_fs.yaml": create not allowed while custom resource definition is terminating

We may not recommend using minimal_stack_fs.yaml to install it, it is just a sample. Can you install it using manifests/harbor/deployment.yaml?

@bitsf
Copy link
Collaborator

bitsf commented Aug 11, 2021

@jorgemansillacriado it seems you didn't finish cleanup old resources before apply new. you can delete the namespace first.
yamls in manifests/samples are good to use, our CI is just them.

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

Successfully merging a pull request may close this issue.

5 participants