Skip to content
This repository has been archived by the owner on Nov 23, 2019. It is now read-only.

Add new field for Swarm in Docker Engine API #44

Closed
nishanttotla opened this issue Jan 14, 2016 · 8 comments
Closed

Add new field for Swarm in Docker Engine API #44

nishanttotla opened this issue Jan 14, 2016 · 8 comments

Comments

@nishanttotla
Copy link
Contributor

Currently, the /info endpoint for the Swarm API uses DriverStatus field in the Engine API. We would like to create a new field exclusively for Swarm to use.

The current suggestion is to name the field CustomStatus.

Related issues: moby/moby#19277, docker-archive/classicswarm#1625, samalba/dockerclient#215

cc @calavera @vieux

@vieux
Copy link
Contributor

vieux commented Jan 14, 2016

👍

@dnephin
Copy link
Contributor

dnephin commented Jan 14, 2016

CustomStatus is not very descriptive. Wouldn't it make sense to use something more descriptive about the values it contains? I assume it's about the node status, so maybe NodeStatus? or ClusterStatus ?

@nishanttotla
Copy link
Contributor Author

@dnephin The idea is that Docker Engine isn't tied to Swarm only, so we want a more generic "extra info" field that could be used by other tools also. What do you think?

@dnephin
Copy link
Contributor

dnephin commented Jan 14, 2016

I think it would still be better to be descriptive, engine can just return nil for the value and it will be omitted from the response.

@nishanttotla
Copy link
Contributor Author

Fair point, but it bloats the API, and depending on how Swarm evolves, may not be needed later. A general [][2]string field on the other hand will be more flexible.

@calavera what do you think?

nishanttotla referenced this issue in nishanttotla/engine-api Jan 15, 2016
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
@dongluochen
Copy link
Contributor

@nishanttotla Can you provide examples how this field will be used?

@nishanttotla
Copy link
Contributor Author

The current use case is only for Swarm (as per this issue docker-archive/classicswarm#1625). An example for what this field might contain is as follows:

[][]string{
{"Role", "primary"},
{"Strategy", "spread"},
{"Nodes", "2"},
{" agent-01", "x.x.x.x:2375"},
{" └ Status", "Healthy"},
...
{" agent-02", "x.x.x.x:2375"},
{" └ Status", "Healthy"},
...
}

Essentially the entire cluster-related information with the right formatting, with the understanding that the Engine API will print the list as is.

@calavera
Copy link
Contributor

This has been fixed in #46

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

5 participants