Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect use of AttachStatus #1222

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/api/util/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ func DeleteVolumeGroupDBEntry(ctx *c.Context, volumeGroupId string) error {

var volumesUpdate []*model.VolumeSpec
for _, value := range volumes {
if value.AttachStatus == model.VolumeAttached {
if value.Status == model.VolumeInUse {
msg := fmt.Sprintf("volume %s in group %s is attached. Need to deach first.", value.Id, vg.Id)
log.Error(msg)
return errors.New(msg)
Expand Down
2 changes: 0 additions & 2 deletions pkg/model/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ type VolumeSpec struct {

// The uuid of the replication which the volume belongs to.
ReplicationDriverData map[string]string `json:"replicationDriverData,omitempty"`
// Attach status of the volume.
AttachStatus string

// Whether the volume can be attached more than once, default value is false.
MultiAttach bool `json:"multiAttach,omitempty"`
Expand Down