Uploaded image for project: 'Cloud Dev'
  1. Cloud Dev
  2. CLOUD-152

[PSMDB] crash if no backup section

    Details

    • Type: Bug
    • Status: Pending Release
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PSMDB 0.3.0
    • Component/s: None
    • Labels:
      None

      Description

      CR

      apiVersion: psmdb.percona.com/v1alpha1
      kind: PerconaServerMongoDB
      metadata:
        name: some-name
      spec:
        #platform: openshift
        image:
        imagePullPolicy: Always
        mongod:
          net:
            hostPort: 0
            port: 27017
          operationProfiling:
            mode: slowOp
            rateLimit: 1
            slowOpThresholdMs: 100
          security:
            redactClientLogData: false
          setParameter:
            ttlMonitorSleepSecs: 60
            wiredTigerConcurrentReadTransactions: 128
            wiredTigerConcurrentWriteTransactions: 128
          storage:
            engine: wiredTiger
            inMemory:
              engineConfig:
                inMemorySizeRatio: 0.9
            mmapv1:
              nsSize: 16
              smallfiles: false
            wiredTiger:
              collectionConfig:
                blockCompressor: snappy
              engineConfig:
                cacheSizeRatio: 0.5
                directoryForIndexes: false
                journalCompressor: snappy
              indexConfig:
                prefixCompression: true
        replsets:
        - name: rs0
          resources:
            limits:
              cpu: 500m
              memory: 0.5G
            requests:
              cpu: 100m
              memory: 0.1G
            storage: 1Gi
          size: 3
        secrets:
          key: some-key
          users: some-users
      

      Log

      {"level":"info","ts":1551940890.6023343,"logger":"cmd","msg":"Go Version: go1.11.5"}{"level":"info","ts":1551940890.6023343,"logger":"cmd","msg":"Go Version: go1.11.5"}{"level":"info","ts":1551940890.602402,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}{"level":"info","ts":1551940890.602428,"logger":"cmd","msg":"operator-sdk Version: v0.3.0"}{"level":"info","ts":1551940890.603057,"logger":"leader","msg":"Trying to become the leader."}{"level":"info","ts":1551940890.7094767,"logger":"cmd","msg":"Registering Components."}{"level":"info","ts":1551940890.7122364,"logger":"controller_psmdb","msg":"server version","platform":"openshift","version":"v3.9.0+ba7faec-1"}{"level":"info","ts":1551940890.712549,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"psmdb-controller","source":"kind source: /, Kind="}{"level":"info","ts":1551940890.7126558,"logger":"cmd","msg":"Starting the Cmd."}{"level":"info","ts":1551940890.8129056,"logger":"kubebuilder.controller","msg":"Starting Controller","controller":"psmdb-controller"}{"level":"info","ts":1551940890.9141612,"logger":"kubebuilder.controller","msg":"Starting workers","controller":"psmdb-controller","worker count":1}{"level":"info","ts":1551940890.9142756,"logger":"controller_psmdb","msg":"Reconciling PerconaServerMongoDB","Request.Namespace":"init-deploy-21422","Request.Name":"some-name"}E0307 06:41:31.016321       1 runtime.go:66] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:72/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51/usr/local/go/src/runtime/asm_amd64.s:522/usr/local/go/src/runtime/panic.go:513/usr/local/go/src/runtime/panic.go:82/usr/local/go/src/runtime/signal_unix.go:390/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/psmdb/backup/coordinator.go:116/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/psmdb/backup/coordinator.go:94/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/backup.go:25/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/backup.go:16/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/psmdb_controller.go:193/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:213/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134/go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88/usr/local/go/src/runtime/asm_amd64.s:1333panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x107a689]
      goroutine 234 [running]:github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x108panic(0x12b9160, 0x222e5d0) /usr/local/go/src/runtime/panic.go:513 +0x1b9github.com/Percona-Lab/percona-server-mongodb-operator/pkg/psmdb/backup.coordinatorPersistentVolumeClaim(...) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/psmdb/backup/coordinator.go:116github.com/Percona-Lab/percona-server-mongodb-operator/pkg/psmdb/backup.CoordinatorStatefulSet(0xc0000e1180, 0xc0000e1300, 0xc00045b4a0, 0xc00049a200, 0x60) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/psmdb/backup/coordinator.go:94 +0x629github.com/Percona-Lab/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).reconcileBackupSfs(0xc000490870, 0xc0000e1180, 0x60, 0x137ed00, 0x13d1201) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/backup.go:25 +0x68github.com/Percona-Lab/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).reconcileBackupCoordinator(0xc000490870, 0xc0000e1180, 0xc000042038, 0xc000044e60, 0x11) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/backup.go:16 +0x39github.com/Percona-Lab/percona-server-mongodb-operator/pkg/controller/perconaservermongodb.(*ReconcilePerconaServerMongoDB).Reconcile(0xc000490870, 0xc000044e60, 0x11, 0xc000430c10, 0x9, 0x22433e0, 0x160, 0xc000057588, 0x42d3dd) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/pkg/controller/perconaservermongodb/psmdb_controller.go:193 +0x95bgithub.com/Percona-Lab/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0000c8320, 0x0) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:213 +0x1d3github.com/Percona-Lab/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1() /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158 +0x36github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc000039f50) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x54github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000039f50, 0x3b9aca00, 0x0, 0x1, 0xc000293140) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbegithub.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc000039f50, 0x3b9aca00, 0xc000293140) /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4dcreated by github.com/Percona-Lab/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start /go/src/github.com/Percona-Lab/percona-server-mongodb-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x32a 

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                andrew.pogrebnoi Andrii Pogrebnoi
                Reporter:
                mykola.marzhan Mykola Marzhan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 hour
                  1h