Merge pull request #2777 from ddysher/node-ip

Query hostIP for Nodes
This commit is contained in:
bgrant0607 2014-12-08 11:05:27 -08:00
commit 9ee00ba240

View File

@ -143,6 +143,12 @@ func (s *MinionController) cloudMinions() (*api.MinionList, error) {
}
for i := range matches {
result.Items[i].Name = matches[i]
hostIP, err := instances.IPAddress(matches[i])
if err != nil {
glog.Errorf("error getting instance ip address for %s: %v", matches[i], err)
} else {
result.Items[i].Status.HostIP = hostIP.String()
}
resources, err := instances.GetNodeResources(matches[i])
if err != nil {
return nil, err