Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restarting containers shown as 'running' #970

Closed
rade opened this issue Feb 17, 2016 · 6 comments · Fixed by #1235
Closed

restarting containers shown as 'running' #970

rade opened this issue Feb 17, 2016 · 6 comments · Fixed by #1235
Assignees
Labels
bug Broken end user or developer functionality; not working as the developers intended it
Milestone

Comments

@rade
Copy link
Member

rade commented Feb 17, 2016

running 0.12...

screenshot from 2016-02-17 14 00 47

Notice how the state is shown as 'running', yet there is none of the information - metrics, applications, etc - I'd expect to see of a running container. And the reason is that the container isn't actually running. It was started with

$ docker run --restart=always -dti ubuntu sleep 0.2

and is currently restarting.

docker inspect shows

...
        "State": {
            "Status": "restarting",
            "Running": true,
            "Paused": false,
            "Restarting": true,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2016-02-17T14:01:45.304670287Z",
            "FinishedAt": "2016-02-17T14:01:45.521808095Z"
        },
...

NB: State.Status is a new(ish) field; older Dockers don't have it.

@rade rade added the bug Broken end user or developer functionality; not working as the developers intended it label Feb 17, 2016
@paulbellamy
Copy link
Contributor

State.Status is also not present in the docker client library we're using, so probably want to update that.

Looks like it was added in docker 1.9

@rade
Copy link
Member Author

rade commented Feb 17, 2016

The alternative is to look at the combination of State.Running and State.Restarting, since that works across versions. That's what we are doing in Weave Net.

@paulbellamy
Copy link
Contributor

and State.OOMKilled, and State.Dead....

@rade
Copy link
Member Author

rade commented Feb 17, 2016

and State.OOMKilled, and State.Dead....

I am pretty sure State.Running=false for these.

@paulbellamy
Copy link
Contributor

ah. Will check what docker does

@paulbellamy
Copy link
Contributor

Docker has a nice function for converting the container state into a human-readable string (used in docker ps). So we could show the state as: e.g. Restarting (0) 17 seconds ago, and Up 23 hours. Or we could show something like: running, paused, restarting, etc...
Either way we have to patch and update the go-dockerclient library. I quite prefer the more human-readable versions for display in the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken end user or developer functionality; not working as the developers intended it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants