Skip to content
This repository has been archived by the owner on Jul 7, 2020. It is now read-only.

Restarting Containers #26

Open
morpheouso opened this issue Feb 6, 2020 · 10 comments
Open

Restarting Containers #26

morpheouso opened this issue Feb 6, 2020 · 10 comments

Comments

@morpheouso
Copy link

Is it possible to restart containers with this like it was with HA-dockermon? EG:
shell_command: restart_hass: 'curl http://127.0.0.1:8126/container/home-assistant/restart'

@Kisty
Copy link

Kisty commented Feb 8, 2020

I am able to with a switch. In generates a switch for each docker container e.g. switch.docker_.

@matt8707
Copy link

Yes, but restarting the hass container from hass?

@Kisty
Copy link

Kisty commented Feb 12, 2020

@matt8707 What do you mean? Like restart another container other than home assistant?

@matt8707
Copy link

No, I mean stopping the home-assistant docker container from lovelace would cut the connection. You can't start the container again from the ui if you stopped home assistant.

ha-dockermon has a restart command.

@Morphy99
Copy link

You can restart HA from the GUI? I guess if it hangs it could be an issue.

On the other side a restart is less cumbersome, you'd have to wait for the container to stop before starting again with the switch. Implementing that in a HA automation could be problematic.

@matt8707
Copy link

If i restart or stop from the ui hass doesn't load 30% of the time. Seems like I'm not alone with this issue.

you'd have to wait for the container to stop before starting again with the switch. Implementing that in a HA automation could be problematic.

How would home assistant trigger an automation if home assistant isn't running?

@Morphy99
Copy link

Morphy99 commented Feb 12, 2020

I was referring to other containers not HA specifically in that sentence. For example I restart zigbee2mqtt on HA restart to properly detect the states of my devices.

I guess we agree that Dockermon could do with a restart function at least 😆

I've also had it occasionally refuse to restart from the GUI as well. This is usually down to a config error somewhere that prevents it stopping gracefully AFAIK

@matt8707
Copy link

I can replicate on a vanilla install of home assistant core in docker. Never had issues on hass.io so I'm not sure it's a config error. I mean it's not a huge deal, I can restart from shell.

@Morphy99
Copy link

I can replicate on a vanilla install of home assistant core in docker. Never had issues on hass.io so I'm not sure it's a config error. I mean it's not a huge deal, I can restart from shell.

That's odd, maybe a docker config issue then? I have HA core docker running on RPi4 on Libreelec and restarts fine 99% of the time. Only time I can recall it not working is when I had a config error in my yaml I forgot to correct before restarting. What version of HA are you running? I'm one behind latest so maybe a bug in the most recent?

@matt8707
Copy link

matt8707 commented Feb 12, 2020

Yeah I don't mean yaml config errors. Seems to be an Issue with synology nas somehow. Either way I just tried ha-dockermon and it works as expected.

But it would be nice to have in docker_monitor so I don't have to run both.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants