fmartinou / whats-up-docker

What's up Docker ( aka WUD ) gets you notified when a new version of your Docker Container is available.
https://fmartinou.github.io/whats-up-docker
MIT License
983 stars 32 forks source link

Wrong name of container in wud after updating a stack in Portainer #294

Open mhosse opened 1 year ago

mhosse commented 1 year ago

For some of my containers I use the stack feature (docker compose) of Portainer. While updating the container, Portainer creates the new container at first with a prefixed name. After the successful update the old container is removed and the new one is renamed. Unfortunately, wud does not change the name after the update as well.

Example: I updated the container with name "homeassistant". In wud the updated container is named "8b3b3c4de280_homeassistant". In MQTT both container are visible but only "8b3b3c4de280_homeassistant" gets new values. Btw: The prefix are the first characters of the old container id.

I can fix this by recreating the container without any change. But this can only be a workaround. If I update the container directly everything works as expected as well.

Btw: wud also does not recognize when the container name is changed in Portainer.

alexdelprete commented 1 year ago

@fmartinou This is an issue I'm also having (not with Portainer, simple docker-compose files) since quite some time. Wanted to analyze the problem better before opening the issue. It seems to be triggered when I recreate the container (to restart/upgrade etc.). I usually update the compose file then I do this: docker compose up -d --force-recreate --remove-orphans

After recreating it, I notice that in WUD, often the name of the instance has a weird random string prefix. Check here, I upgraded Home Assistant 2 times and later I saw this in my MQTT broker (and also WUD UI obviously):

image

In order to clean this, I stop WUD, delete the json file, clean the bad topics in MQTT (both in WUD topic and homeassistant discovery topic), then restart WUD and all the names would be ok again.

It's very annoying to do this everytime I upgrade something...:)

alexdelprete commented 8 months ago

@fmartinou can we do something to prevent this from happening? maybe recreating the image in a different way wouldn't trigger it?

Maintenance of this is becoming tedious with many containers...I have to clean MQTT first, then the wud.json and restart wud. :(

aheath70 commented 7 months ago

+1 with this issue.

aheath70 commented 7 months ago

Any update on this?? I just got hit by it again.

alexdelprete commented 7 months ago

Any update on this?? I just got hit by it again.

It's an everyday issue for me. Every week I delete wud.json file, clean MQTT entries, and restart WUD. But as soon as I start upgrades to containers, in a couple of days I have all names messed-up.

I hope @fmartinou will take a look at this...it's really annoying. It's strange he never even replied nor acknowledged the issue. :(

Hope he's ok...

image

RK62 commented 3 months ago

+1 with this issue.