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

noobaa status fails with Panic Attack #63

Closed
netzzer opened this issue Oct 29, 2019 · 7 comments
Closed

noobaa status fails with Panic Attack #63

netzzer opened this issue Oct 29, 2019 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@netzzer
Copy link
Collaborator

netzzer commented Oct 29, 2019

Describe the bug
Executing noobaa status does not complete correctly as shown in lab guide.

Section in which you face the issue
https://github.com/red-hat-storage/ocs-training/tree/master/ocp4ocs4#checking-on-the-mcg-status

To Reproduce
Steps to reproduce the behavior:

  1. Install noobaa client
  2. change to openshift-storage project
  3. noobaa status
  4. See error
$ noobaa status
INFO[0000] CLI version: 2.0.4                           
INFO[0000] noobaa-image: noobaa/noobaa-core:5           
INFO[0000] operator-image: noobaa/noobaa-operator:2.0.4 
INFO[0000] Namespace: openshift-storage                 
INFO[0000]                                              
INFO[0000] CRD Status:                                  
INFO[0000] ✅ Exists: CustomResourceDefinition "noobaas.noobaa.io" 
INFO[0001] ✅ Exists: CustomResourceDefinition "backingstores.noobaa.io" 
INFO[0001] ✅ Exists: CustomResourceDefinition "bucketclasses.noobaa.io" 
INFO[0001] ✅ Exists: CustomResourceDefinition "objectbucketclaims.objectbucket.io" 
INFO[0001] ✅ Exists: CustomResourceDefinition "objectbuckets.objectbucket.io" 
INFO[0001]                                              
INFO[0001] Operator Status:                             
INFO[0001] ✅ Exists: Namespace "openshift-storage"      
INFO[0001] ✅ Exists: ServiceAccount "noobaa"            
INFO[0001] ❌ Not Found: Role "noobaa"                   
INFO[0001] ❌ Not Found: RoleBinding "noobaa"            
INFO[0001] ❌ Not Found: ClusterRole "openshift-storage.noobaa.io" 
INFO[0001] ❌ Not Found: ClusterRoleBinding "openshift-storage.noobaa.io" 
INFO[0002] ✅ Exists: Deployment "noobaa-operator"       
INFO[0002]                                              
INFO[0002] System Status:                               
INFO[0002] ✅ Exists: NooBaa "noobaa"                    
INFO[0002] ✅ Exists: StatefulSet "noobaa-core"          
INFO[0002] ✅ Exists: Service "noobaa-mgmt"              
INFO[0002] ✅ Exists: Service "s3"                       
INFO[0002] ✅ Exists: Secret "noobaa-server"             
INFO[0002] ✅ Exists: Secret "noobaa-operator"           
INFO[0002] ✅ Exists: Secret "noobaa-admin"              
INFO[0002] ✅ Exists: StorageClass "openshift-storage.noobaa.io" 
INFO[0002] ✅ Exists: BucketClass "noobaa-default-bucket-class" 
INFO[0002] ✅ (Optional) Exists: BackingStore "noobaa-default-backing-store" 
INFO[0003] ✅ (Optional) Exists: CredentialsRequest "noobaa-cloud-creds" 
INFO[0003] ✅ (Optional) Exists: PrometheusRule "noobaa-prometheus-rules" 
INFO[0003] ✅ (Optional) Exists: ServiceMonitor "noobaa-service-monitor" 
INFO[0003] ✅ Exists: PersistentVolumeClaim "db-noobaa-core-0" 
INFO[0003] ✅ System Phase is "Ready"                    
PANI[0003] ☠️  Panic Attack: [] resource name may not be empty 
panic: (*logrus.Entry) (0x25134e0,0xc0002443f0)

goroutine 1 [running]:
github.com/sirupsen/logrus.Entry.log(0xc0000f8150, 0xc00043a300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/vendor/github.com/sirupsen/logrus/entry.go:239 +0x2db
github.com/sirupsen/logrus.(*Entry).Log(0xc00017a8c0, 0x0, 0xc000925570, 0x1, 0x1)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/vendor/github.com/sirupsen/logrus/entry.go:268 +0xeb
github.com/sirupsen/logrus.(*Entry).Logf(0xc00017a8c0, 0x0, 0x2560bfe, 0x1d, 0xc0009255d0, 0x2, 0x2)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/vendor/github.com/sirupsen/logrus/entry.go:314 +0xe2
github.com/sirupsen/logrus.(*Entry).Panicf(...)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/vendor/github.com/sirupsen/logrus/entry.go:352
github.com/noobaa/noobaa-operator/v2/pkg/util.Panic(0x2813680, 0xc000790b50)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/pkg/util/util.go:401 +0xf3
github.com/noobaa/noobaa-operator/v2/pkg/util.KubeCheck(0x2825780, 0xc00003cb40, 0x25574bd)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/pkg/util/util.go:290 +0x474
github.com/noobaa/noobaa-operator/v2/pkg/system.RunStatus(0xc0002b5180, 0x34def08, 0x0, 0x0)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/pkg/system/system.go:347 +0x3d5
github.com/noobaa/noobaa-operator/v2/pkg/install.RunStatus(0xc0002b5180, 0x34def08, 0x0, 0x0)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/pkg/install/install.go:110 +0x2c9
github.com/spf13/cobra.(*Command).execute(0xc0002b5180, 0x34def08, 0x0, 0x0, 0xc0002b5180, 0x34def08)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/vendor/github.com/spf13/cobra/command.go:830 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xc000134c80, 0x0, 0x0, 0x0)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/vendor/github.com/spf13/cobra/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/vendor/github.com/spf13/cobra/command.go:864
github.com/noobaa/noobaa-operator/v2/pkg/cli.Run()
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/pkg/cli/cli.go:52 +0x27
main.main()
	/Users/gu/code/go/src/github.com/noobaa/noobaa-operator/cmd/manager/main.go:14 +0x20

Expected behavior
Status completed correctly.

Environment

Did you use OCP deployed by the RHPDS workshop?
Yes

@netzzer netzzer added the bug Something isn't working label Oct 29, 2019
@netzzer
Copy link
Collaborator Author

netzzer commented Oct 29, 2019

Noobaa client version

$ noobaa version
INFO[0000] CLI version: 2.0.4                           
INFO[0000] noobaa-image: noobaa/noobaa-core:5           
INFO[0000] operator-image: noobaa/noobaa-operator:2.0.4

@mulbc
Copy link
Member

mulbc commented Oct 29, 2019

Don't know much about this, assigned to @tamireran for further investigation...

@mulbc
Copy link
Member

mulbc commented Oct 29, 2019

Talked with Eran:

This is a known bug and it's fixed in noobaa version 2.0.5

The workaround is to execute the following:

kubectl proxy &
curl -X PATCH '127.0.0.1:8001/apis/noobaa.io/v1alpha1/namespaces/openshift-storage/noobaas/noobaa/status' -d '{"status":{"accounts":{"admin":{"secretRef":{"name":"noobaa-admin","namespace":"openshift-storage"}}}}}' -H "content-type: application/merge-patch+json"

Link to issue: noobaa/noobaa-operator#101

@netzzer
Copy link
Collaborator Author

netzzer commented Oct 29, 2019

This does not work

MacBook-Pro:~ aclewett$ noobaa version
INFO[0000] CLI version: 2.0.4                           
INFO[0000] noobaa-image: noobaa/noobaa-core:5           
INFO[0000] operator-image: noobaa/noobaa-operator:2.0.4 
MacBook-Pro:~ aclewett$ oc proxy &
[1] 1315
MacBook-Pro:~ aclewett$ Starting to serve on 127.0.0.1:8001

Then failure.

MacBook-Pro:~ aclewett$ curl -X PATCH '127.0.0.1:8001/apis/noobaa.io/v1alpha1/namespaces/openshift-storage/noobaas/noobaa/status' -d '{"status":{"accounts":{"admin":{"secretRef":{"name":"noobaa-admin","namespace":"openshift-storage"}}}}}' -H "content-type: application/merge-patch+json"
I1029 07:23:48.328639    1315 log.go:172] http: proxy error: dial tcp 34.194.0.37:6443: i/o timeout

@netzzer
Copy link
Collaborator Author

netzzer commented Oct 29, 2019

May help to install noobaa version 2.0.3 instead of 2.0.4. Instructions below for macbook installation.

curl -s https://api.github.com/repos/noobaa/noobaa-operator/releases/20881875 | grep "mac" | cut -d : -f 2,3 | tr -d \" | wget -qi -
mv noobaa-mac-* noobaa
chmod +x noobaa; sudo su
mv noobaa /usr/local/bin/
exit

Check noobaa version

$ noobaa version
INFO[0000] CLI version: 2.0.3                           
INFO[0000] noobaa-image: noobaa/noobaa-core:5           
INFO[0000] operator-image: noobaa/noobaa-operator:2.0.3'

@mulbc
Copy link
Member

mulbc commented Oct 31, 2019

The Noobaa-Operator version in the release-4.2 tag (which we use in the lab) has been updated to 2.0.4 now:
https://github.com/openshift/ocs-operator/blob/release-4.2/deploy/olm-catalog/ocs-operator/0.0.1/ocs-operator.v0.0.1.clusterserviceversion.yaml#L976

@netzzer
Copy link
Collaborator Author

netzzer commented Nov 1, 2019

Need to have OCS 4.2 noobaa version and noobaa CLI client the same version. This appears to be what caused this issue.

@netzzer netzzer closed this as completed Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants