Skip to content

Commit

Permalink
Check attachstate if attachedOn field is non empty before failing
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Theunis <[email protected]>
  • Loading branch information
Paul Theunis committed Jul 1, 2021
1 parent f61139b commit 7ec0444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/3ncryptor/3ncryptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func newEncryptCommand() *cobra.Command {
}

for _, vol := range volumes {
if vol.AttachedOn != "" {
if vol.AttachedOn != "" && vol.AttachedState != api.AttachState_ATTACH_STATE_INTERNAL {
logrus.Errorf("volume %v is attached, please make sure your apps are scaled down.", vol.Locator.Name)
return
}
Expand Down

0 comments on commit 7ec0444

Please sign in to comment.