Hello all,
We are trying to use rancher cli to upgrade several stacks in our rancher environment and sometimes we get failures because the current state of the services created is “UPGRADED”.
rancher --debug --wait-timeout ${DEPLOY_TIMEOUT_IN_SECONDS} \
up --force-upgrade --stack ${STACK_NAME} \
--pull --confirm-upgrade --interval $INTERVAL -d
If I understand correctly, if I pass the --confirm-upgrade
option it should not remain in the UPGRADED
state once the deployment is successful. This is probably a bug as we have checked the state of the stack after executing the script and it remains at UPGRADED
and once we manually finish the upgrade then the next deployment may succeed or leave in the same state.
Now, this is a problem because when our deployment tool is triggered, the next deployment will fail. Here are the logs we see:
level=debug msg="Project [spring-boot-database-service-stack]: Project started "
level=fatal msg="Service spring-boot-database-service must be state=active or inactive to upgrade, currently: state=upgraded"
Also, is there a way to force the upgrade even if the current state is different than active/inactive?
We are currently using:
Rancher CLI v0.4.1
Rancher Server: v1.4.1