Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-5211

[Operator] Unable to deal Create/Update caches via Cache CR with special characters

XMLWordPrintable

      Operator isn't able to verify cache existence if the cache name in Cache CR contains special character (eg. space or slash). The cache with such name isn't created nor it's possible to update such cache if was created by config listener. (Cache with space in name is correctly created by config listener but no longer processable)

      Cache CR example:

      spec: 
        clusterName: infinispan
        name: space cache
        template: |
          distributedCache: 
            encoding: 
              key: 
                mediaType: application/x-protostream
              value: 
                mediaType: application/x-protostream
            mode: SYNC
            statistics: "false"
      

      Operator stacktraces:
      name: cache space

      2022-04-07T16:44:09.873Z	ERROR	controllers.Cache		
      {"Request.Namespace": "datagrid", "Request.Name": "example-cache", "error": "unable to determine if cache exists: unexpected error validating cache exists: stderr:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\ncurl: (6) Could not resolve host: cache\n, err: command terminated with exit code 6"}
      github.com/go-logr/zapr.(*zapLogger).Error
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/github.com/go-logr/zapr/zapr.go:132
      github.com/infinispan/infinispan-operator/controllers.(*cacheRequest).ispnCreateOrUpdate
      	/root/go/src/github.com/infinispan/infinispan-operator/controllers/cache_controller.go:258
      github.com/infinispan/infinispan-operator/controllers.(*CacheReconciler).Reconcile
      	/root/go/src/github.com/infinispan/infinispan-operator/controllers/cache_controller.go:194
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:263
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:235
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1.1
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:198
      k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:185
      k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:155
      k8s.io/apimachinery/pkg/util/wait.BackoffUntil
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:156
      k8s.io/apimachinery/pkg/util/wait.JitterUntil
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
      k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:185
      k8s.io/apimachinery/pkg/util/wait.UntilWithContext
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:99
      

      name: cache/slash

      2022-04-07T16:49:56.573Z	ERROR	controllers.Cache		{"Request.Namespace": "datagrid", "Request.Name": "cache-with-slash", "error": "unable to determine if cache exists: unexpected error validating cache exists: unexpected EOF"}
      github.com/go-logr/zapr.(*zapLogger).Error
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/github.com/go-logr/zapr/zapr.go:132
      github.com/infinispan/infinispan-operator/controllers.(*cacheRequest).ispnCreateOrUpdate
      	/root/go/src/github.com/infinispan/infinispan-operator/controllers/cache_controller.go:258
      github.com/infinispan/infinispan-operator/controllers.(*CacheReconciler).Reconcile
      	/root/go/src/github.com/infinispan/infinispan-operator/controllers/cache_controller.go:194
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:263
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:235
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1.1
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:198
      k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:185
      k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:155
      k8s.io/apimachinery/pkg/util/wait.BackoffUntil
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:156
      k8s.io/apimachinery/pkg/util/wait.JitterUntil
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
      k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:185
      k8s.io/apimachinery/pkg/util/wait.UntilWithContext
      	/root/go/src/github.com/infinispan/infinispan-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:99
      

              remerson@redhat.com Ryan Emerson
              pdrobek@redhat.com Pavel Drobek (Inactive)
              Pavel Drobek Pavel Drobek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: