Encountered an issue while running two pipelines in parallel, leading to a Helm upgrade failure with the following error message:
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
helm.go:84: [debug] another operation (install/upgrade/rollback) is in progress
helm.sh/helm/v3/pkg/action.init
<autogenerated>:1
runtime.doInit1
runtime/proc.go:7176
runtime.doInit
runtime/proc.go:7143
runtime.main
runtime/proc.go:253
runtime.goexit
runtime/asm_amd64.s:1695
UPGRADE FAILED
main.newUpgradeCmd.func2
helm.sh/helm/v3/cmd/helm/upgrade.go:240
github.com/spf13/cobra.(*Command).execute
github.com/spf13/[email protected]/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/[email protected]/command.go:1115
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/[email protected]/command.go:1039
main.main
helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
runtime/proc.go:271
runtime.goexit
runtime/asm_amd64.s:1695
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: command terminated with exit code 1
It appears that one of the operations is stuck in a pending state. I’ve accessed the shell of the pods, but I can’t find helm or kubectl commands available. How can I diagnose what is stuck in the pending state and proceed with the upgrade?
Tried accessing the pod shells to troubleshoot, but essential commands are missing.
Any guidance on how to resolve this issue or identify the pending operation would be greatly appreciated.
Here is the part of my pipline which causes an error
.pre-deploy:
image: dtzar/helm-kubectl:latest
stage: deploy
tags:
- k8s
before_script:
- |
GREEN='33[0;32m'
NC='33[0m'
if kubectl get ns "$NAMESPACE"; then
echo -e "${GREEN}namespace for project already exists${NC}"
else
echo -e "${GREEN}creating namespace for project${NC}"
kubectl create namespace "$NAMESPACE"
echo
fi
- *kubectl_secret_fallback
- wget https://github.com/a8m/envsubst/releases/download/v1.4.2/envsubst-Linux-x86_64
- chmod +x envsubst-Linux-x86_64
- mv envsubst-Linux-x86_64 /bin/envsubst
script:
- envsubst < ${CHART_PATH}/values.${ENVIRONMENT}.yaml > ${CHART_PATH}/values_deploy.${ENVIRONMENT}.yaml
- helm upgrade -n ${NAMESPACE} ${PROJECT_NAME} ${CHART_PATH} --install --atomic -f ${CHART_PATH}/values_deploy.${ENVIRONMENT}.yaml --debug