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

[Azure:Image] Can't fetch image list #1260

Closed
powerkimhub opened this issue Jul 29, 2024 · 8 comments · Fixed by #1264 or #1266
Closed

[Azure:Image] Can't fetch image list #1260

powerkimhub opened this issue Jul 29, 2024 · 8 comments · Fixed by #1264 or #1266
Assignees
Labels
bug Something isn't working CloudDriver hotfix

Comments

@powerkimhub
Copy link
Member

[증상]

  • ImageHandler.ListImage() 30분 이상 응답 없음(no message)

[분석]

  • Azure 호출 에러 반환시, 해당 부분 에러를 출력해보면, 다음 오류 메시지가 반복 출력 되고 있습니다.
    Original Error: autorest/azure: Service returned an error. Status=429 Code="SubscriptionRequestsThrottled" Message="Number of 'read' requests for subscription actor 'a20fed83-96bd-4480-92a9-140b8e3b7c3a:a13efed9-6e7a-4f45-b440-aad4c3e9e1d0' exceeded. Please try again after '1' seconds after additional tokens are available. Refer to https://aka.ms/arm-throttling for additional information." 
    

[issue-1]

  • QPS(Query Per Sec) limit 초과 발생 대응 필요합니다.
  • QPS 초과 발생 상황 사전 방지가 필요합니다.(동시 호출 약화 등)
  • 또한, QPS 초과 에러 발생시 대응 코드 추가가 필요합니다. (대기 후 몇 차례 재시도 등)
  • 기존에는 처리가 되던 로직일텐데, 안되는 걸 보면,
  • 최근 제약 사항 조건이 변경 된건 아닌지 등 확인도 필요한 거 같습니다.

[issue-2]

[issue-3]

  • 에러가 발생했는데, 사용자가 에러를 보고 받지 못하고 있습니다.
  • Go routine 내부에서 오류가 발생한 경우에도 에러 반환 고려 부탁 드립니다.
  • 참고: Go routine 내 에러 처리 예시

if len(errList) > 0 {
cblog.Error(strings.Join(errList, "\n"))
return nil, errors.New(strings.Join(errList, "\n"))
}

@powerkimhub
Copy link
Member Author

@powerkimhub powerkimhub linked a pull request Aug 2, 2024 that will close this issue
@powerkimhub powerkimhub reopened this Aug 2, 2024
@powerkimhub
Copy link
Member Author

@ish-hcc

  • Azure: Improve of getting image list #1266 버전으로 listimage 호출 시험 시험해보니,
  • 1시간 40분 정도 지난 후 에러 응답을 제공하고 있습니다.
    • 시험 호출 명령/소요 시간
      time curl -sX GET http://localhost:1024/spider/vmimage -H 'Content-Type: application/json' -d '{"ConnectionName": "azure-northeu-config"}' |json_pp > 4.json
      
      real    100m12.009s
      user    0m2.100s
      sys     0m0.377s
      
  • 에러 응답(위에서 받아낸 4.json 파일 내용 중 일부, 서버도 동일 에러 로그 출력)
    ... 중략 ...
    compute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded\ncompute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded\ncompute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded\ncompute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded\ncompute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded\ncompute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded\ncompute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded\ncompute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded\ncompute.VirtualMachineImagesClient#Get: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded"
    ... 중략 ...
    
  • 동작 하는 동안 서버는 다른 호출에는 잘 응답하였으며,
  • 응답이 종료된 후에 Thread가 139개 정도로 많은 Thread가 잔류 되고 있는 상태입니다.

  • 이런, 상황이 제 계정/환경에서만 발생하는 지 의문이 드네요.
  • 혹시, 대상 PR 버전에 대해서 시험 성공하신 환경 공유 부탁 드립니다.

@powerkimhub
Copy link
Member Author

@ish-hcc

| - 응답이 종료된 후에 Thread가 139개 정도로 많은 Thread가 잔류 되고 있는 상태입니다.

  • 이 부분은 무시하시기 바랍니다.
  • 제가 다른 호출을 해서 원인이 다른데 있을 것 같습니다.

@ish-hcc
Copy link
Member

ish-hcc commented Aug 5, 2024

@powerkimhub
go routine 모두 제거, os 정보 조회를 위한 vm 이미지 중복 조회 개선 후 모든 이미지 리스트 가져오는데 4296.9636초 (1시간 11분) 기록 되었습니다.
돌아가는 동안 QPS 걸리지 않고, 에러 메세지도 안나오네요

cb-spider 상에서는 55693 개 입니다 Azure CLI는 조회중 입니다...

@ish-hcc
Copy link
Member

ish-hcc commented Aug 5, 2024

@powerkimhub
Azure CLI 랑 비교해 보니 이미지 갯수 동일하게 나오네요
PR 올려두겠습니다

$ az vm image list --all --location koreacentral --output table > 1.txt
$ cat 1.txt | tail -n+3 | wc -l
55693

@powerkimhub
Copy link
Member Author

@ish-hcc

  • 5만개 급이면, old 이미지도 다 포함된 경우인거지요?

  • 1시간 11분, 시간 압박이 좀 있네요.

  • 한가지 추가 시험 부탁드립니다.

    • Go routine 없이 최신 이미지 제공 시간
    • az CLI를 이용하여 동일 옵션(filter)으로 실행 가능하다면 이미지 개수 검증
  • PR #1268 Merge 반영은 결과 확인 후에 결정해야 할 것 같습니다.

@ish-hcc
Copy link
Member

ish-hcc commented Aug 11, 2024

Related with #1275

@powerkimhub
Copy link
Member Author

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 hotfix
Projects
None yet
3 participants