Describe the bug
When apply changes, CPI cannot find attachment id, I guess it's because Policy API is declarative, async call, which actually needs the caller to wait, see there are latest commit that changed the max wait time to 300, but actually I think we need to wait for the segment port realization right after the creation call, and make the wait timeout much longer. Or we can consult with some Policy API expert for a better solution.
Retry could make the case pass, but it's easy to reproduce.
To Reproduce
Steps to reproduce the behavior:
Create two instances in one AZ and disk .....
Sections of cloud config relevant to bug reproducibility
CPI Error Log
Can be obtained by running bosh <env params> task <failed-task-id> --cpi
Task 31 | 06:26:31 | Compiling packages: pks-nsx-t-curl/6bddcc90025505da7810d01040d8b9b01932ab35 (00:06:55)
L Error: Unknown CPI error 'Unknown' with message 'Segment port with attachment id: c186ec25-f580-49f1-bfee-bd7b49de90d8 not found' in 'set_vm_metadata' CPI method (CPI request ID: 'cpi-777113')
Task 31 | 06:26:39 | Compiling packages: pks-nsx-t-scripts/40fc194621b470e096284741f8bd80e005cd856e (00:07:03)
L Error: Unknown CPI error 'Unknown' with message 'Segment port with attachment id: 7c6591e4-5dbc-4c33-b725-16d556c601f7 not found' in 'set_vm_metadata' CPI method (CPI request ID: 'cpi-100837')
Task 31 | 06:26:43 | Compiling packages: pks-nsx-t-govc/7ecd5d2e99384bff262c681a78256c8d76923df3 (00:07:07)
L Error: Unknown CPI error 'Unknown' with message 'Segment port with attachment id: 45208491-39b0-4801-85a5-9a93e816f7f0 not found' in 'set_vm_metadata' CPI method (CPI request ID: 'cpi-954440')
Task 31 | 06:26:44 | Compiling packages: pks-nsx-t-jq/6fe9c981d95d718336b92bafc09b187ebdb2a85a (00:07:08)
L Error: Unknown CPI error 'Unknown' with message 'Segment port with attachment id: 64eae140-bb99-491f-92bb-5d92d6d72c5c not found' in 'set_vm_metadata' CPI method (CPI request ID: 'cpi-345031')
Task 31 | 06:26:44 | Error: Unknown CPI error 'Unknown' with message 'Segment port with attachment id: c186ec25-f580-49f1-bfee-bd7b49de90d8 not found' in 'set_vm_metadata' CPI method (CPI request ID: 'cpi-777113')
Expected behavior
Maybe should wait for segment port is realized to continue to execute
Wait for realization timeout should be longer
Screenshots
If applicable, add screenshots to help explain your problem.
Release Version & Related Info (please complete the following information):
CPI Version
BOSH Director Version
Stemcell Name & Version
vCenter Version
NSX(T/V) Version (If using)
Additional context
Add any other context about the problem here.
Describe the bug When apply changes, CPI cannot find attachment id, I guess it's because Policy API is declarative, async call, which actually needs the caller to wait, see there are latest commit that changed the max wait time to 300, but actually I think we need to wait for the segment port realization right after the creation call, and make the wait timeout much longer. Or we can consult with some Policy API expert for a better solution.
Retry could make the case pass, but it's easy to reproduce.
To Reproduce Steps to reproduce the behavior:
CPI Error Log Can be obtained by running
bosh <env params> task <failed-task-id> --cpi
Expected behavior
Screenshots If applicable, add screenshots to help explain your problem.
Release Version & Related Info (please complete the following information):
Additional context Add any other context about the problem here.