oomichi / try-kubernetes

12 stars 5 forks source link

Add the detail error message to Cinder volume creation failure #46

Closed oomichi closed 4 years ago

oomichi commented 6 years ago

https://github.com/oomichi/try-kubernetes/issues/39 の派生

oomichi commented 6 years ago

./pkg/volume/cinder/volumeservice/actions.go

 25         volumes_v2 "github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes"
..
 67 // CreateCinderVolume creates a new volume in cinder according to the PVC specifications
 68 func CreateCinderVolume(vs *gophercloud.ServiceClient, options volumes_v2.CreateOpts) (string, error) {
 69         vol, err := volumes_v2.Create(vs, &options).Extract()
 70         if err != nil {
 71                 glog.Errorf("Failed to create a %d GiB volume: %v", options.Size, err)
 72                 return "", err
 73         }
 74
 75         glog.V(2).Infof("Created volume %v in Availability Zone: %v", vol.ID, vol.AvailabilityZone)
 76         return vol.ID, nil
 77 }
oomichi commented 6 years ago

gophercloud が詳細エラーメッセージを含んでいないのが原因?

oomichi commented 4 years ago

これはダメだった