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:VM] Incorrect Zone-based control for VM #1297

Closed
powerkimhub opened this issue Aug 23, 2024 · 3 comments
Closed

[Azure:VM] Incorrect Zone-based control for VM #1297

powerkimhub opened this issue Aug 23, 2024 · 3 comments
Assignees
Labels
bug Something isn't working CloudDriver

Comments

@powerkimhub
Copy link
Member


[증상]

  • Connection : northeurope / 1 zone
  • Subnet 생성을 Target Zone(2 zone) 설정으로 생성: Pass
    • Subnet Zone 정보가 제대로 2를 보이고 있음
    • image

  • VM 생성을 2 Zone에 생성한 subnet 설정으로 생성: Issue(점검 필요)
    • VM Zone 정보가 1 zone으로 잘못 생성 되었음
    • image

  • 이후 Disk를 2 Zone에 생성 후 Mount 하기 위해서 동일 Zone 2의 VM 목록을 확인하면 안올라오고 있음.
    • image
@powerkimhub powerkimhub added bug Something isn't working CloudDriver labels Aug 23, 2024
@ish-hcc
Copy link
Contributor

ish-hcc commented Aug 27, 2024

  • 확인해 보니 Azure에서는 VPC와 Subnet에 Zone 정보를 가지고 있지 않습니다. spider에서 보여지는 Subnet의 Zone 정보는 Azure Driver에서 제공되는 것이 아닌 spider에서 Subnet 생성 당시에 입력된 Zone 정보 값이 DB에 저장되면서 DB에 저장된 Zone 정보를 불러오는 것으로 보입니다.
    https://github.com/cloud-barista/cb-spider/blob/master/api-runtime/common-runtime/VPC-SubnetManager.go#L712

  • 그리고 Handler 초기화 과정에서 Connection에 지정된 Zone이 사용됩니다.

  • VM 생성시에도 Subnet에는 Zone 정보를 보유하고 있지 않기 때문에 발생하는 문제로 보이며, 처음부터 Region/Zone 을 koreacentral, 2 로 지정하고서 테스트 하였을때 같은 Zone에서의 Disk생성 및 VM 조회는 정상적으로 되는 것으로 보여집니다.
    image

@powerkimhub
Copy link
Member Author

@ish-hcc

  • 수고가 많으십니다.
  • Spider의 Zone-based Control 기능은 이러한 CSP들의 개별 속성을 추상화 하여 동일하게 제공하는 것 또한 미션입니다.
    • Azure Subnet이 Region 범위로 운영이 되더라도, Spider를 통한 제어는 다른 CSP와 동일하게 Zone 범위로 운영 등
  • 다음 내용 참고해주세요.

[개요/가이드]

  • Zone-Control 대상 자원: Subnet, VM, Disk, MyImage

  • Subnet, Disk 생성시: 사용자가 현재 Connection zone과 다른 Zone에 생성을 원하는 경우 입력 인자로 TargetZone 명시적으로 설정,

    • 사용자의 TargetZone 설정이 없으면 기존처럼 DefaultZone에 생성
    • TargetZone, DefaultZone 정의: 아래 개요/개념 자료 참고
  • VM 생성시: Target Zone 설정 대신 기존 Subnet 입력 인자 설정을 사용(기존 방식과 동일함)

    • 즉, Subnet은 특정 Zone에 붙기 때문에 Zone 설정과 동일 효과가 있으며
    • Driver 개발시 내부에서 Zone 정보 필요시 subnet 정보에서 획득
  • Subnet, Disk Get/Delete 시: 사용자 입력에 TargetZone 정보를 설정하는 인자가 없음.

    • 사용자는 NameId만 입력함.
    • 이에 대한 처리를 위해서 서버에서 ConnectionInfo.RegionInfo에 TargetZone을 설정해서 내려 보냄,
    • Driver는 이 정보를 이용하여 처리.
    • 처리 예시 참고 (@MZC-CSC GCP:GetDisk 점검 필요해 보입니다. )
      func (DiskHandler *GCPDiskHandler) DeleteDisk(diskIID irs.IID) (bool, error) {
      hiscallInfo := GetCallLogScheme(DiskHandler.Region, call.DISK, diskIID.NameId, "DeleteDisk()")
      start := call.Start()
      projectID := DiskHandler.Credential.ProjectID
      region := DiskHandler.Region.Region
      zone := DiskHandler.Region.Zone
      targetZone := DiskHandler.Region.TargetZone
      disk := diskIID.SystemId
      // 대상 zone이 다른경우 targetZone을 사용
      if targetZone != "" {
      zone = targetZone
      }
  • VM Get/Delete 시: 기본적으로 VM 정보에는 Zone 정보가 매달려 있음

    • 이 정보 이용해서 자체 처리
    • VM에 Zone 정보가 없을 경우 협의
  • Subnet, VM, Disk List 시: 현재 Region의 모든 Zone에 포함된 자원을 수집 및 반환 필요

  • AdminWeb2: Disk attach 대상으로 보이는 VM은 Disk와 동일한 Zone에 존재하는 VM 목록만 보여주도록 되어 있습니다.

    • 이때, VM 목록이 안보인다면, 해당 Zone에 VM이 없거나 Zone-based control에 오류가 있을 수 있습니다.

[개발 현황]

  • Subnet, VM, Disk: 1차 드아리버 개발 추진 후 통합 시험 미진한 상태
    • 금번 통합 시험이 연장선으로 재개된 작업입니다.
  • MyImage: 추후 별도 드라이버 개발 추진

[참고]

  • Zone-based Control, Default Zone, Target Zone 개요/개념
    • image

@powerkimhub
Copy link
Member Author

@ish-hcc



  • [TargetZone 2에 VM 생성/Zone 정보 제공] 성공

    • image
  • [TargetZone 2에 Disk 생성 및 Zone 2 소속 VM에 Mount] 성공

    • image
    • image

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