cb-spider icon indicating copy to clipboard operation
cb-spider copied to clipboard

Error during create VM in a specific Alibaba region

Open seokho-son opened this issue 3 years ago • 16 comments

What happened : Alibaba cn-wulanchabu 리전에 VM 생성시, 오류 발생

What you expected to happen : 리전에 무관하게 VM 정상 생성

How to reproduce it (as minimally and precisely as possible) : Alibaba cn-wulanchabu 리전에 VM 생성

Anything else we need to know? Error log (The specified parameter SystemDisk.Category is not valid)

[CB-SPIDER].[INFO]: 2021-05-30 16:17:03 VMHandler.go:103, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.(*AlibabaVMHandler).StartVM() - Create EC2 Instance 
[CB-SPIDER].[INFO]: 2021-05-30 16:17:03 VMHandler.go:104, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.(*AlibabaVMHandler).StartVM() - &{0xc000d42190                    PayByBandwidth   ubuntu_18_04_x64_20G_alibase_20210420.vhd       ecs.g6e.large  <nil>      0xc0005bab28         alibaba-cn-wulanchabu-shson17   <nil>      vsw-0jlc6gffi1miucwjj469a alibaba-cn-wulanchabu-shson17-lead-0  <nil>  5       PostPaid <nil>        <nil>     } 
[CB-SPIDER].[ERROR]: 2021-05-30 16:17:04 VMHandler.go:109, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.(*AlibabaVMHandler).StartVM() - SDK.ServerError
ErrorCode: InvalidSystemDiskCategory.ValueNotSupported
Recommend: https://error-center.aliyun.com/status/search?Keyword=InvalidSystemDiskCategory.ValueNotSupported&source=PopGw
RequestId: B77A8416-FB5F-45C7-A793-308206FCC22C
Message: The specified parameter SystemDisk.Category is not valid. 
[CB-SPIDER].[ERROR]: 2021-05-30 16:17:04 CCMCommon.go:1230, github.com/cloud-barista/cb-spider/api-runtime/common-runtime.StartVM() - SDK.ServerError
ErrorCode: InvalidSystemDiskCategory.ValueNotSupported
Recommend: https://error-center.aliyun.com/status/search?Keyword=InvalidSystemDiskCategory.ValueNotSupported&source=PopGw
RequestId: B77A8416-FB5F-45C7-A793-308206FCC22C
Message: The specified parameter SystemDisk.Category is not valid. 

Environment

  • Source version or branch: v0.3.8
  • OS: Ubuntu
  • Others:

Proposed solution : SystemDiskCategory 값 지정 테스트 등을 통해, 가능한 모든 리전에서 일관되게 VM을 생성할 수 있도록 수정, 또는 해당 리전은 사용하지 않는 것으로 지침

Any other context Alibaba VM 생성 요청시 아래와 같은 요청 사항을 보내는 것으로 파악됨

[CB-SPIDER].[INFO]: 2021-05-30 16:17:03 VMHandler.go:69, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.(*AlibabaVMHandler).StartVM() - [sg-0jlcxdq9lpyhouf751m9] 
(*ecs.RunInstancesRequest)(0xc000530500)({
 RpcRequest: (*requests.RpcRequest)(0xc000d42190)({
  baseRequest: (*requests.baseRequest)(0xc000162fc0)({
   Scheme: (string) (len=5) "https",
   Method: (string) (len=4) "POST",
   Domain: (string) "",
   Port: (string) "",
   RegionId: (string) "",
   ReadTimeout: (time.Duration) 0s,
   ConnectTimeout: (time.Duration) 0s,
   isInsecure: (*bool)(<nil>),
   userAgent: (map[string]string) <nil>,
   product: (string) (len=3) "Ecs",
   version: (string) (len=10) "2014-05-26",
   actionName: (string) (len=12) "RunInstances",
   AcceptFormat: (string) (len=4) "JSON",
   QueryParams: (map[string]string) {
   },
   Headers: (map[string]string) (len=5) {
    (string) (len=12) "x-sdk-client": (string) (len=12) "golang/1.0.0",
    (string) (len=17) "x-sdk-invoke-type": (string) (len=6) "normal",
    (string) (len=15) "Accept-Encoding": (string) (len=8) "identity",
    (string) (len=13) "x-acs-version": (string) (len=10) "2014-05-26",
    (string) (len=12) "x-acs-action": (string) (len=12) "RunInstances"
   },
   FormParams: (map[string]string) {
   },
   Content: ([]uint8) <nil>,
   locationServiceCode: (string) (len=3) "ecs",
   locationEndpointType: (string) (len=7) "openAPI",
   queries: (string) "",
   stringToSign: (string) ""
  })
 }),
 UniqueSuffix: (requests.Boolean) "",
 SecurityEnhancementStrategy: (string) "",
 MinAmount: (requests.Integer) "",
 DeletionProtection: (requests.Boolean) "",
 ResourceGroupId: (string) "",
 PrivatePoolOptionsMatchCriteria: (string) "",
 HostName: (string) "",
 Password: (string) "",
 DeploymentSetGroupNo: (requests.Integer) "",
 SystemDiskAutoSnapshotPolicyId: (string) "",
 CpuOptionsCore: (requests.Integer) "",
 Period: (requests.Integer) "",
 DryRun: (requests.Boolean) "",
 CpuOptionsNuma: (string) "",
 OwnerId: (requests.Integer) "",
 SpotStrategy: (string) "",
 PrivateIpAddress: (string) "",
 PeriodUnit: (string) "",
 AutoRenew: (requests.Boolean) "",
 InternetChargeType: (string) (len=14) "PayByBandwidth",
 InternetMaxBandwidthIn: (requests.Integer) "",
 Affinity: (string) "",
 ImageId: (string) (len=41) "ubuntu_18_04_x64_20G_alibase_20210420.vhd",
 SpotInterruptionBehavior: (string) "",
 NetworkInterfaceQueueNumber: (requests.Integer) "",
 IoOptimized: (string) "",
 SecurityGroupId: (string) "",
 SystemDiskPerformanceLevel: (string) "",
 PasswordInherit: (requests.Boolean) "",
 InstanceType: (string) (len=13) "ecs.g6e.large",
 HibernationConfigured: (requests.Boolean) "",
 Arn: (*[]ecs.RunInstancesArn)(<nil>),
 SchedulerOptions: (string) "",
 ResourceOwnerAccount: (string) "",
 SchedulerOptionsDedicatedHostClusterId: (string) "",
 SystemDiskDiskName: (string) "",
 DedicatedHostId: (string) "",
 SecurityGroupIds: (*[]string)(0xc0005bab28)((len=1 cap=1) {
  (string) (len=23) "sg-0jlcxdq9lpyhouf751m9"
 }),
 SpotDuration: (requests.Integer) "",
 SystemDiskSize: (string) "",
 ImageFamily: (string) "",
 LaunchTemplateName: (string) "",
 ResourceOwnerId: (requests.Integer) "",
 HpcClusterId: (string) "",
 HttpPutResponseHopLimit: (requests.Integer) "",
 Isp: (string) "",
 KeyPairName: (string) (len=29) "alibaba-cn-wulanchabu-shson17",
 SpotPriceLimit: (requests.Float) "",
 StorageSetPartitionNumber: (requests.Integer) "",
 Tag: (*[]ecs.RunInstancesTag)(<nil>),
 PrivatePoolOptionsId: (string) "",
 AutoRenewPeriod: (requests.Integer) "",
 LaunchTemplateId: (string) "",
 Ipv6AddressCount: (requests.Integer) "",
 CapacityReservationPreference: (string) "",
 VSwitchId: (string) (len=25) "vsw-0jlc6gffi1miucwjj469a",
 InstanceName: (string) (len=36) "alibaba-cn-wulanchabu-shson17-lead-0",
 ZoneId: (string) "",
 Ipv6Address: (*[]string)(<nil>),
 ClientToken: (string) "",
 InternetMaxBandwidthOut: (requests.Integer) (len=1) "5",
 Description: (string) "",
 CpuOptionsThreadsPerCore: (requests.Integer) "",
 SystemDiskCategory: (string) "",
 CapacityReservationId: (string) "",
 UserData: (string) "",
 HttpEndpoint: (string) "",
 InstanceChargeType: (string) (len=8) "PostPaid",
 NetworkInterface: (*[]ecs.RunInstancesNetworkInterface)(<nil>),
 DeploymentSetId: (string) "",
 Amount: (requests.Integer) "",
 OwnerAccount: (string) "",
 Tenancy: (string) "",
 RamRoleName: (string) "",
 AutoReleaseTime: (string) "",
 CreditSpecification: (string) "",
 DataDisk: (*[]ecs.RunInstancesDataDisk)(<nil>),
 LaunchTemplateVersion: (requests.Integer) "",
 SchedulerOptionsManagedPrivateSpaceId: (string) "",
 StorageSetId: (string) "",
 HttpTokens: (string) "",
 SystemDiskDescription: (string) ""
})

이중 에러 메시지와 관련된 항목은

SystemDiskCategory: (string) ""

단, 다른 리전에서는 발생하지 않는 문제로 보임.

seokho-son avatar May 30 '21 08:05 seokho-son

@dev4unet (@seokho-son )

  • 리전 현황 파악 부탁 드립니다.

powerkimhub avatar May 30 '21 09:05 powerkimhub

제가 잘 못 알고 있는게 중국 특성상 중국리전의 경우 기본 상태에서는 사용이 불가하고 알리바바에 별도의 사용 신청 승인이 떨어져야 해당 리전을 사용할 수 있는 것으로 알고 있습니다. 그래서 중국 리전에서는 테스트하고 있지 않으며 현재 VM 생성시 시스템 디스크 등 별도로 지정하는 값이 없으며 기본 값으로만 생성하고 있습니다. 혹시 중국 리전에 vm생성 신청이 진행된 상황인가요?

dev4unet avatar May 30 '21 11:05 dev4unet

@dev4unet (@seokho-son )

  • 시연 특성상 많은 리전이 필요해서요...
  • 자원별로 승인이 필요한지요?
    • VPC나 다른 자원은 생성되는 데, VM 생성만 안될 수도 있나요?

@innodreamer

  • 저희 aliaba 계정 관련 아시는 내용이 있으신지요?

powerkimhub avatar May 30 '21 11:05 powerkimhub

음.. 일단 다른 대부분의 중국 리전에는 자원 및 vm까지 잘 생성되고 있습니다. (계정에서 따로 옵트인을 했는지는 저도 정확하게 기억이 나지는 않네요) 리포트한 리전에만 해당 에러가 발생하고 있습니다.

seokho-son avatar May 30 '21 12:05 seokho-son

참고로.. spec, image 을 잘못 입력했나 싶어서

해당 테스트와 동일한 spec, image 등을 사용하여, Alibaba 웹콘솔에서 테스트하였을 때는 정상적으로 VM이 생성되는 것을 확인했습니다.

seokho-son avatar May 31 '21 02:05 seokho-son

일단, Alibaba console에서 수동으로 생성할때 cn-wulanchabu 리전은 보이지 않는데, @seokho-son 님이 어디서 테스트해봤는지 확인해보겠습니다. d_cb9Ud018svcae75qajzbulr_tup4f1

innodreamer avatar May 31 '21 05:05 innodreamer

@dev4unet

  • 아래 링크 참고하면, Ulanqab이네요.
  • https://partners-intl.aliyun.com/help/doc-detail/69006.htm

powerkimhub avatar May 31 '21 05:05 powerkimhub

@powerkimhub 초기에는 중국 리전에서 생성할 때 증빙 서류 같은 것을 요청했던 것같은데... 최근에 생성한 계정으로 위의 리전에서 생성할 때 이슈없이 생성되는 것을 봐서는 서류가 필요 없는 것 같기도 합니다. 아니면 특정 리전에만 제한일 수 있으니 웹 콘솔에서 정상적으로 생성될 경우 문제는 없으리라 봅니다.

그리고 현재 오류의 경우 이전 이슈에서 적었듯이 별도의 시스템 디스크 설정을 하지 않고 기본값을 사용합니다. The category of the system disk. Valid values: cloud_efficiency: ultra disk cloud_ssd: standard SSD cloud_essd: enhanced SSD (ESSD) cloud: basic disk

For non-I/O optimized instances of the retired instance types, the default value is cloud. For other instances, the default value is cloud_efficiency.

어떤 인스턴스 타입을 이용하셨을지 모르겠으나 문제는 다른 이슈에 나온 스펙처럼 ecs.g6e.large 인스턴스의 경우 ESSD만 사용 가능한것처럼 특정 인스턴스에 따라서 사용 가능한 스토리지가 제한되는 경우가 있어서 그런것 같습니다. 20210531-1426-aliyun-systemdisk

현재는 Spider에서 시스템이나 데이터 디스크 타입을 별도로 전달 받지 않기때문에 우선은 ecs.g6.large처럼 기본 타입이 지원되는 인스턴스에서 작업하시면 될 것같습니다.

dev4unet avatar May 31 '21 05:05 dev4unet

@seokho-son

  • 이슈와 관련된 사항인지 확인 한번 해보시고
  • 결과 공유 부탁 드립니다.

powerkimhub avatar May 31 '21 05:05 powerkimhub

@powerkimhub @seokho-son 위 내용에 추가했듯이 기본 타입이 지원되는 ecs.g6.large 인스턴스로 생성할 경우 시스템 오류는 통과하는 것 같네요. 아래 정보로 정상 생성되는 것을 확인했습니다. ImageIID: irs.IID{SystemId: "ubuntu_18_04_x64_20G_alibase_20210420.vhd"}, VMSpecName: "ecs.g6.large", //cn-wulanchabu 리전

참고하세요.^^ 20210531-1426-aliyun-ecs

dev4unet avatar May 31 '21 05:05 dev4unet

@dev4unet 감사합니다. 우선 ecs.g6.large 로만 활용하고 있겠습니다.. ^^

seokho-son avatar May 31 '21 06:05 seokho-son

@dev4unet (@innodreamer )

  • 확인 감사드립니다.
  • TB에서 실패한 Spec(ecs.g6e.large)을 이용하여, Driver 단에서 해결할 수 있는지 확인 부탁드립니다.
    • 이런 spec이 또 나올 경우 Spider 사용하는 입장에서 선별하기가 쉽지 않을 것 같기 때문입니다.
    • 혹시라도, Spec 인식하여 disk default로 맞게 설정해주는 API가 있는 지.. 등
    • 그런 API가 없다면, 다른 방법이 있는지 등을 확인 부탁드립니다.
  • 살펴 보시고, 가능 여부, 난이도 등을 먼저 공유해주시면 감사하겠습니다.
  • 행사 이후에 진행하셔도 되겠습니다. (@seokho-son )

powerkimhub avatar May 31 '21 06:05 powerkimhub

@powerkimhub 현재는 API 설명에 나와있듯이 default 값으로 자동으로 처리되도록 값을 비워 놨습니다만(인스턴스 특성에 따라서 cloud와 cloud_efficiency 중 자동 선택되는 것 같습니다.) 현재 이슈는 default로 처리되지 않는 경우입니다.

원래는 UI처럼 생성하려는 VM 목적에 따라서 VM 성능과 요금이 관련되기 때문에 각자 희망하는 형태가 있을 거라서 명확하게 사용자로부터 희망하는 값을 지정받아야 하는 부분이라 생성 요청 파라메터가 추가되는 것이 맞을 것 같습니다만... 제가 못 찾은 것인지 몰라도 API와 리턴 값들을 훑어 봤을 때 Spec에 따른 default 값이 나오는 기능은 없었습니다. 다만, 시스템 디스크는 Zone에 종속이며 해당 Zone에서 사용 가능한 시스템 디스크 목록을 조회하는 API는 있습니다.

만약, 요금과 성능을 떠나서 에러만 피하도록 한다면 시스템 디스크는 Zone에 종속이기 때문에 생성하려는 Zone에서 사용 가능한 시스템 스토리지 목록을 조회해서 처리하는 방법이 있을 것 같습니다. 얼마나 복잡하게 처리해줄지에 따라서 결정될 듯싶습니다.

[안1]

  • 시스템 스토리지 조회 후 첫 번째 스토리지로 강제 설정하는 방법

[안2]

  • 시스템 스토리지 조회 후 시스템 디스크 유형에 우선 순위를 부여해서 할당하는 방법 아마도, 사용가능한 시스템 스토리지 유형은 아래의 4가지로 추정되며 아래 시스템 디스크 유형중 사용할 우선순위를 정해서 해당 값이 존재하는 순서대로 강제 셋팅하는 방법이 있을 듯싶습니다. cloud_efficiency: ultra disk cloud_ssd: standard SSD cloud_essd: enhanced SSD (ESSD) cloud: basic disk

    (예) cloud가 존재하면 cloud / cloud_efficiency가 존재하면 cloud_efficiency / cloud_ssd가 존재하면 cloud_ssd 처럼... 다만, cloud를 1순위로 할 경우 cloud가 가장 느린 디스크일 것 같기는 한데 어떻게 동작될지는 모르겠네요.

    [안2]로 할경우 맵핑 순서를 알려주시면 반영하도록 하겠습니다.

[안3]

  • [안2] 방법에서 우선순위를 Spec별로 맵핑하는 방법 [안3]의 경우 어떤 기준으로 어떻게 맵핑할지에 대한 고려가 필요할 것 같습니다.

dev4unet avatar Jun 01 '21 08:06 dev4unet

@dev4unet @innodreamer (@seokho-son )

  • 현재 이슈는 행사 이후에 다루는 게 좋겠습니다.
    • 다음 이슈와 더불어, 특정 Region에서 실행 가능한 VM Spec 목록 제공 API 추가 등 한꺼번에 다뤄야 겠습니다.
      • 아래 시험 결과 참고
      • https://github.com/cloud-barista/cb-spider/issues/347

<이슈 요약>

  • I/O optimized Instance type family 존재
  • I/O 성능 보장위해 SSD 기반 특정 타입의 고속 storage 사용만 가능
    • ex) g6e
      Storage:
      Is an instance family in which all instances are I/O optimized.
      Supports only ESSDs.
      Provides high storage I/O performance based on large computing capacity
      
  • 특정 Region에서는 ESSD를 제공하지 않음
    • 이 Region에서는 ESSD를 사용하는 InstanceType을 제공하지 않는 것과 같을 수 있음
    • 특정 InstanceType은 1~2개 storage 타입을 제공
      • 이 경우는 Region 에서 지원하는 storage 타입으로 잘 선택해야 할수도 있음

<참고 문서>

  • cf) RunInstance API: https://www.alibabacloud.com/help/doc-detail/63440.htm
  • cf) InstanceType families(I/O optimized.): https://partners-intl.aliyun.com/help/doc-detail/25378.htm?spm=a2c63.p38356.b99.42.1a976bbdieEKi9

관련 시험

  • Tokyo Region

    • Region: ap-northeast-1,
    • Zone:ap-northeast-1a
  • IMAGE_NAME=ubuntu_18_04_x64_20G_alibase_20210420.vhd

  • SPEC_NAME=ecs.g6e.large

Test-1

  • AS-IS: 설정 없이 실행, 즉 default, 즉 "cloud_efficiency"
  • 결과 오류 메시지
    message: rpc error: code = Internal desc =  error while calling CCMService.StartVM() method: SDK.ServerError
    ErrorCode: InvalidSystemDiskCategory.ValueNotSupported
    Recommend: https://error-center.aliyun.com/status/search?Keyword=InvalidSystemDiskCategory.ValueNotSupported&source=PopGw
    RequestId: 7A60E380-7989-40DE-8221-72CA461398BB
    Message: The specified parameter SystemDisk.Category is not valid.
    

Test-2

  • request.SystemDiskCategory = " cloud_essd"
  • 결과 오류 메시지
    ErrorCode: OperationDenied.NoStock
    Recommend: https://error-center.aliyun.com/status/search?Keyword=OperationDenied.NoStock&source=PopGw
    RequestId: 31D8CA2E-233B-4ED3-86A6-DA0AFB279A48
    Message: The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones.
    

Test-3 (default가 맞는지 확인 시험)

  • request.SystemDiskCategory = "cloud_efficiency"
    ErrorCode: InvalidSystemDiskCategory.ValueNotSupported
    Recommend: https://error-center.aliyun.com/status/search?Keyword=InvalidSystemDiskCategory.ValueNotSupported&source=PopGw
    RequestId: 98F60F3F-0DD7-4B99-9609-4EC72C885265
    Message: The specified parameter SystemDisk.Category is not valid.
    

Test-4

  • request.SystemDiskCategory = "cloud_ssd"
    ErrorCode: InvalidSystemDiskCategory.ValueNotSupported
    Recommend: https://error-center.aliyun.com/status/search?Keyword=InvalidSystemDiskCategory.ValueNotSupported&source=PopGw
    RequestId: 0DBB1C21-39DE-4477-9192-75B246F2E64B
    Message: The specified parameter SystemDisk.Category is not valid.
    

Test-5

  • request.SystemDiskCategory = "cloud"
    message: rpc error: code = Internal desc =  error while calling CCMService.StartVM() method: SDK.ServerError
    ErrorCode: InvalidSystemDiskCategory.ValueNotSupported
    Recommend: https://error-center.aliyun.com/status/search?Keyword=InvalidSystemDiskCategory.ValueNotSupported&source=PopGw
    RequestId: CFB5B348-1ABD-45AC-B263-79E500545AA3
    Message: The specified parameter 'SystemDisk.Category' is not support IoOptimized Instance. Valid Values: cloud_efficiency;cloud_ssd.
    

powerkimhub avatar Jun 01 '21 13:06 powerkimhub

@powerkimhub 네, 알겠습니다. 참고로, 현재 시스템 디스크는 Zone 종속이며 Spec과 Image의 경우 아래처럼 구현되어 있으니 참고하시기 바랍니다.

[Spec조회] Tencent - 세션의 Zone 종속 AWS - 세션의 Zone 종속 (리턴 값의 Region 정보만 입력 받은 Region으로 셋팅) GCP - 세션의 Zone 종속 Alibaba - 요청 받은 Region 파라메터 종속

[Image조회] Alibaba - 세션의 리전 종속(필터 조건으로 InstanceType으로 제한 가능 / 출력에 InstanceType / IsSupportIoOptimized 항목 있음) https://www.alibabacloud.com/help/doc-detail/25534.htm

AWS - 전체 이미지 조회 (필터 옵션에 리전이 없음) https://docs.aws.amazon.com/ko_kr/AWSEC2/latest/APIReference/API_DescribeImages.html https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeImagesInput

GCP - 전체 이미지 조회 https://cloud.google.com/compute/docs/reference/rest/v1/images/list

Tencent - 세션의 리전 종속(필터 조건으로 InstanceType으로 제한 가능) https://intl.cloud.tencent.com/document/product/213/33272

dev4unet avatar Jun 02 '21 01:06 dev4unet

@dev4unet

  • 현황 공유 감사드립니다.
  • 추후 타CSP랑 통합하여 정리하도록하겠습니다.

powerkimhub avatar Jun 02 '21 04:06 powerkimhub