cloudfoundry / bosh-alicloud-cpi-release

BOSH Alibaba CPI
Apache License 2.0
32 stars 20 forks source link

Request was denied due to conflict with a previous request.' in 'create_vm' CPI #75

Closed OlegGerber closed 5 years ago

OlegGerber commented 5 years ago

Hi Support, CPI Release Version: v22 VM deployments fail with the following error: "Request was denied due to conflict with a previous request.' in 'create_vm' CPI " The full error is:

Task 1781 | 11:47:10 | Compiling packages: kibana-fields-refresher/21cebfd336d240f28afec0ec2c946342880644e2 (00:01:12) L Error: CPI error 'Bosh::Clouds::CloudError' with message 'input={"method": "create_vm","arguments": ["d75dd7ef-6fba-4ddc-9234-8eac4549ebe1","m-uf62i73koztojdt3w6zh",{"availability_zone": "cn-shanghai-e","ephemeral_disk": {"encrypted": true,"size": 20480},"instance_type": "ecs.c5.xlarge"},{"compilation_network": {"type": "manual","ip": "10.0.3.41","netmask": "255.255.255.0","cloud_properties": {"security_group_ids": ["sg-uf6donwmm5y6ijlafcj9","sg-uf65kinw04qdwefhabfx","sg-uf6d232pzwmoxdiekvoa"],"vswitch_id": "vsw-uf6odhf9rhknmld5iadw8"},"default": ["dns","gateway"],"dns": ["100.100.2.136","100.100.2.138"],"gateway": "10.0.3.1"}},[],{"bosh": {"blobstores": [{"options": {"endpoint": "https://10.0.3.11:25250","password": \n"}},"group": "bosh-cf-cn40-canary-application-logging-compilation-a3029dcb-dbc3-4810-b991-61a35c6d82e9","groups": ["bosh-cf-cn40-canary","application-logging","compilation-a3029dcb-dbc3-4810-b991-61a35c6d82e9","bosh-cf-cn40-canary-application-logging","application-logging-compilation-a3029dcb-dbc3-4810-b991-61a35c6d82e9","bosh-cf-cn40-canary-application-logging-compilation-a3029dcb-dbc3-4810-b991-61a35c6d82e9"]}}],"context": {"director_uuid": "966dffcd-b901-409d-813f-85a5caf8b392","request_id": "cpi-748883","vm": {"stemcell": {"api_version": 2}}},"api_version": 1} update i-uf649nxq9qky3536fntx failed vm deleted: input={"method": "create_vm","arguments": ["d75dd7ef-6fba-4ddc-9234-8eac4549ebe1","m-uf62i73koztojdt3w6zh",{"availability_zone": "cn-shanghai-e","ephemeral_disk": {"encrypted": true,"size": 20480},"instance_type": "ecs.c5.xlarge"},{"compilation_network": {"type": "manual","ip": "10.0.3.41","netmask": "255.255.255.0","cloud_properties": {"security_group_ids": ["sg-uf6donwmm5y6ijlafcj9","sg-uf65kinw04qdwefhabfx","sg-uf6d232pzwmoxdiekvoa"],"vswitch_id": "vsw-uf6odhf9rhknmld5iadw8"},"default": ["dns","gateway"],"dns": ["100.100.2.136","100.100.2.138"],"gateway": "10.0.3.1"}},[],{"bosh": {"blobstores": [{"options": xxxx\n"}},"group": "bosh-cf-cn40-canary-application-logging-compilation-a3029dcb-dbc3-4810-b991-61a35c6d82e9","groups": ["bosh-cf-cn40-canary","application-logging","compilation-a3029dcb-dbc3-4810-b991-61a35c6d82e9","bosh-cf-cn40-canary-application-logging","application-logging-compilation-a3029dcb-dbc3-4810-b991-61a35c6d82e9","bosh-cf-cn40-canary-application-logging-compilation-a3029dcb-dbc3-4810-b991-61a35c6d82e9"]}}],"context": {"director_uuid": "966dffcd-b901-409d-813f-85a5caf8b392","request_id": "cpi-748883","vm": {"stemcell": {"api_version": 2}}},"api_version": 1} Instance i-uf649nxq9qky3536fntx JoinSecurityGroup sg-uf65kinw04qdwefhabfx failed.: JoinSecurityGroup i-uf649nxq9qky3536fntx to sg-uf65kinw04qdwefhabfx failed, args: &ecs.JoinSecurityGroupRequest{RpcRequest:(*requests.RpcRequest)(0xc00032e1c0), ResourceOwnerId:"", InstanceId:"i-uf649nxq9qky3536fntx", ResourceOwnerAccount:"", OwnerAccount:"", SecurityGroupId:"sg-uf65kinw04qdwefhabfx", OwnerId:""}.: SDK.ServerError ErrorCode: OperationConflict Recommend: RequestId: CE97D8EF-F3B9-4927-9BCC-7E7F30B39548 Message: Request was denied due to conflict with a previous request.' in 'create_vm' CPI method (CPI request ID: 'cpi-748883')

xiaozhu36 commented 5 years ago

HI @OlegGerber This error came from the API internal error and can you retry it? From internal feedback, it can be fixed by retry. Also, I will add retry strategy in the bosh cpi.

OlegGerber commented 5 years ago

hi @xiaozhu36, You are right this issue is sporadic and may be resolved by retry. However, it has happened very frequently. Can you please update in which CPI version the fix will be provided?

xiaozhu36 commented 5 years ago

HI @OlegGerber Ok, the next version will add retry strategy for this error.

xiaozhu36 commented 5 years ago

HI @OlegGerber The release v23.0.0 has fixed this issue and please check it.