正如 azure 支持页面中所述,我正在 Stack Overflow 上写文章以找到解决我的问题的方法,但对我来说,这看起来有点离题......
当我尝试通过 linux 终端删除组资源时,我得到:
Delete resource group Default-Storage-WestEurope? [y/n] y
+ Deleting resource group Default-Storage-WestEurope
error: Long running operation failed with error: 'Invalid status code with response body "{"Error":{"Code":"ResourceGroupDeletionBlocked","Target":null,"Message":"Deletion of resource group 'Default-Storage-WestEurope' failed as resources with identifiers 'Microsoft.ClassicStorage/storageAccounts/bitnamiwesteuropecfuropu' could not be deleted. The provisioning state of the resource group will be rolled back. The tracking Id is 'f791a8f0-a28a-4fe3-b491-c6251b51d987'. Please check audit logs for more details.","Details":[{"Code":null,"Target":"/subscriptions/5fdcf34e-ecda-408e-b3ba-e706ac34dba6/resourceGroups/Default-Storage-WestEurope/providers/Microsoft.ClassicStorage/storageAccounts/bitnamiwesteuropecfuropu","Message":"{\"error\":{\"code\":\"StorageAccountOperationFailed\",\"message\":\"Unable to delete storage account 'bitnamiwesteuropecfuropu': 'Storage account bitnamiwesteuropecfuropu has some active image(s) and/or disk(s), e.g. bitnami-bitnami-redis-3.2.1-0-westeurope-CfuROpU. Ensure these image(s) and/or disk(s) are removed before deleting this storage account.'.\"}}","Details":null}]}}" occurred when polling for operation status.'.
info: Error information has been recorded to /home/giumbai/.azure/azure.err
error: group delete command failed
编辑:所以我取得了一些进展,但还不够。所以我有一个带有租约的图像的 blob,为了烘焙租约,我使用了这个命令:azure storage blob lease break -a bitnamiwesteuropecfuropu -k <my key>
然后我被提示插入容器名称和 blob 名称。
但是没有用,我收到了这个错误,我不太明白:
{ ArgumentNullError: Required argument blob for function _leaseImpl is not defined
<<< async stack >>>
at throwMissingArgument (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:417:9)
at ArgumentValidator._.extend.exists (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:447:7)
at ArgumentValidator._.extend.string (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:426:10)
at /usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:4661:9
at Object.validateArgs (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:495:3)
at Object.BlobService._leaseImpl (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:4660:14)
at Object.BlobService.breakLease (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:1253:8)
at Function.Object.defineProperty.value (/usr/lib/node_modules/azure-cli/node_modules/streamline/lib/callbacks/builtins.js:367:19)
at __1 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:423:41)
at StorageUtil_performStorageOperation__1 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:421:5)
at StorageUtil_breakLease__10 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:1609:31)
at breakLease (/usr/lib/node_modules/azure-cli/lib/commands/storage/storage.blob.js:817:17)
at breakBlobLease (/usr/lib/node_modules/azure-cli/lib/commands/storage/storage.blob.js:802:5)
<<< raw stack >>>
at throwMissingArgument (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:417:9)
at ArgumentValidator._.extend.exists (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:447:7)
at ArgumentValidator._.extend.string (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:426:10)
at /usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:4661:9
at Object.validateArgs (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:495:3)
at Object.BlobService._leaseImpl (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:4660:14)
at Object.BlobService.breakLease (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:1253:8)
at Function.Object.defineProperty.value (/usr/lib/node_modules/azure-cli/node_modules/streamline/lib/callbacks/builtins.js:367:19)
at __$__1 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:423:41)
at __func (/usr/lib/node_modules/azure-cli/node_modules/streamline/lib/callbacks/runtime.js:47:5)
stack: [Getter/Setter],
name: 'ArgumentNullError',
argumentName: 'blob',
message: 'Required argument blob for function _leaseImpl is not defined',
__frame:
{ name: 'StorageUtil_performStorageOperation__1',
line: 402,
file: '/usr/lib/node_modules/azure-cli/lib/util/storage.util.js',
prev:
{ name: 'StorageUtil_breakLease__10',
line: 1598,
file: '/usr/lib/node_modules/azure-cli/lib/util/storage.util.js',
prev: [Object],
calls: 3,
active: false,
offset: 11,
col: 30 },
calls: 1,
active: false,
offset: 19,
col: 4 },
rawStack: [Getter] }
ArgumentNullError: Required argument blob for function _leaseImpl is not defined
<<< async stack >>>
at throwMissingArgument (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:417:9)
at ArgumentValidator._.extend.exists (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:447:7)
at ArgumentValidator._.extend.string (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:426:10)
at /usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:4661:9
at Object.validateArgs (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:495:3)
at Object.BlobService._leaseImpl (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:4660:14)
at Object.BlobService.breakLease (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:1253:8)
at Function.Object.defineProperty.value (/usr/lib/node_modules/azure-cli/node_modules/streamline/lib/callbacks/builtins.js:367:19)
at __1 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:423:41)
at StorageUtil_performStorageOperation__1 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:421:5)
at StorageUtil_breakLease__10 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:1609:31)
at breakLease (/usr/lib/node_modules/azure-cli/lib/commands/storage/storage.blob.js:817:17)
at breakBlobLease (/usr/lib/node_modules/azure-cli/lib/commands/storage/storage.blob.js:802:5)
<<< raw stack >>>
at throwMissingArgument (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:417:9)
at ArgumentValidator._.extend.exists (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:447:7)
at ArgumentValidator._.extend.string (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:426:10)
at /usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:4661:9
at Object.validateArgs (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/common/util/validate.js:495:3)
at Object.BlobService._leaseImpl (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:4660:14)
at Object.BlobService.breakLease (/usr/lib/node_modules/azure-cli/node_modules/azure-storage/lib/services/blob/blobservice.js:1253:8)
at Function.Object.defineProperty.value (/usr/lib/node_modules/azure-cli/node_modules/streamline/lib/callbacks/builtins.js:367:19)
at __$__1 (/usr/lib/node_modules/azure-cli/lib/util/storage.util.js:423:41)
at __func (/usr/lib/node_modules/azure-cli/node_modules/streamline/lib/callbacks/runtime.js:47:5)
Edit2:有趣的是,我设法删除了剩余的图像,我不得不停止图像和容器上的租约,因此图像和容器现在都被删除了,但是当我尝试删除空存储时,我得到:
Failed to delete storage account 'bitnamiwesteuropecfuropu'. Unable to delete storage account 'bitnamiwesteuropecfuropu': 'Storage account bitnamiwesteuropecfuropu has some active image(s) and/or disk(s), e.g. bitnami-bitnami-redis-3.2.1-0-westeurope-CfuROpU. Ensure these image(s) and/or disk(s) are removed before deleting this storage account.'.
证明:)
Successfully deleted blob 'bitnami-images/bitnami-bitnami-redis-3.2.1-0-westeurope-CfuROpU'.