Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"[KTCLOUDVPC:Subnet] Error with residual resources #1178

Closed
powerkimhub opened this issue Apr 24, 2024 · 1 comment · Fixed by #1277
Closed

"[KTCLOUDVPC:Subnet] Error with residual resources #1178

powerkimhub opened this issue Apr 24, 2024 · 1 comment · Fixed by #1277
Assignees
Labels
bug Something isn't working CloudDriver

Comments

@powerkimhub
Copy link
Member

[subnet이 생성되어 dangling 되는 경우가 있습니다.]

  • 예를 들면,
  • VPCHandler:AddSubnet()에서
  • (1) subnet을 생성하는 다음 코드 블록은 성공을 하여 CSP에 subnet이 생성이 되어 있습니다.
  • (2) AddSubnet() 함수 마지막 부분인 다음 코드 블록에서 VPC 정보를 얻기 위해서 다시 CSP를 API를 호출합니다.
  • (3) 에러가 발생하면, 서버에서는 AddSubnet() 함수가 에러를 반환함으로
    • subnet이 생성 실패 한 걸로 판단하고 메타DB에 추가하지 못하고 종료합니다.
  • (4) 결과적으로 CSP에 생성된 subnet이 관리되지 못하는 상태가 됩니다.

  • 가능하시면,
    • CSP를 두번 호출하기 보다는 (1)에서 CSP가 subnet 생성을 성공한 후 정상 반환한 정보를 활용하여 마무리 하는 부분 확인 부탁 드립니다.
  • 이 방법이 정보가 부족하여 불가능하다면,
    • (2)에서 에러가 발생했을 때는 드라이버에서는 CSP에 subnet 생성이 성공한 상태임을 알고 있으므로
    • 몇차례 GetVPC()를 재시도한 후 생성한 subnet을 삭제 처리하는 로직을 고려 부탁 드립니다.
  • VPC 정보 획득 부분이 불안하니 이와 같이 하나의 API 내부에서 생성 호출 -> 확인 호출 형태의 생성 API 부분 전반적인 검토 부탁드립니다.
@innodreamer
Copy link
Member

@powerkimhub
CreateVPC(), AddSubnet()을 실행한 다음 GetVPC()를 다시 call 하는 이유는
KT Cloud VPC (D platform) API에서 Tier를 생성하는 API를 call했을때 response 값으로 Tier의 상세정보를 return 하지 않고 Tier의 ID 값과 success 유무를 return 해서 VPC, Subnet 상세 정보를 return 하기 위해 GetVPC()를 call 합니다.

그리고, 위의 #1277 PR을 통해 기존 코드 보다는 KT Cloud API call 횟수를 줄였습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CloudDriver
Projects
None yet
2 participants