mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
cli: Use meta response index to start monitoring volume create. (#25514)
This commit is contained in:
@@ -52,7 +52,7 @@ func (c *VolumeCreateCommand) hostVolumeCreate(
|
||||
Volume: vol,
|
||||
PolicyOverride: override,
|
||||
}
|
||||
resp, _, err := client.HostVolumes().Create(req, nil)
|
||||
resp, meta, err := client.HostVolumes().Create(req, nil)
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error creating volume: %s", err))
|
||||
return 1
|
||||
@@ -75,7 +75,7 @@ func (c *VolumeCreateCommand) hostVolumeCreate(
|
||||
c.Ui.Output(fmt.Sprintf(
|
||||
"==> Created host volume %s with ID %s", vol.Name, vol.ID))
|
||||
volID = vol.ID
|
||||
lastIndex = vol.ModifyIndex
|
||||
lastIndex = meta.LastIndex
|
||||
}
|
||||
|
||||
if vol.Namespace != "" {
|
||||
|
||||
Reference in New Issue
Block a user