0

正如 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'.
4

1 回答 1

0

你不应该威胁要永远离开服务,这不会更快地得到你的答案。如果您阅读错误消息,很清楚它正在发生什么。您正在尝试删除具有连接到计算机的磁盘的存储帐户。您无法使用正在运行的计算机上的磁盘删除存储帐户。转到门户并检查存储帐户,您会发现存储帐户中有一个文件。如果您单击此 vcs 文件,您将看到此文件的状态它被锁定并且租约具有无限期。检查您的帐户,您将找到一台在此存储帐户上有磁盘文件的机器。删除虚拟机和删除存储帐户后,将在删除存储帐户时释放租约。

于 2016-07-11T16:45:09.913 回答