【问题标题】:cannot delete resource using either web console or shell无法使用 Web 控制台或 shell 删除资源
【发布时间】:2023-01-31 02:54:43
【问题描述】:

我们正在尝试从“现收现付”帐户中删除服务。然而,我们不能。

我们从 GUI 收到一条错误消息,说再试一次。我们只是从 ibmcloud shell 收到一条消息,表明服务器行为异常(包括使用 forcerecursive 选项时)。

如何删除这个服务?

cloudshell:~$ ibmcloud resource service-instance-delete -f --recursive error-deleting-service
Deleting service instance error-deleting-service in resource group default under account IBMER's Account as me@eworld.net...
FAILED
Delete "https://wasaas-broker.eu-de.websphereappsvr.cloud.ibm.com/wasaas-broker/broker/v2/service_instances/giant-long-string-with-bunch-of-%3A-that-may-be-uniquely-identifying-dunno&accepts_incomplete=true": Delete "https://wasaas-broker.eu-de.websphereappsvr.cloud.ibm.com/wasaas-broker/broker/v2/service_instances/giant-long-string-with-bunch-of-%3A-that-may-be-uniquely-identifying-dunno&accepts_incomplete=true": dial tcp: lookup wasaas-broker.eu-de.websphereappsvr.cloud.ibm.com on 10.10.10.10:53: server misbehaving

cloudshell:~$ ibmcloud resource service-instance error-deleting-service
Retrieving service instance error-deleting-service in resource group default under account IBMER's Account as me@eworld.net...
OK
                       
Name:                  error-deleting-service
ID:                    giant-long-string-with-bunch-of-:-that-may-be-uniquely-identifying
GUID:                  other-portion-of-giant-long-string-that-may-be-uniquely-identifying
Location:              eu-de
Service Name:          websphereappsvr
Service Plan Name:     waslibertycoreplan
Resource Group Name:   default
State:                 active
Type:                  service_instance
Sub Type:              
Locked:                false
Created at:            2020-01-29T03:52:10Z
Created by:            bananajr@bloomcounty.org
Updated at:            2022-12-23T06:27:41Z
Last Operation:                  
                       Status    delete failed
                       Message   Delete "https://wasaas-broker.eu-de.websphereappsvr.cloud.ibm.com/wasaas-broker/broker/v2/service_instances/giant-long-string-with-bunch-of-%3A-that-may-be-uniquely-identifying-dunno&accepts_incomplete=true": Delete "https://wasaas-broker.eu-de.websphereappsvr.cloud.ibm.com/wasaas-broker/broker/v2/service_instances/giant-long-string-with-bunch-of-%3A-that-may-be-uniquely-identifying-dunno&accepts_incomplete=true": dial tcp: lookup wasaas-broker.eu-de.websphereappsvr.cloud.ibm.com on 10.10.10.10:53: server misbehaving                   

【问题讨论】:

  • 这是什么类型的服务?它是来自 IBM Cloud 目录的常规服务吗?如果错误仍然存​​在,最好的选择是联系支持人员。

标签: ibm-cloud


【解决方案1】:

错误消息似乎暗示 DNS 故障(赠品是dial tcp: lookup)。鉴于您使用的是 IBM Cloud Shell 托管 CLI,这是不寻常的,正如@data_henrik 所建议的那样 - 对于此类奇怪行为,联系支持应该是第一个首选。

最好与支持人员联系,但似乎这项服务“IBM Cloud 中的 IBM WebSphere Application Server”已被撤销并由 IBM WebSphere Application Server for Virtual Servers 取代。因此,API 端点将不再存在。

为了将来的目的,这是我建议的顺序:

  • 确保您从 IBM Cloud CLI 定位到正确的 IBM Cloud 区域,例如 ibmcloud target -r eu-de -g Default。并非所有服务都可从全局级别访问
  • 检查 IBM Cloud CLI 是否有删除此资源的特定命令,例如对于 VPC 基础设施服务,删除 VPC 子网的特定命令将是 ibmcloud is subnet-delete
  • 检查使用的 DNS 解析器是否能够到达端点,例如 dig @1.1.1.1 +noall +answer +multiline A subdomain.domain.com。不适用于您的情况,因为您使用的是 IBM Cloud Shell 托管的 CLI
  • 寻找可能阻止删除服务的连接资源,在服务实例级别给出的错误消息可能不准确,请参见下文。
  • 暴力删除资源实例,请参见以下示例。

在 IBM Cloud 帐户中查找连接的资源,循环导出所有资源组中的所有资源

ibmcloud login --apikey=

rg_list=$(ibmcloud resource groups --output json | jq -r .[].name)

for i in $rg_list; do echo "$i" && 
ibmcloud resource service-instances --type all 
-g "$i" --output json 
| jq --arg rg_name "$i" 
--raw-output 
'["Resource Name","Resource CRN","Resource Type","Region","State","Type","Created At","Updated At","Last Operation Type","Last Operation Status","Last Operation Description","Resource Group ID","Resource Group Name"]
,
(.[] | [.name, .crn, .resource_id, .region_id, .state, .type, .created_at, .updated_at, .last_operation.type, .last_operation.state, .last_operation.description, .resource_group_id, $rg_name])
| @csv' > "resources_rg_$i.csv" 
; done

echo 'Created CSV for each IBM Cloud Resource Group, merging into single CSV also'
cat *.csv | uniq > resources_all.csv
echo 'Complete'

暴力删除资源示例

ibmcloud is instance-delete --force $INSTANCE_ID
ibmcloud is volume-delete --force $VOL_SHORT_ID
ibmcloud dns instance-delete $DNS_SHORT_ID
ibmcloud is vpc-delete $VPC_NAME
ibmcloud resource service-instance-delete --force $CRN_HERE
ibmcloud resource service-instance-delete --force --recursive $CRN_HERE
ibmcloud resource group-delete -f $RG_NAME

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多