# Rancher CLI "start before stop"

**URL:** <https://forums.suse.com/t/rancher-cli-start-before-stop/6691>\
**Category:** Rancher 1.x\
**Created:** [June 21, 2017, 2:14pm UTC](https://forums.suse.com/t/rancher-cli-start-before-stop/6691 "2017-06-21T14:14:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cabrinoob](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cabrinoob/32/1343_2.png) [@cabrinoob](https://forums.suse.com/u/cabrinoob)\
**Post date:** [June 21, 2017, 2:14pm UTC](https://forums.suse.com/t/rancher-cli-start-before-stop/6691/1 "2017-06-21T14:14:30Z")

</div>

Hi,  
I wonder if ther’s a way to have with Rancher CLI the same behavior than the API when we upgrade a service in a stack : the possibility to start before stop.

In other words : is it possible to have zero downtime during a rancher CLI force-upgrade of a stack?

Thank you

---

<div class="post-metadata">

**Author:** ![cabrinoob](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cabrinoob/32/1343_2.png) [@cabrinoob](https://forums.suse.com/u/cabrinoob)\
**Post date:** [June 21, 2017, 3:33pm UTC](https://forums.suse.com/t/rancher-cli-start-before-stop/6691/2 "2017-06-21T15:33:36Z")

</div>

I found something “almost” working : Adding this in the rancher-compose of the stack :  
\> upgrade\_strategy:  
\> start\_first: true

My problem is that when I create a new stack with this upgrade strategy and when I get back the docker-compose.yml and the rancher-compose.yml from API, this option has not been saved in it.

I’am using Rancher-CLI through Jenkins in my CI/CD workflow. And when I want to force an upgrade of my stack, my Jenkins Job starts with an API call to get the YAML files and then calls the rancher CLI upgrade. But if I open the rancher-compose.yaml, I did not find the upgrade\_startegy properties.

Is it a bug?

---

<div class="post-metadata">

**Author:** ![joshwget](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/joshwget/32/704_2.png) [@joshwget](https://forums.suse.com/u/joshwget)\
**Post date:** [June 22, 2017, 4:17pm UTC](https://forums.suse.com/t/rancher-cli-start-before-stop/6691/3 "2017-06-22T16:17:19Z")

</div>

When you say through the API, are you performing a stack config export? Could be a bug here. Do you mind filing a bug so we can track this?

---

<div class="post-metadata">

**Author:** ![cabrinoob](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cabrinoob/32/1343_2.png) [@cabrinoob](https://forums.suse.com/u/cabrinoob)\
**Post date:** [June 22, 2017, 7:06pm UTC](https://forums.suse.com/t/rancher-cli-start-before-stop/6691/4 "2017-06-22T19:06:09Z")

</div>

Yes, I get the stack config (a zip file with the docker-compose and the rancher-compose in it).  
Do i have to create an issue on github?
