mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update daemon to new swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
cdf279d74d
commit
25a89d73e5
2 changed files with 5 additions and 5 deletions
|
@ -998,13 +998,13 @@ func (c *Cluster) managerStats() (current bool, reachable int, unreachable int,
|
|||
}
|
||||
for _, n := range nodes.Nodes {
|
||||
if n.ManagerStatus != nil {
|
||||
if n.ManagerStatus.Raft.Status.Reachability == swarmapi.RaftMemberStatus_REACHABLE {
|
||||
if n.ManagerStatus.Reachability == swarmapi.RaftMemberStatus_REACHABLE {
|
||||
reachable++
|
||||
if n.ID == c.node.NodeID() {
|
||||
current = true
|
||||
}
|
||||
}
|
||||
if n.ManagerStatus.Raft.Status.Reachability == swarmapi.RaftMemberStatus_UNREACHABLE {
|
||||
if n.ManagerStatus.Reachability == swarmapi.RaftMemberStatus_UNREACHABLE {
|
||||
unreachable++
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,9 +56,9 @@ func NodeFromGRPC(n swarmapi.Node) types.Node {
|
|||
//Manager
|
||||
if n.ManagerStatus != nil {
|
||||
node.ManagerStatus = &types.ManagerStatus{
|
||||
Leader: n.ManagerStatus.Raft.Status.Leader,
|
||||
Reachability: types.Reachability(strings.ToLower(n.ManagerStatus.Raft.Status.Reachability.String())),
|
||||
Addr: n.ManagerStatus.Raft.Addr,
|
||||
Leader: n.ManagerStatus.Leader,
|
||||
Reachability: types.Reachability(strings.ToLower(n.ManagerStatus.Reachability.String())),
|
||||
Addr: n.ManagerStatus.Addr,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue