CoreOS: fleetctl status shows service inactive, while container is up

457 views Asked by At

So I have done a 3 node core-os setup with vagrant on my laptop. I am following their quick start guide. https://coreos.com/docs/quickstart/.

Now, when I am running hello.service and check it's status, it shows me that the service is inactive/dead.

core@core-02 ~ $ fleetctl status hello.service 
● \x22hello.service\x22.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

While the logs and docker ps output seems to imply that it all is working fine:

core@core-02 ~ $ docker ps
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS               NAMES
3b338ba5085b        busybox:latest      "/bin/sh -c 'while t   2 minutes ago       Up 2 minutes                            hello        


core@core-02 ~ $ fleetctl journal hello.service 
-- Logs begin at Wed 2015-06-17 08:23:20 , end at Wed 2015-06-17 11:27:48 . --
Jun 17 11:27:39 core-02 docker[3296]: Hello World
Jun 17 11:27:40 core-02 docker[3296]: Hello World
Jun 17 11:27:41 core-02 docker[3296]: Hello World
Jun 17 11:27:42 core-02 docker[3296]: Hello World
Jun 17 11:27:43 core-02 docker[3296]: Hello World
Jun 17 11:27:44 core-02 docker[3296]: Hello World
Jun 17 11:27:45 core-02 docker[3296]: Hello World
Jun 17 11:27:46 core-02 docker[3296]: Hello World
Jun 17 11:27:47 core-02 docker[3296]: Hello World
Jun 17 11:27:48 core-02 docker[3296]: Hello World

Any idea what am I doing wrong with my environment? TIA. Here is hello.service:

core@core-02 ~ $ cat hello.service 
[Unit]
Description=My Service
After=docker.service

[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill hello
ExecStartPre=-/usr/bin/docker rm hello
ExecStartPre=/usr/bin/docker pull busybox
ExecStart=/usr/bin/docker run --name hello busybox /bin/sh -c "while true; do echo Hello World; sleep 1; done"
ExecStop=/usr/bin/docker stop hello
1

There are 1 answers

0
mcqwerty On

It's a bug in fleetctl related to escaping quotes. The closing comment says the fix is applied to alpha and stable but, oddly, not beta.

https://github.com/coreos/fleet/issues/1208