# Editing label on a host doesn't save properly

**URL:** <https://forums.suse.com/t/editing-label-on-a-host-doesnt-save-properly/471>\
**Category:** Rancher 1.x\
**Created:** [September 15, 2015, 7:53pm UTC](https://forums.suse.com/t/editing-label-on-a-host-doesnt-save-properly/471 "2015-09-15T19:53:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebishop](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@ebishop](https://forums.suse.com/u/ebishop)\
**Post date:** [September 15, 2015, 7:53pm UTC](https://forums.suse.com/t/editing-label-on-a-host-doesnt-save-properly/471/1 "2015-09-15T19:53:34Z")

</div>

I set a label incorrectly, so clicked the edit action on the host. I deleted the incorrect label, then added the new one, and clicked save. The the host appeared to have no labels.

---

<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:** [September 15, 2015, 8:12pm UTC](https://forums.suse.com/t/editing-label-on-a-host-doesnt-save-properly/471/2 "2015-09-15T20:12:53Z")

</div>

I have not been able to reproduce. Any time I edit the labels (deleting old ones adding new ones), it shows up on my host.

- When did you set the incorrect label? Was it when you added the host to Rancher server? Or did you add it in the edit screen?
- Was this a custom host or one from a cloud provider?
- How many labels did you have in total?
- Can you provide the incorrect key value pair and what you corrected it to be?

Sorry for the list of questions, but since I can’t easily reproduce, I need more information. 🙂

---

<div class="post-metadata">

**Author:** ![ebishop](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@ebishop](https://forums.suse.com/u/ebishop)\
**Post date:** [September 15, 2015, 9:02pm UTC](https://forums.suse.com/t/editing-label-on-a-host-doesnt-save-properly/471/3 "2015-09-15T21:02:54Z")

</div>

This is a host I created, using the Rancher UI on Openstack. The host creation is fine.

Ok, in the UI I added this label, and now it shows up in the UI on the host.

`cluster.type=bogus`

In my docker-compose.yml I added this:

```auto
  labels:
    io.rancher.scheduler.affinity:host_label: cluster.type=bogus

```

Does this look correct?

I don’t get any errors when I try to start it, but it’s also not starting the container. I verified that I can pull the image on the target host. I’m not sure where to look to debug this.

Please, advise.

---

<div class="post-metadata">

**Author:** ![ebishop](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@ebishop](https://forums.suse.com/u/ebishop)\
**Post date:** [September 15, 2015, 9:30pm UTC](https://forums.suse.com/t/editing-label-on-a-host-doesnt-save-properly/471/4 "2015-09-15T21:30:24Z")

</div>

ok, I need to work on being patient. Rancher must have been busy cleaning up from my previous failed attempts. I had a couple of instances of the target containers spinning in the UI, even though I had requested a delete several times. After I made my last post, waited a about 20 minutes and then the old containers were cleaned up. Then I re-tried my setup and it worked. 😄

---

<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:** [September 16, 2015, 12:23am UTC](https://forums.suse.com/t/editing-label-on-a-host-doesnt-save-properly/471/5 "2015-09-16T00:23:04Z")

</div>

FYI the forum software or your post had a bunch of extra newlines all over it and your displayed text wouldn’t have actually worked, so I cleaned it up. It sounds like you had the right `docker-compose.yml` though since it’s working now.

---

<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:** [September 16, 2015, 4:26am UTC](https://forums.suse.com/t/editing-label-on-a-host-doesnt-save-properly/471/6 "2015-09-16T04:26:28Z")

</div>


