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

Error Following Example Docs #12

Closed
sepulworld opened this issue Jul 31, 2019 · 4 comments
Closed

Error Following Example Docs #12

sepulworld opened this issue Jul 31, 2019 · 4 comments

Comments

@sepulworld
Copy link
Contributor

Describe the bug
Followed steps in Readme for example setup on Docker for Mac (Version 2.0.0.3 (31259))

To Reproduce
Steps to reproduce the behavior:

Switched to 0.1.0 for solr-operator and updated args to work with 0.1.0

Updated args:

        - -etcd-operator=false
        - -zk-operator
        - -ingress-base-domain=localhost

Example solrcloud to deploy:

apiVersion: solr.bloomberg.com/v1beta1
kind: SolrCloud
metadata:
  name: "zane"
spec:
  replicas: 2
  solrImage:
    tag: 8.1.1

Confirmed pods are running prior.

etcd-operator-7cc54dcd69-xwqrd      1/1     Running   0          3h
solr-operator-5fc564b9b7-7j4dt      1/1     Running   0          2m
zk-operator-54fdfdc6bb-tkn8s        1/1     Running   0          43m

Error in solr-operator log:

{"level":"info","ts":1564610024.9087832,"logger":"entrypoint","msg":"solr-operator Version: 0.2.1"}
{"level":"info","ts":1564610024.9160395,"logger":"entrypoint","msg":"solr-operator Git SHA: "}
{"level":"info","ts":1564610024.9162643,"logger":"entrypoint","msg":"Go Version: go1.12.5"}
{"level":"info","ts":1564610024.91643,"logger":"entrypoint","msg":"Go OS/Arch: linux / amd64"}
{"level":"info","ts":1564610024.9165854,"logger":"entrypoint","msg":"setting up client for manager"}
{"level":"info","ts":1564610024.9170692,"logger":"entrypoint","msg":"setting up manager"}
{"level":"info","ts":1564610025.3872402,"logger":"entrypoint","msg":"Registering Components."}
{"level":"info","ts":1564610025.3876698,"logger":"entrypoint","msg":"setting up scheme"}
{"level":"info","ts":1564610025.3883626,"logger":"entrypoint","msg":"Setting up controller"}
{"level":"info","ts":1564610025.3889415,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"solrcloud-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1564610025.389596,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"solrcloud-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1564610025.3900578,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"solrcloud-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1564610025.3905382,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"solrcloud-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1564610025.390992,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"solrcloud-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1564610025.3914642,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"solrcloud-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1564610025.391863,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"solrcloud-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1564610025.392333,"logger":"entrypoint","msg":"setting up webhooks"}
{"level":"info","ts":1564610025.3924916,"logger":"entrypoint","msg":"Starting the Cmd."}
{"level":"info","ts":1564610026.4861755,"logger":"kubebuilder.controller","msg":"Starting Controller","controller":"solrcloud-controller"}
{"level":"info","ts":1564610026.5874474,"logger":"kubebuilder.controller","msg":"Starting workers","controller":"solrcloud-controller","worker count":1}
{"level":"info","ts":1564610026.5890381,"logger":"controller","msg":"Setting default settings for solr-cloud"}
{"level":"error","ts":1564610026.6012979,"logger":"kubebuilder.controller","msg":"Reconciler error","controller":"solrcloud-controller","request":"default/zane","error":"SolrCloud.solr.bloomberg.com \"zane\" is invalid: []: Invalid value: map[string]interface {}{\"kind\":\"SolrCloud\", \"apiVersion\":\"solr.bloomberg.com/v1beta1\", \"metadata\":map[string]interface {}{\"annotations\":map[string]interface {}{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"solr.bloomberg.com/v1beta1\\\",\\\"kind\\\":\\\"SolrCloud\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"zane\\\",\\\"namespace\\\":\\\"default\\\"},\\\"spec\\\":{\\\"replicas\\\":2,\\\"solrImage\\\":{\\\"tag\\\":\\\"8.1.1\\\"}}}\\n\"}, \"namespace\":\"default\", \"selfLink\":\"/apis/solr.bloomberg.com/v1beta1/namespaces/default/solrclouds/zane\", \"creationTimestamp\":\"2019-07-31T21:40:10Z\", \"generation\":1, \"name\":\"zane\", \"uid\":\"c55a94c1-b3db-11e9-a110-025000000001\", \"clusterName\":\"\", \"resourceVersion\":\"153254\"}, \"spec\":map[string]interface {}{\"solrImage\":map[string]interface {}{\"repository\":\"library/solr\", \"tag\":\"8.1.1\", \"pullPolicy\":\"IfNotPresent\"}, \"busyBoxImage\":map[string]interface {}{\"pullPolicy\":\"IfNotPresent\", \"repository\":\"library/busybox\", \"tag\":\"1.28.0-glibc\"}, \"replicas\":2, \"zookeeperRef\":map[string]interface {}{\"provided\":map[string]interface {}{\"zookeeper\":map[string]interface {}{\"replicas\":3, \"image\":map[string]interface {}{\"repository\":\"emccorp/zookeeper\", \"tag\":\"3.5.4-beta-operator\", \"pullPolicy\":\"IfNotPresent\"}, \"persistentVolumeClaimSpec\":map[string]interface {}{\"resources\":map[string]interface {}{\"requests\":map[string]interface {}{\"storage\":\"5Gi\"}}, \"dataSource\":interface {}(nil), \"accessModes\":[]interface {}{\"ReadWriteOnce\"}}}, \"zetcd\":interface {}(nil)}}}, \"status\":map[string]interface {}{\"replicas\":0, \"readyReplicas\":0, \"version\":\"\", \"internalCommonAddress\":\"\", \"zookeeperConnectionInfo\":map[string]interface {}{\"internalConnectionString\":\"\", \"chroot\":\"\"}, \"solrNodes\":interface {}(nil)}}: validation failure list:\nstatus.solrNodes in body must be of type array: \"null\"","stacktrace":"github.com/bloomberg/solr-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/bloomberg/solr-operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:217\ngithub.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1\n\t/go/src/github.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
{"level":"info","ts":1564610027.5688612,"logger":"controller","msg":"Setting default settings for solr-cloud"}
{"level":"error","ts":1564610027.5781262,"logger":"kubebuilder.controller","msg":"Reconciler error","controller":"solrcloud-controller","request":"default/zane","error":"SolrCloud.solr.bloomberg.com \"zane\" is invalid: []: Invalid value: map[string]interface {}{\"status\":map[string]interface {}{\"replicas\":0, \"readyReplicas\":0, \"version\":\"\", \"internalCommonAddress\":\"\", \"zookeeperConnectionInfo\":map[string]interface {}{\"internalConnectionString\":\"\", \"chroot\":\"\"}, \"solrNodes\":interface {}(nil)}, \"kind\":\"SolrCloud\", \"apiVersion\":\"solr.bloomberg.com/v1beta1\", \"metadata\":map[string]interface {}{\"selfLink\":\"/apis/solr.bloomberg.com/v1beta1/namespaces/default/solrclouds/zane\", \"creationTimestamp\":\"2019-07-31T21:40:10Z\", \"name\":\"zane\", \"clusterName\":\"\", \"uid\":\"c55a94c1-b3db-11e9-a110-025000000001\", \"resourceVersion\":\"153254\", \"generation\":1, \"annotations\":map[string]interface {}{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"solr.bloomberg.com/v1beta1\\\",\\\"kind\\\":\\\"SolrCloud\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"zane\\\",\\\"namespace\\\":\\\"default\\\"},\\\"spec\\\":{\\\"replicas\\\":2,\\\"solrImage\\\":{\\\"tag\\\":\\\"8.1.1\\\"}}}\\n\"}, \"namespace\":\"default\"}, \"spec\":map[string]interface {}{\"solrImage\":map[string]interface {}{\"repository\":\"library/solr\", \"tag\":\"8.1.1\", \"pullPolicy\":\"IfNotPresent\"}, \"busyBoxImage\":map[string]interface {}{\"repository\":\"library/busybox\", \"tag\":\"1.28.0-glibc\", \"pullPolicy\":\"IfNotPresent\"}, \"replicas\":2, \"zookeeperRef\":map[string]interface {}{\"provided\":map[string]interface {}{\"zetcd\":interface {}(nil), \"zookeeper\":map[string]interface {}{\"persistentVolumeClaimSpec\":map[string]interface {}{\"dataSource\":interface {}(nil), \"accessModes\":[]interface {}{\"ReadWriteOnce\"}, \"resources\":map[string]interface {}{\"requests\":map[string]interface {}{\"storage\":\"5Gi\"}}}, \"replicas\":3, \"image\":map[string]interface {}{\"pullPolicy\":\"IfNotPresent\", \"repository\":\"emccorp/zookeeper\", \"tag\":\"3.5.4-beta-operator\"}}}}}}: validation failure list:\nstatus.solrNodes in body must be of type array: \"null\"","stacktrace":"github.com/bloomberg/solr-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/bloomberg/solr-operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:217\ngithub.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1\n\t/go/src/github.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
{"level":"info","ts":1564610028.6535652,"logger":"controller","msg":"Setting default settings for solr-cloud"}
{"level":"error","ts":1564610028.6598723,"logger":"kubebuilder.controller","msg":"Reconciler error","controller":"solrcloud-controller","request":"default/zane","error":"SolrCloud.solr.bloomberg.com \"zane\" is invalid: []: Invalid value: map[string]interface {}{\"spec\":map[string]interface {}{\"replicas\":2, \"zookeeperRef\":map[string]interface {}{\"provided\":map[string]interface {}{\"zookeeper\":map[string]interface {}{\"image\":map[string]interface {}{\"repository\":\"emccorp/zookeeper\", \"tag\":\"3.5.4-beta-operator\", \"pullPolicy\":\"IfNotPresent\"}, \"persistentVolumeClaimSpec\":map[string]interface {}{\"accessModes\":[]interface {}{\"ReadWriteOnce\"}, \"resources\":map[string]interface {}{\"requests\":map[string]interface {}{\"storage\":\"5Gi\"}}, \"dataSource\":interface {}(nil)}, \"replicas\":3}, \"zetcd\":interface {}(nil)}}, \"solrImage\":map[string]interface {}{\"repository\":\"library/solr\", \"tag\":\"8.1.1\", \"pullPolicy\":\"IfNotPresent\"}, \"busyBoxImage\":map[string]interface {}{\"tag\":\"1.28.0-glibc\", \"pullPolicy\":\"IfNotPresent\", \"repository\":\"library/busybox\"}}, \"status\":map[string]interface {}{\"internalCommonAddress\":\"\", \"zookeeperConnectionInfo\":map[string]interface {}{\"internalConnectionString\":\"\", \"chroot\":\"\"}, \"solrNodes\":interface {}(nil), \"replicas\":0, \"readyReplicas\":0, \"version\":\"\"}, \"kind\":\"SolrCloud\", \"apiVersion\":\"solr.bloomberg.com/v1beta1\", \"metadata\":map[string]interface {}{\"namespace\":\"default\", \"uid\":\"c55a94c1-b3db-11e9-a110-025000000001\", \"creationTimestamp\":\"2019-07-31T21:40:10Z\", \"generation\":1, \"annotations\":map[string]interface {}{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"solr.bloomberg.com/v1beta1\\\",\\\"kind\\\":\\\"SolrCloud\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"zane\\\",\\\"namespace\\\":\\\"default\\\"},\\\"spec\\\":{\\\"replicas\\\":2,\\\"solrImage\\\":{\\\"tag\\\":\\\"8.1.1\\\"}}}\\n\"}, \"name\":\"zane\", \"clusterName\":\"\", \"selfLink\":\"/apis/solr.bloomberg.com/v1beta1/namespaces/default/solrclouds/zane\", \"resourceVersion\":\"153254\"}}: validation failure list:\nstatus.solrNodes in body must be of type array: \"null\"","stacktrace":"github.com/bloomberg/solr-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/bloomberg/solr-operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:217\ngithub.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1\n\t/go/src/github.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}
{"level":"info","ts":1564610029.6663337,"logger":"controller","msg":"Setting default settings for solr-cloud"}
{"level":"error","ts":1564610029.754057,"logger":"kubebuilder.controller","msg":"Reconciler error","controller":"solrcloud-controller","request":"default/zane","error":"SolrCloud.solr.bloomberg.com \"zane\" is invalid: []: Invalid value: map[string]interface {}{\"kind\":\"SolrCloud\", \"apiVersion\":\"solr.bloomberg.com/v1beta1\", \"metadata\":map[string]interface {}{\"namespace\":\"default\", \"uid\":\"c55a94c1-b3db-11e9-a110-025000000001\", \"resourceVersion\":\"153254\", \"clusterName\":\"\", \"generation\":1, \"creationTimestamp\":\"2019-07-31T21:40:10Z\", \"annotations\":map[string]interface {}{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"apiVersion\\\":\\\"solr.bloomberg.com/v1beta1\\\",\\\"kind\\\":\\\"SolrCloud\\\",\\\"metadata\\\":{\\\"annotations\\\":{},\\\"name\\\":\\\"zane\\\",\\\"namespace\\\":\\\"default\\\"},\\\"spec\\\":{\\\"replicas\\\":2,\\\"solrImage\\\":{\\\"tag\\\":\\\"8.1.1\\\"}}}\\n\"}, \"name\":\"zane\", \"selfLink\":\"/apis/solr.bloomberg.com/v1beta1/namespaces/default/solrclouds/zane\"}, \"spec\":map[string]interface {}{\"replicas\":2, \"zookeeperRef\":map[string]interface {}{\"provided\":map[string]interface {}{\"zookeeper\":map[string]interface {}{\"image\":map[string]interface {}{\"repository\":\"emccorp/zookeeper\", \"tag\":\"3.5.4-beta-operator\", \"pullPolicy\":\"IfNotPresent\"}, \"persistentVolumeClaimSpec\":map[string]interface {}{\"accessModes\":[]interface {}{\"ReadWriteOnce\"}, \"resources\":map[string]interface {}{\"requests\":map[string]interface {}{\"storage\":\"5Gi\"}}, \"dataSource\":interface {}(nil)}, \"replicas\":3}, \"zetcd\":interface {}(nil)}}, \"solrImage\":map[string]interface {}{\"tag\":\"8.1.1\", \"pullPolicy\":\"IfNotPresent\", \"repository\":\"library/solr\"}, \"busyBoxImage\":map[string]interface {}{\"repository\":\"library/busybox\", \"tag\":\"1.28.0-glibc\", \"pullPolicy\":\"IfNotPresent\"}}, \"status\":map[string]interface {}{\"zookeeperConnectionInfo\":map[string]interface {}{\"internalConnectionString\":\"\", \"chroot\":\"\"}, \"solrNodes\":interface {}(nil), \"replicas\":0, \"readyReplicas\":0, \"version\":\"\", \"internalCommonAddress\":\"\"}}: validation failure list:\nstatus.solrNodes in body must be of type array: \"null\"","stacktrace":"github.com/bloomberg/solr-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/bloomberg/solr-operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:217\ngithub.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1\n\t/go/src/github.com/bloomberg/solr-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134\ngithub.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until\n\t/go/src/github.com/bloomberg/solr-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88"}

Environment (please complete the following information):

  • Docker for Mac (Version 2.0.0.3 (31259))
@HoustonPutman
Copy link
Contributor

That's a very strange error. I'll look into it.

It's erroring on having the wrong type for the solrNodes array in the status object, while we are trying to set the defaults for the spec... That should not happen.

@HoustonPutman
Copy link
Contributor

Ok, found the issue. Your kubernetes version for that version of docker-for-mac is 1.10. CRD Subresources (status, etc.) were added as an experimental feature in 1.10. Therefore you have to enable it through a feature gate. Look on that page for CustomResourceSubresources.

Unfortunately it looks like docker-for-mac doesn't support setting feature gates (docker/for-mac#2382). It looks like the most recent version of docker-for-mac uses kubernetes 1.14 though, which would solve the issue.

I'll add info about compatibility with versions of kubernetes on the README.

@HoustonPutman
Copy link
Contributor

I will also mention, you should not provide a ingress-base-domain if you don't have DNS or /etc/hosts set up for that domain. Otherwise the solr containers will not be able to talk to each other. I have a fix for that coming soon, but for now I would recommend not using that parameter if you are planning on just communicating within the kube cluster (through services).

@sepulworld
Copy link
Contributor Author

Thank you Houston for your insight! I’ll update to beta Docker for Mac and will give it a shot. Appreciate the help

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

No branches or pull requests

2 participants