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

Expose the machine readable state of a container when listing containers #18966

Merged
merged 1 commit into from
Feb 3, 2016

Conversation

mariusGundersen
Copy link
Contributor

PoC implementation of #18962 C

@GordonTheTurtle GordonTheTurtle added status/0-triage dco/no Automatically set by a bot when one of the commits lacks proper signature labels Dec 29, 2015
@GordonTheTurtle GordonTheTurtle removed the dco/no Automatically set by a bot when one of the commits lacks proper signature label Dec 29, 2015
@calavera
Copy link
Contributor

Change LGTM. We'll need to document this new field in the API reference guide.

@icecrime
Copy link
Contributor

Makes sense to me! LGTM, thanks :-)

@mariusGundersen
Copy link
Contributor Author

Maybe update the diagram of the state machine too, to match the names of the states?

@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Jan 2, 2016
@GordonTheTurtle GordonTheTurtle removed the dco/no Automatically set by a bot when one of the commits lacks proper signature label Jan 2, 2016
@mariusGundersen
Copy link
Contributor Author

I've updated the documentation for the /containers/json endpoint

@thaJeztah
Copy link
Member

Thanks @mariusGundersen! can you also;

@mariusGundersen
Copy link
Contributor Author

OK, so the valid states are: created|restarting|running|paused|exited|dead. This is what State will now return when calling /containers/json, but to filter you need to use the key Status rather than the key State. This is slightly confusing, so I propose that both Status and State can be used to filter the result, but that Status be deprecated.

@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Jan 4, 2016
@GordonTheTurtle GordonTheTurtle removed the dco/no Automatically set by a bot when one of the commits lacks proper signature label Jan 4, 2016
@mariusGundersen
Copy link
Contributor Author

@thaJeztah, I have updated the documentation, and I have added the ability to filter using the state key. I've also changed the diagram to use the states exposed through the api. If this looks OK I will squash the commits

@thaJeztah
Copy link
Member

Thanks @mariusGundersen if we want to deprecate the "status" filter, that will also affect the command line, and we need to add a deprecation notice, so these docs need to be updated as well if we deprecate this;

I'm not sure yet if we want this, given that filtering by status is pretty common, and deprecating that filter may affect many people.

I'll move this PR back to "design review" so that we can discuss the deprecation

@thaJeztah
Copy link
Member

ping @calavera @icecrime wdyt on deprecating the status filter in favor of state?

@mariusGundersen
Copy link
Contributor Author

I'll break this pull-request apart into two pull requests: one that adds state to the /containers/json response, and one that replaces status with state in the filters in the request, both in the API and in the CLI

@thaJeztah
Copy link
Member

sgtm,that will probably make merging easier, and moves the discussion to another PR. thanks!

@thaJeztah
Copy link
Member

thanks! docs LGTM

@vdemeester
Copy link
Member

ping @mariusGundersen We need to make a change to docker/engine-api. I'm making a PR to get it quick. See docker/engine-api#45.

But for the time beeing, moving back to code-review 😅

@thaJeztah
Copy link
Member

@mariusGundersen unfortunately, it looks like this just didn't make the cut for the 1.10 release, so the docs changes need to be updated to be in the v1.23 API version 😢

@mariusGundersen
Copy link
Contributor Author

I love deadlines, especially the whooshing sound they make as they fly by...

@cpuguy83
Copy link
Member

Looks like we're still waiting on that engine-api update?

@calavera
Copy link
Contributor

Looks like we're still waiting on that engine-api update?

the vendored version in master should have this field already.

@cpuguy83
Copy link
Member

Ah yep, it's there now, and a duplicate field now.

@mariusGundersen Can you remove your changes from vendor since this is now in?

Updated documentation to reflect the new State property in the inspect remote api

Updated API changes for 1.23

Signed-off-by: Marius Gundersen <me@mariusgundersen.net>
@mariusGundersen
Copy link
Contributor Author

I've force pushed a fix. I kept the order of the variables from engine-api (State before Status, which is the alphabetical order).

@runcom
Copy link
Member

runcom commented Jan 31, 2016

LGTM moving again back to doc review since this was previously there

@thaJeztah
Copy link
Member

LGTM

ping @vdemeester @MHBauer

@vdemeester
Copy link
Member

LGTM 🐹

@thaJeztah thaJeztah added this to the 1.11.0 milestone Feb 3, 2016
vdemeester added a commit that referenced this pull request Feb 3, 2016
Expose the machine readable state of a container when listing containers
@vdemeester vdemeester merged commit 98c4f0b into moby:master Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants