Skip to content

Commit

Permalink
Merge pull request #543 from rgooch/master
Browse files Browse the repository at this point in the history
Fix panic in vm-control change-vm-tags when VM has no existing tags.
  • Loading branch information
rgooch committed Dec 23, 2018
2 parents 8c17042 + 5c0f3b8 commit 54608bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/vm-control/changeVmTags.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ func changeVmTagsOnHypervisor(hypervisor string, ipAddr net.IP,
if err := errors.New(reply.Error); err != nil {
return err
}
if len(reply.VmInfo.Tags) < 1 {
return setVmTagsOnHypervisor(client, ipAddr, vmTags, logger)
}
reply.VmInfo.Tags.Merge(vmTags)
for key, value := range reply.VmInfo.Tags {
if value == "" {
Expand Down

0 comments on commit 54608bd

Please sign in to comment.