这就跟你问声好!
棱镜中心有个奇怪的项目。
当我尝试更新项目槽GUI时,我得到这个错误消息:
编辑冲突:请重试更改。
通知{"api_version": "3.1", "code": " 409, "kind": "project_internal", "message_list": [{"message": "Edit conflict: please retry change.", "reason": "CONCURRENT_REQUESTS_NOT_ALLOWED"}], "state": "ERROR"}
所以我用SSH连接到PC CVM,并试图删除项目槽核,
< nucleus > Project .delete Project \Name confirm=true
确认删除项目?(yes / no)是的
{“消息”:
{“类型”:“项目”,
“代码”:409年,
“message_list”:
[{"message": "Edit conflict: please retry change.", "reason": "CONCURRENT_REQUESTS_NOT_ALLOWED"}],
"state": "ERROR", "api_version": "3.1"}}
只有特定的项目才有这个问题,其他的项目都很好。我搜索了KBs,但没有找到任何内容。ncc health_checks run_all没有显示任何可疑的内容。
我也开了一个关于这个错误的案例!
最佳答案jonas.hogman
So i just got this solved by support.\u00a0
There was a category for this project witch was stale.\u00a0
So support used a script called remove_stale_entries.py.\u00a0<\/p>
CAUTION!
Use this only after verifying with support that it\u2019s safe. But for CE users, it might help :)<\/p>
import env
import argparse
from insights_interface.insights_interface_pb2 import *
from insights_interface.insights_interface import *
interface = InsightsInterface('127.0.0.1', 2027)
parser = argparse.ArgumentParser()
parser.add_argument(\"--uuid\", nargs=\"*\", required=True, help=\"Enter stale entity's UUID as a list separated by space\", default=[])
parser.add_argument(\"--entity_type\", required=True, help=\"Enter the type of entity. Example : task,vm etc. \")
parser.add_argument(\"--cas\", help=\"Use this flag for deleting CAS entities, else deletion will fail\", action=\"store_true\", required=False)
if len(sys.argv)==1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
entity_list = args.uuid
entity_type = args.entity_type
cas = args.cas
g = GetEntitiesArg()
for entity_id in entity_list:
e = EntityGuid()
e.entity_type_name = entity_type
e.entity_id = entity_id
g.entity_guid_list.extend([e])
res = interface.GetEntities(g)
if len(res.entity) == 0:
print \"No entities found matching the input UUID(s).\"
for entity in res.entity:
d = DeleteEntityArg()
d.entity_guid.CopyFrom(entity.entity_guid)
if(cas):
d.cas_value = entity.cas_value + 1
print 'deleting entity %s with CAS %s' \\
% (str(entity.entity_guid.entity_id), entity.cas_value)
else:
print 'deleting entity %s' % (str(entity.entity_guid.entity_id))
interface.DeleteEntity(d)
<\/code><\/pre>put the script i \/home\/nutanix\/bin<\/p>
chmod 777 on the script.\u00a0<\/p>
Then used nuclei project.list to get the UUID from the undeletable project.\u00a0<\/p>
Then ran the python script:
python remove_stale_entries.py --uuid 857fbbf0-3ecc-5d9e-b4b4-f9b4b54d8192 --entity_type=abac_category --cas
tada, the project is gone :)<\/p>","className":"post__content__best_answer"}">