Code Monkey home page Code Monkey logo

Comments (8)

nixpanic avatar nixpanic commented on June 11, 2024

I might be hitting an issue related to OpenShift restrictions too.
After running make deploy and creating a new SmbShare from the tests/ directory:

2021-04-29T14:31:26.345Z	ERROR	controllers.SmbShare	Failed to create new Deployment	{"smbshare": "sink/tshare1", "Deployment.Namespace": "sink", "Deployment.Name": "tshare1", "error": "deployments.apps \"tshare1\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"}
github.com/go-logr/zapr.(*zapLogger).Error
	/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128
github.com/samba-in-kubernetes/samba-operator/internal/resources.(*SmbShareManager).getOrCreateDeployment
	/workspace/internal/resources/smbshare.go:193
github.com/samba-in-kubernetes/samba-operator/internal/resources.(*SmbShareManager).Update
	/workspace/internal/resources/smbshare.go:123
github.com/samba-in-kubernetes/samba-operator/internal/resources.(*SmbShareManager).Process
	/workspace/internal/resources/smbshare.go:78
github.com/samba-in-kubernetes/samba-operator/controllers.(*SmbShareReconciler).Reconcile
	/workspace/controllers/smbshare_controller.go:54
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:235
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:209
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:188
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:90
2021-04-29T14:31:26.346Z	ERROR	controller	Reconciler error	{"reconcilerGroup": "samba-operator.samba.org", "reconcilerKind": "SmbShare", "controller": "smbshare", "name": "tshare1", "namespace": "sink", "error": "deployments.apps \"tshare1\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"}
github.com/go-logr/zapr.(*zapLogger).Error
	/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:237
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:209
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:188
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:155
k8s.io/apimachinery/pkg/util/wait.BackoffUntil
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:156
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:133
k8s.io/apimachinery/pkg/util/wait.Until
	/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:90

from samba-operator.

phlogistonjohn avatar phlogistonjohn commented on June 11, 2024

I hacked around once a while back and did get it working. I don't know how clean this is but my notes contained the following:

NS=samba-operator-system
oc adm policy add-scc-to-group anyuid system:serviceaccounts:$NS

from samba-operator.

nixpanic avatar nixpanic commented on June 11, 2024

Thanks! Unfortunately that does not seem to be sufficient for my case.

from samba-operator.

phlogistonjohn avatar phlogistonjohn commented on June 11, 2024

I should have paid closer attention to the error you pasted. The thing I shared helped me run samba pods so that they could become the smb users. This error appears to be within the operator itself and is preventing creation of the deployment resource. More investigation will be needed.

from samba-operator.

phlogistonjohn avatar phlogistonjohn commented on June 11, 2024

Out of curiosity I see the namespace in question is "sink". Did the operator deploy to "samba-operator-system" or do you have only "sink"? If you do have "samba-operator-system" does creating the share resource in that namespace make any difference?

from samba-operator.

nixpanic avatar nixpanic commented on June 11, 2024

Yes, I did try with different namespaces for service vs consumer. Not really intentional though. Using the same namespace does not seem to make a difference.

There is a FAQ in the Operator SDK that has the same error message. I'll try to experiment a little with it and see if I can make it work.

from samba-operator.

ibotty avatar ibotty commented on June 11, 2024

This is the same issue as #72.

from samba-operator.

synarete avatar synarete commented on June 11, 2024

As of commit b8c70e5 ("resources: dedicated module to handle OpenShift logic") OpenShift's specific logic is implemented as part of operator's reconcile loop of SmbCommonConfig. Thus, this issue has been resolved.

from samba-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.