# Rancher CLI - Upgrade Stack In "Upgraded" State

**URL:** <https://forums.suse.com/t/rancher-cli-upgrade-stack-in-upgraded-state/5810>\
**Category:** Rancher 1.x\
**Created:** [March 10, 2017, 3:07pm UTC](https://forums.suse.com/t/rancher-cli-upgrade-stack-in-upgraded-state/5810 "2017-03-10T15:07:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eldermael](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/eldermael/32/2255_2.png) [@eldermael](https://forums.suse.com/u/eldermael)\
**Post date:** [March 10, 2017, 3:07pm UTC](https://forums.suse.com/t/rancher-cli-upgrade-stack-in-upgraded-state/5810/1 "2017-03-10T15:07:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nischay\_Singh\_Rathor](https://avatars.discourse-cdn.com/v4/letter/n/e19b73/32.png) [@Nischay\_Singh\_Rathor](https://forums.suse.com/u/Nischay_Singh_Rathor)\
**Post date:** [April 11, 2017, 8:37am UTC](https://forums.suse.com/t/rancher-cli-upgrade-stack-in-upgraded-state/5810/2 "2017-04-11T08:37:56Z")

</div>

We are also observing this issue. Any help to solve this?
