@@ -299,11 +299,11 @@ func (os *OpenStack) getVolume(volumeID string) (Volume, error) {
299299}
300300
301301// CreateVolume creates a volume of given size (in GiB)
302- func (os * OpenStack ) CreateVolume (name string , size int , vtype , availability string , tags * map [string ]string ) (string , string , error ) {
302+ func (os * OpenStack ) CreateVolume (name string , size int , vtype , availability string , tags * map [string ]string ) (string , string , bool , error ) {
303303 volumes , err := os .volumeService ("" )
304304 if err != nil || volumes == nil {
305305 glog .Errorf ("Unable to initialize cinder client for region: %s" , os .region )
306- return "" , "" , err
306+ return "" , "" , os . bsOpts . IgnoreVolumeAZ , err
307307 }
308308
309309 opts := VolumeCreateOpts {
@@ -320,11 +320,11 @@ func (os *OpenStack) CreateVolume(name string, size int, vtype, availability str
320320
321321 if err != nil {
322322 glog .Errorf ("Failed to create a %d GB volume: %v" , size , err )
323- return "" , "" , err
323+ return "" , "" , os . bsOpts . IgnoreVolumeAZ , err
324324 }
325325
326- glog .Infof ("Created volume %v in Availability Zone: %v" , volumeID , volumeAZ )
327- return volumeID , volumeAZ , nil
326+ glog .Infof ("Created volume %v in Availability Zone: %v Ignore volume AZ: %v " , volumeID , volumeAZ , os . bsOpts . IgnoreVolumeAZ )
327+ return volumeID , volumeAZ , os . bsOpts . IgnoreVolumeAZ , nil
328328}
329329
330330// GetDevicePath returns the path of an attached block storage volume, specified by its id.
0 commit comments