We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug helm upgrade failed.
To Reproduce After install kubeblocks using helm with version 0.9.2, the upgrade-hook-job will stuck with pre-upgrade-job container panic.
upgrade-hook-job
pre-upgrade-job
Additional context The helm logs:
middleware, kubeblock-upgrade-hook-job, Job (batch) has been added: - + # Source: kubeblocks/templates/kubeblocks-upgrade-hook.yaml + apiVersion: batch/v1 + kind: Job + metadata: + name: kubeblock-upgrade-hook-job + labels: + helm.sh/chart: kubeblocks-0.9.2 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblock + app.kubernetes.io/version: "0.9.2" + app.kubernetes.io/managed-by: Helm + annotations: + "helm.sh/hook": pre-upgrade + "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" + spec: + ttlSecondsAfterFinished: 3600 + template: + metadata: + name: kubeblock-upgrade + labels: + helm.sh/chart: kubeblocks-0.9.2 + app.kubernetes.io/name: kubeblocks + app.kubernetes.io/instance: kubeblock + app.kubernetes.io/version: "0.9.2" + app.kubernetes.io/managed-by: Helm + spec: + serviceAccountName: kubeblock-kubeblocks + securityContext: + runAsNonRoot: true + restartPolicy: OnFailure + containers: + - name: pre-upgrade-job + image: "apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.9.2" + imagePullPolicy: IfNotPresent + command: + - /bin/helm_hook + args: + - --version=0.9.2 + - --namespace=middleware + - name: delete-ops + image: "apecloud-registry.cn-zhangjiakou.cr.aliyuncs.com/apecloud/kubeblocks-tools:0.9.2" + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + opsDefs=$(kubectl get opsdefinitions.apps.kubeblocks.io | awk 'NR>1 {print $1}') + for opsDef in ${opsDefs}; do + if [ $(kubectl get opsdefinitions.apps.kubeblocks.io ${opsDef} -oyaml | grep " jobSpec:") ]; then + kubectl patch opsdefinitions.apps.kubeblocks.io ${opsDef} -p '{"metadata":{"finalizers":null}}' --type=merge + kubectl delete opsdefinitions.apps.kubeblocks.io ${opsDef} + elif [ ! $(kubectl get opsdefinitions.apps.kubeblocks.io ${opsDef} -oyaml | grep " actions:") ]; then + kubectl patch opsdefinitions.apps.kubeblocks.io ${opsDef} --type=merge -p '{"spec":{"actions":[{"name":"mock","exec":{"podInfoExtractorName":"test","command":["echo 1"]}}]}}' + fi + done + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - preference: + matchExpressions: + - key: kb-controller + operator: In + values: + - "true" + weight: 100 + tolerations: + - effect: NoSchedule + key: kb-controller + operator: Equal + value: "true"
The pod logs:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0xb0 pc=0x16fe31c] goroutine 1 [running]: github.com/apecloud/kubeblocks/cmd/helmhook/hook.getVersionInfo({0x1dddf80?, 0xc00012c900?}, 0x18?, {0x7fffcf0b993a?, 0xc000497db8?}) /src/cmd/helmhook/hook/prepare.go:41 +0x3c github.com/apecloud/kubeblocks/cmd/helmhook/hook.PrepareFor(0xc00012c900) /src/cmd/helmhook/hook/prepare.go:29 +0x32 github.com/apecloud/kubeblocks/cmd/helmhook/hook.Workflow.Do(...) /src/cmd/helmhook/hook/types.go:100 main.main() /src/cmd/helmhook/main.go:80 +0x630
The text was updated successfully, but these errors were encountered:
@sophon-zt PTAL
Sorry, something went wrong.
shanshanying
sophon-zt
Successfully merging a pull request may close this issue.
Describe the bug
helm upgrade failed.
To Reproduce
After install kubeblocks using helm with version 0.9.2, the
upgrade-hook-job
will stuck withpre-upgrade-job
container panic.Additional context
The helm logs:
The pod logs:
The text was updated successfully, but these errors were encountered: