# Container names changed back to UUID?

**URL:** <https://forums.suse.com/t/container-names-changed-back-to-uuid/2884>\
**Category:** Rancher 1.x\
**Created:** [May 24, 2016, 1:52am UTC](https://forums.suse.com/t/container-names-changed-back-to-uuid/2884 "2016-05-24T01:52:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyshinn](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/andyshinn/32/442_2.png) [@andyshinn](https://forums.suse.com/u/andyshinn)\
**Post date:** [May 24, 2016, 1:52am UTC](https://forums.suse.com/t/container-names-changed-back-to-uuid/2884/1 "2016-05-24T01:52:47Z")

</div>

I upgraded to 1.0.1 recently and have been deploying new stacks and getting the new name format (r-stack\_service\_cintainer\_count). But recently it started using the old UUID style names again. Why would that happen?

I’ve tried going to the Rancher server but it is really hard to find anything useful in logs with DEBUG level already enabled. The only thing I can think of that may have changed is the rancher-compose binary on one of the deployment nodes. Would rancher-compose be a dependency of the naming?

---

<div class="post-metadata">

**Author:** ![andyshinn](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/andyshinn/32/442_2.png) [@andyshinn](https://forums.suse.com/u/andyshinn)\
**Post date:** [May 24, 2016, 5:59pm UTC](https://forums.suse.com/t/container-names-changed-back-to-uuid/2884/2 "2016-05-24T17:59:48Z")

</div>

I’ve just done a manual upgrade of a service in the UI and the same behavior happened. So, it doesn’t appear to be related to rancher-compose at least. It seems that an upgrade goes back to the old naming convention.

---

<div class="post-metadata">

**Author:** ![JD\_Trout](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JD\_Trout](https://forums.suse.com/u/JD_Trout)\
**Post date:** [May 27, 2016, 5:27pm UTC](https://forums.suse.com/t/container-names-changed-back-to-uuid/2884/3 "2016-05-27T17:27:11Z")

</div>

I am seeing the same behavior and it appears to be a bit random. I have my hostname set to be the container name and when I do an upgrade about half the time the hostname picks up the container name and the other is the old style UUID. This creates a big issue for log management as I have filters set on hostnames. When I get the bad hostname I just keep running the upgrade and it will eventually fix itself.

I am also running rancher 1.0.1

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [May 27, 2016, 8:10pm UTC](https://forums.suse.com/t/container-names-changed-back-to-uuid/2884/4 "2016-05-27T20:10:43Z")

</div>

I think what’s happening is that container names have to be unique, so if there is already one with that name on that host it gets assigned a UUID one.

---

<div class="post-metadata">

**Author:** ![JD\_Trout](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@JD\_Trout](https://forums.suse.com/u/JD_Trout)\
**Post date:** [May 27, 2016, 8:41pm UTC](https://forums.suse.com/t/container-names-changed-back-to-uuid/2884/5 "2016-05-27T20:41:48Z")

</div>

Hello Vincent,

I looked into it a little more and that is exactly what is happening. The hostname within the container is being set correctly, but if the name is already set on the docker host then the UUID is assigned and that is what is being used in the logs. Just out of curiosity, why would rancher not increment the number so the name would work? For example, if I have a service called passenger it would go from r-myservice-passenger\_1 to r-myservice-passenger\_2? Does Rancher have any recommendations on how to get around this issue when doing an upgrade?

---

<div class="post-metadata">

**Author:** ![andyshinn](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/andyshinn/32/442_2.png) [@andyshinn](https://forums.suse.com/u/andyshinn)\
**Post date:** [May 30, 2016, 6:48pm UTC](https://forums.suse.com/t/container-names-changed-back-to-uuid/2884/6 "2016-05-30T18:48:10Z")

</div>

Is there a bug filed for this already? I’d love to get this fixed before 1.1. I’m trying to create logging queries for services based on container names and was hoping to be able to do this in 1.0.1 but can’t not that the names go away after a deploy.

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [June 2, 2016, 3:07am UTC](https://forums.suse.com/t/container-names-changed-back-to-uuid/2884/7 "2016-06-02T03:07:08Z")

</div>

@andyshinn I don’t believe there is an open bug for this.

Can you make one for it? Unfortunately, I can’t guarantee that it will make it into 1.1, but I can have engineering look at it.

---

<div class="post-metadata">

**Author:** ![andyshinn](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/andyshinn/32/442_2.png) [@andyshinn](https://forums.suse.com/u/andyshinn)\
**Post date:** [June 15, 2016, 3:33pm UTC](https://forums.suse.com/t/container-names-changed-back-to-uuid/2884/8 "2016-06-15T15:33:20Z")

</div>

I wonder if a workaround would be to stop the containers before upgrade instead of starting new ones then stopping old ones?

The linked GitHub issue is at [https://github.com/rancher/rancher/issues/4993](https://github.com/rancher/rancher/issues/4993).
