PanteraS icon indicating copy to clipboard operation
PanteraS copied to clipboard

How can I get marathon to restart all services after reboot ?

Open kopax opened this issue 5 years ago • 2 comments

Hello all, and thanks for reading.

I am testing v0.4.3 in standalone mode.

After starting two services on marathon, I have tried to reboot the server with sudo reboot.

After reboot, PanteraS is starting but marathon is not restoring any services despites the following mounted volumes:

  volumes:
    - "/etc/resolv.conf:/etc/resolv.conf.orig"
    - "/var/run/docker.sock:/tmp/docker.sock"
    - "/var/run/docker.sock:/var/run/docker.sock"
    - "/var/lib/docker:/var/lib/docker"
    - "/sys:/sys"
    - "/tmp/mesos:/tmp/mesos"
    - "/tmp/supervisord:/tmp/supervisord"
    - "/tmp/consul/data:/opt/consul/data"
    - "/tmp/zookeeper:/var/lib/zookeeper/version-2"
    - "/proc:/host/proc:ro" 
    - "/sys:/host/sys:ro"
    - "./docker.tar.gz:/etc/docker.tar.gz"

I expected - "/tmp/mesos:/tmp/mesos" and - "/tmp/zookeeper:/var/lib/zookeeper/version-2" to save the state.

How can I get marathon to restart all services after reboot ?

kopax avatar Sep 14 '20 18:09 kopax

hey @kopax did you get that fixed/done? If so would you mind sharing your solution so others could find it in the future?

RiRa12621 avatar Sep 16 '20 14:09 RiRa12621

Hi @RiRa12621, no I did not fixed it.

People recommend to use a task scheduler like chronos. I personally use gitlab ci runner to deploy the image. If the server crash, app are not manually restarted and that is an issue. I must run the pipeline, but I can also schedule it as in chronos to have it run every 12h for example. I wish a better option exist and someone here car share it, having multiple runner for restoring the state seems a bit too heavy. You can also not use marathon and start the container with restart: always.

kopax avatar Sep 16 '20 23:09 kopax