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:Zone] Disk cannot be attached to a VM in Zone 2 and MyImage ... #1153

Closed
powerkimhub opened this issue Apr 11, 2024 · 6 comments
Closed
Assignees
Labels
bug Something isn't working CloudDriver

Comments

@powerkimhub
Copy link
Member

  • 다음 Zone 개념 추가 PR을 반영한 버전의 시험 결과가 아래와 같습니다.

  • 아래 시험 결과 중 Fail 부분(disk attach, vm creation with MyImage) 확인 부탁 드립니다.


  • Region 등록: northeurope, Zone 2

    • 참고: 최신 Spider 서버에서 locationRegion으로 변경 => Region Key로 등록
    • image
  • Connection 등록

    • 위 등록한 Region 정보를 이용한 Connection 등록
    • 이하 자원 제어 시험에 활용

  • VPC/Subnet, SG, Key 등 생성: OK

  • VM 생성: OK (Zone 2에 잘 생성됨)
    • image


  • Disk 생성: OK (azure console에서 zone 정보 확인 못함)
  • 생성한 Disk를 vm1에 Attach: Fail
    • image

    • 현재 다음과 같은 Zone mismatch 오류 발생

[오후 8:15:25] PUT> http://localhost:1024/spider/disk/spider-disk-01/attach -H 'Content-Type: application/json' -d '{ "ConnectionName": "azure-region-zone-01", "ReqInfo": { "VMName" : "vm-01" } }'
[오후 8:15:31]    ==> {"message":"Failed to AttachDisk. err = compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code=\"BadRequest\" Message=\"Disk /subscriptions/a20fed83-96bd-4480-92a9-140b8e3b7c3a/resourceGroups/NORTHEUROPE/providers/Microsoft.Compute/disks/spider-disk-01-cobs9tjp70ijpqlmm430 cannot be attached to the VM because it is not in zone '2'.\""}  


  • NLB 생성: OK
    • vm2 추가 생성 후 NLB 생성
    • image
  • NLB 호출/Forwarding: OK
    nc -v 52.169.217.148 22
    Connection to 52.169.217.148 22 port [tcp/ssh] succeeded!
    


  • MyImage 생성(Snapshot): OK
    • 참고: Azure의 경우 Snaphot 시 대상 VM은 generalized 됨(사용 불가, suspended: 정상)

  • MyImage를 이용한 VM 생성: Fail
    • 이 오류는 현재 상태에서는 Spider 서버 오류인지, Driver 오류인지 파악 하기가 쉽지 않네요.
    • Driver 수준에서 시험 선행 부탁 드립니다.
@powerkimhub powerkimhub added bug Something isn't working CloudDriver labels Apr 11, 2024
@powerkimhub
Copy link
Member Author

cc: @ish-hcc @seokho-son

  • 추가 시험
    • AZ가 존재하지 않는 Region(location) koreasouth 대상으로 Zone 설정 효과 시험
  • Region 설정
    • Zone 구분이 없지만,
    • 다음처럼 Zone 1로 설정(설정은 하지만, 무의미 할 것으로 판단)
    • ※ 현재는 Zone Key가 없으면 Region 등록시 Spider 서버에서 validation 에러 처리됨
    • image

  • VM 생성: azure console에서도 Zone 정보를 제공하지 않음을 확인
    • image

  • 이 경우 Zone 구분이 없기 때문에 예상대로 disk attach도 성공함

  • Zone을 2로 설정 후 동일한 시험
    • image
  • 결과는 Zone 1과 동일

[고찰]

  • Zone을 제공하지 않는 location(koreasouth 등)의 경우
  • 현재 사용자의 Zone 설정과 무관하게(Zone 지원 여부 확인하지 않고) Region 수준에서 자원이 잘 제어됨

[계획]

  • 조만간, Zone-Level Control이 마무리 되면, VM과 Disk 정보에 Zone 정보를 제공할 것이며,
  • 사용자는 이 정보를 확인하여 VM이나 Disk가 Region에 binding된 건지(자원 정보에 Zone 정보가 없을 경우) Zone에 binding 된 것인지 판단 가능하므로,
  • 현재는, 특별히 이슈가 되지 않는 한 현 상태로 유지

@ish-hcc
Copy link
Contributor

ish-hcc commented Apr 16, 2024

@powerkimhub
상세한 리뷰 감사합니다. MyImage 부분은 테스트 해보니 다른 CSP 에서도 동일한 문제가 발생하는거 같습니다.

이 부분에서 DiskType 은 default 인데 diskSize 정보가 없어서 발생하는 문제로 보입니다.
https://github.com/cloud-barista/cb-spider/blob/master/api-runtime/common-runtime/VMManager.go#L630

테스트 진행 사항

  • Azure에서 MyImage로 VM 생성시 reqInfo
    &{{vm-02 } MyImage {spider-myimage-01 spider-myimage-01} {vpc-01 } {subnet-01 } [{sg-01 }] Standard_B1ls {keypair-01 } default [] Administrator cloudbarista123^ false}

  • Azure에서 PublicImage로 VM 생성시 reqInfo
    &{{vm-01 } PublicImage {Canonical:UbuntuServer:18.04-LTS:latest Canonical:UbuntuServer:18.04-LTS:latest} {vpc-01 } {subnet-01 } [{sg-01 }] Standard_B1ls {keypair-01 } default [] Administrator cloudbarista123^ false}

  • IBM에서 MyImage로 VM 생성시 reqInfo
    &{{vm-03 } MyImage {spider-myimage-01 spider-myimage-01} {vpc-01 } {subnet-01 } [{sg-01 }] bx2-2x8 {keypair-01 } default [] Administrator cloudbarista123^ false}

@ish-hcc
Copy link
Contributor

ish-hcc commented Apr 16, 2024

Disk Zone 관련 수정 완료
#1164

@powerkimhub
Copy link
Member Author

@powerkimhub 상세한 리뷰 감사합니다. MyImage 부분은 테스트 해보니 다른 CSP 에서도 동일한 문제가 발생하는거 같습니다.


  • 관련 시험 및 현황 공유 캄사 드립니다.
  • 이 에러는 그 사이 다른 사유로 AdminWeb 파트 수정 사항이 있었는데,
  • 의도치 않게 MyImage 기반 VM 생성에 영향을 주었네요.
  • 이 이슈는 서버 파트에서 patch하도록 하겠습니다.

@ish-hcc
Copy link
Contributor

ish-hcc commented Apr 17, 2024

@powerkimhub 넵 알겠습니다 감사합니다!

@powerkimhub
Copy link
Member Author

  • Disk Attach Error fixed via #1164
  • VM Creation Error with MyImage fixed via 975bb16

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
Development

No branches or pull requests

2 participants