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

[All: Logging] Remove Print Statements and Check Log Level #1207

Closed
12 tasks done
powerkimhub opened this issue May 30, 2024 · 6 comments
Closed
12 tasks done

[All: Logging] Remove Print Statements and Check Log Level #1207

powerkimhub opened this issue May 30, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@powerkimhub
Copy link
Member

powerkimhub commented May 30, 2024

  • 사용자가 log level을 'error'로 조정해도 불필요한 개발 메시지를 출력 받고 있습니다.
  • 실제 에러 상황일 경우에만 적합한 에러 메시지를 제공 받을 수 있어야 합니다.
  • 다음 항목들을 점검 및 개선이 필요합니다.

1. 다음 코드 라인 점검 부탁 드립니다.

  • 삭제, 꼭 필요시 logger.info 등으로 교체
    nhncloud/resources/CommonNhnCloudFunc.go:290:           fmt.Println(fmt.Sprint(cmdErr) + ": " + string(cmdOut))
    nhncloud/resources/CommonNhnCloudFunc.go:295:           fmt.Println("cmdOut : ", string(cmdOut))
    ktcloud/resources/VMSpecHandler.go:198:         fmt.Println(str)
    ktcloud/resources/CommonKtCloudFunc.go:132:             fmt.Println(fmt.Sprint(cmdErr) + ": " + string(cmdOut))
    ktcloud/resources/CommonKtCloudFunc.go:137:     fmt.Println("cmdOut : ", string(cmdOut))
    ktcloud/resources/VMHandler.go:1712:                    fmt.Printf("New Public IP : %s, IP State : %s\n", publicIp, ipState)
    tencent/resources/DiskHandler.go:343:           fmt.Println("Disk Size Error!!: ", diskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    tencent/resources/DiskHandler.go:348:           fmt.Println("Disk Size Error!!: ", diskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    tencent/resources/DiskHandler.go:404:           fmt.Println("Disk Size Error!!: ", diskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    tencent/resources/NLBHandler.go:178:            fmt.Printf("%s", listenerResponse.ToJsonString())
    tencent/resources/NLBHandler.go:219:                    fmt.Printf("%s", targetResponse.ToJsonString())
    tencent/resources/NLBHandler.go:241:    fmt.Printf("%s", nlbResponse.ToJsonString())
    tencent/resources/NLBHandler.go:535:    fmt.Printf("%s", targetResponse.ToJsonString())
    tencent/resources/NLBHandler.go:611:    fmt.Printf("%s", targetResponse.ToJsonString())
    tencent/resources/VMHandler.go:314:                     fmt.Println("image : ", imageSize)
    tencent/resources/VMHandler.go:317:                             fmt.Println("Disk Size Error!!: ", rootDiskSize, imageSize)
    tencent/resources/VMHandler.go:321:                     fmt.Println("rootDiskSize : ", rootDiskSize)
    tencent/resources/VMHandler.go:322:                     fmt.Println("rootDiskSize : ", common.Int64Ptr(rootDiskSize))
    gcp/resources/ImageHandler.go:329:      fmt.Println(res)
    gcp/resources/DiskHandler.go:412:               fmt.Println("Disk Size Error!!: ", diskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    gcp/resources/DiskHandler.go:417:               fmt.Println("Disk Size Error!!: ", diskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    gcp/resources/DiskHandler.go:473:               fmt.Println("Disk Size Error!!: ", diskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    gcp/resources/NLBHandler.go:3087:                                               fmt.Printf("Error Code %v", ee.Code)
    gcp/resources/NLBHandler.go:3088:                                               fmt.Printf("Error Message %v", ee.Message)
    gcp/resources/NLBHandler.go:3089:                                               fmt.Printf("Error Details %v", ee.Details)
    gcp/resources/NLBHandler.go:3090:                                               fmt.Printf("Error Body %v", ee.Body)
    gcp/resources/NLBHandler.go:3105:       fmt.Printf("errorDetail", errorDetail)
    gcp/resources/NLBHandler.go:3106:       fmt.Printf("ok", ok)
    gcp/resources/NLBHandler.go:3108:               fmt.Printf("Error Code %v", errorDetail.Code)
    gcp/resources/NLBHandler.go:3109:               fmt.Printf("Error Message %v", errorDetail.Message)
    gcp/resources/KeyPairHandler.go:62:             fmt.Println("publicKeyString : ", publicKeyString)
    gcp/resources/SecurityHandler.go:409:   fmt.Println("getOperationsStatus ", operationName)
    gcp/resources/SecurityHandler.go:503:   fmt.Println("firewallset : ", fireWall)
    gcp/resources/SecurityHandler.go:612:   fmt.Println("securityInfoList = ", securityInfoList)
    gcp/resources/SecurityHandler.go:659:   fmt.Println("securityInfo : ", securityInfo)
    gcp/resources/SecurityHandler.go:754:   fmt.Println("Delete Security ", securityGroupTag)
    gcp/resources/SecurityHandler.go:762:   fmt.Println("Delete Security 삭제 대상 ", len(firewallList))
    gcp/resources/SecurityHandler.go:772:           fmt.Println("Delete Security 삭제 대상item ", len(firewallInfo.Items), " index = ", index)
    gcp/resources/SecurityHandler.go:927:                   fmt.Println("no direction : ", firewallDirection)
    gcp/resources/SecurityHandler.go:948:   fmt.Println("existsAllDenyOutbound ----------------- ", existsAllDenyOutbound)
    gcp/resources/SecurityHandler.go:1193:                                  fmt.Println("firewallRule : ", firewallRule)
    gcp/resources/SecurityHandler.go:1237:                          fmt.Println("cannot get a resourceID : ")
    gcp/resources/SecurityHandler.go:1250:  fmt.Println("existsAllDenyOutbound ----------------- ", existsAllDenyOutbound)
    gcp/resources/SecurityHandler.go:1467:          fmt.Println("itemName : ", itemName, tag, strings.Index(itemName, tag))
    gcp/resources/SecurityHandler.go:1526:  fmt.Println("********* ", securityGroupNameMap)
    gcp/resources/SecurityHandler.go:1588:          fmt.Println("get security list result : ", item)
    gcp/resources/SecurityHandler.go:1607:          fmt.Println("SourceTags : ", item.SourceTags)
    gcp/resources/SecurityHandler.go:1610:          fmt.Println("TargetTags : ", item.TargetTags)
    gcp/resources/SecurityHandler.go:1624:          fmt.Println("cidr : ", cidr)
    gcp/resources/SecurityHandler.go:1633:                  fmt.Println("ipProtocol : ", ipProtocol)
    gcp/resources/SecurityHandler.go:1703:          fmt.Println("securityRules : ", securityRules)
    gcp/resources/SecurityHandler.go:1704:          fmt.Println("securityRules length: ", len(securityRules))
    gcp/resources/SecurityHandler.go:1706:  fmt.Println("securityInfo : ", securityInfo)
    gcp/resources/SecurityHandler.go:1809:                  fmt.Println("aaa : ", reqRulePort, ":"+fromPort+" : "+toPort)
    gcp/resources/SecurityHandler.go:1810:                  fmt.Println("bbb : ", searchedRulePort, ":"+searchedRule.FromPort+" : "+searchedRule.ToPort)
    gcp/resources/SecurityHandler.go:1811:                  fmt.Println("Direction : ", reqRule.Direction, ":"+searchedRule.Direction)
    gcp/resources/SecurityHandler.go:1812:                  fmt.Println("IPProtocol : ", reqRule.IPProtocol, ":"+searchedRule.IPProtocol)
    gcp/resources/SecurityHandler.go:1813:                  fmt.Println("CIDR : ", reqRule.CIDR, ":"+searchedRule.CIDR)
    gcp/resources/SecurityHandler.go:1855:                          fmt.Println("str : ", str)
    gcp/resources/SecurityHandler.go:1856:                          fmt.Println("curSequence : ", curSequence)
    gcp/resources/SecurityHandler.go:1892:  fmt.Println("create default firewall rule result : ", res)
    gcp/resources/SecurityHandler.go:1918:          fmt.Println("firewallDelete ", securityGroupTag, " : ", resourceID)
    gcp/resources/SecurityHandler.go:1943:          fmt.Println("remove result : ", resourceID, res)
    gcp/resources/VMHandler.go:368:                                 fmt.Println("Invalid Disk Type Error!!")
    gcp/resources/VMHandler.go:372:                         fmt.Printf("valid disk size: %#v\n", diskSizeResp.ValidDiskSize)
    gcp/resources/VMHandler.go:392:                                 fmt.Println("Disk Size Error!!: ", iDiskSize)
    gcp/resources/VMHandler.go:398:                                 fmt.Println("Disk Size Error!!: ", iDiskSize)
    gcp/resources/VMHandler.go:407:                         fmt.Println("Disk Size Error!!: ", iDiskSize)
    gcp/resources/VMHandler.go:589: fmt.Println("instance stop status :", inst.Status)
    gcp/resources/VMHandler.go:632: fmt.Println("instance resume status :", inst.Status)
    gcp/resources/VMHandler.go:776: fmt.Println("instance status :", inst.Status)
    gcp/resources/VMHandler.go:1037:        fmt.Println("server: ", server)
    gcp/GCPDriver.go:72:    fmt.Println("################## getVMClient ##################")
    gcp/GCPDriver.go:73:    fmt.Println("getVMClient")
    gcp/GCPDriver.go:74:    fmt.Println("################## getVMClient ##################")
    gcp/GCPDriver.go:80:    fmt.Println("################## getContainerClient ##################")
    gcp/GCPDriver.go:81:    fmt.Println("getContainerClient")
    gcp/GCPDriver.go:82:    fmt.Println("################## getContainerClient ##################")
    gcp/GCPDriver.go:88:    fmt.Println("################## getBillingCatalogClient ##################")
    gcp/GCPDriver.go:89:    fmt.Println("getBillingCatalogClient")
    gcp/GCPDriver.go:90:    fmt.Println("################## getBillingCatalogClient ##################")
    gcp/GCPDriver.go:96:    fmt.Println("################## getCostEstimationClient ##################")
    gcp/GCPDriver.go:97:    fmt.Println("getCostEstimationClient")
    gcp/GCPDriver.go:98:    fmt.Println("################## getCostEstimationClient ##################")
    gcp/GCPDriver.go:143:   fmt.Println("################## data ##################")
    gcp/GCPDriver.go:145:   fmt.Println("################## data ##################")
    gcp/GCPDriver.go:178:   fmt.Println("################## data ##################")
    gcp/GCPDriver.go:180:   fmt.Println("################## data ##################")
    gcp/GCPDriver.go:211:   fmt.Println("################## data ##################")
    gcp/GCPDriver.go:213:   fmt.Println("################## data ##################")
    gcp/GCPDriver.go:224:           fmt.Println("JWTConfig ", conf)
    gcp/GCPDriver.go:232:           fmt.Println("billingCatalogClient err ", err)
    gcp/GCPDriver.go:251:   fmt.Println("################## data ##################")
    gcp/GCPDriver.go:253:   fmt.Println("################## data ##################")
    gcp/GCPDriver.go:264:           fmt.Println("JWTConfig ", conf)
    gcp/GCPDriver.go:275:           fmt.Println("costEstimation Service create err ", err)
    ncpvpc/resources/VMHandler.go:214:      fmt.Println(*i32.nicOrder)
    ncpvpc/resources/PriceInfoHandler.go:223:               fmt.Printf("The ProductFamily '%s' is Included in the ProductFamily.\n", productFamily)
    ncpvpc/resources/PriceInfoHandler.go:257:                               fmt.Printf("RegionCode: %s\n", price.Region.RegionCode)
    ncpvpc/resources/PriceInfoHandler.go:313:                               fmt.Printf("RegionCode: %s\n", price.Region.RegionCode)
    aws/resources/DiskHandler.go:118:                               fmt.Println(aerr.Error())
    aws/resources/DiskHandler.go:121:                       fmt.Println(err.Error())
    aws/resources/DiskHandler.go:168:                       fmt.Println(err.Error())
    aws/resources/DiskHandler.go:239:                               fmt.Println(aerr.Error())
    aws/resources/DiskHandler.go:244:                       fmt.Println(err.Error())
    aws/resources/DiskHandler.go:275:                               fmt.Println(aerr.Error())
    aws/resources/DiskHandler.go:280:                       fmt.Println(err.Error())
    aws/resources/DiskHandler.go:401:                               fmt.Println(aerr.Error())
    aws/resources/DiskHandler.go:404:                       fmt.Println(err.Error())
    aws/resources/DiskHandler.go:455:                               fmt.Println(aerr.Error())
    aws/resources/DiskHandler.go:458:                       fmt.Println(err.Error())
    aws/resources/DiskHandler.go:595:               fmt.Println("Disk Size Error!!: ", volumeSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    aws/resources/DiskHandler.go:600:               fmt.Println("Disk Size Error!!: ", volumeSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    aws/resources/DiskHandler.go:731:               fmt.Println("Disk Size Error!!: ", targetVolumeSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    aws/resources/DiskHandler.go:736:               fmt.Println("Disk Size Error!!: ", targetVolumeSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    aws/resources/CommonHandler.go:237:                             fmt.Println(aerr.Error())
    aws/resources/CommonHandler.go:240:                     fmt.Println(err.Error())
    aws/resources/CommonHandler.go:267:                             fmt.Println(aerr.Error())
    aws/resources/CommonHandler.go:270:                     fmt.Println(err.Error())
    aws/resources/CommonHandler.go:326:                             fmt.Println(aerr.Error())
    aws/resources/CommonHandler.go:329:                     fmt.Println(err.Error())
    aws/resources/CommonHandler.go:366:                             fmt.Println(aerr.Error())
    aws/resources/CommonHandler.go:369:                     fmt.Println(err.Error())
    aws/resources/CommonHandler.go:398:                                             fmt.Println(aerr.Error())
    aws/resources/CommonHandler.go:403:                                     fmt.Println(err.Error())
    aws/resources/CommonHandler.go:487:                             fmt.Println(aerr.Error())
    aws/resources/CommonHandler.go:492:                     fmt.Println(err.Error())
    aws/resources/CommonHandler.go:516:                             fmt.Println(aerr.Error())
    aws/resources/CommonHandler.go:521:                     fmt.Println(err.Error())
    aws/resources/VMHandler.go:43:          fmt.Println("Could not create instance", err)
    aws/resources/MyImageHandler.go:319:                            fmt.Println(aerr.Error())
    aws/resources/MyImageHandler.go:324:                    fmt.Println(err.Error())
    aws/resources/MyImageHandler.go:565:                            fmt.Println(aerr.Error())
    aws/resources/MyImageHandler.go:568:                    fmt.Println(err.Error())
    aws/AwsDriver.go:77:            fmt.Println("Could not create aws New Session", err)
    aws/AwsDriver.go:84:            fmt.Println("Could not create EC2 service client", err)
    aws/AwsDriver.go:107:           fmt.Println("Could not create aws New Session", err)
    aws/AwsDriver.go:115:           fmt.Println("Could not create ELBv2 service client", err)
    aws/AwsDriver.go:137:           fmt.Println("Could not create aws New Session", err)
    aws/AwsDriver.go:143:           fmt.Println("Could not create eks service client", err)
    aws/AwsDriver.go:164:           fmt.Println("Could not create aws New Session", err)
    aws/AwsDriver.go:170:           fmt.Println("Could not create iam service client", err)
    aws/AwsDriver.go:191:           fmt.Println("Could not create aws New Session", err)
    aws/AwsDriver.go:199:           fmt.Println("Could not create autoscaling service client", err)
    ktcloudvpc/resources/CommonKTCloudFunc.go:199:          fmt.Println(fmt.Sprint(cmdErr) + ": " + string(cmdOut))
    ktcloudvpc/resources/CommonKTCloudFunc.go:204:  fmt.Println("cmdOut : ", string(cmdOut))
    ktcloudvpc/resources/DiskHandler.go:582:        fmt.Println("Image Name not found in volume info.")
    ktcloudvpc/resources/DiskHandler.go:616:                        fmt.Println("Image Name not found")
    ktcloudvpc/resources/DiskHandler.go:622:                        fmt.Println("Image ID not found")
    ktcloudvpc/resources/NLBHandler.go:1099:                fmt.Println(destCIDR)
    ktcloudvpc/resources/VMHandler.go:945:                                          fmt.Println(destCIDR)
    ktcloudvpc/resources/VMHandler.go:1028:                                         fmt.Println(srcCIDR)
    azure/resources/PriceInfoHandler.go:67: fmt.Println(url.Parse(URL))
    alibaba/resources/DiskHandler.go:534:           fmt.Println("Disk Size Error!!: ", reqDiskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    alibaba/resources/DiskHandler.go:539:           fmt.Println("Disk Size Error!!: ", reqDiskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    alibaba/resources/DiskHandler.go:609:           fmt.Println("Disk Size Error!!: ", targetDiskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    alibaba/resources/DiskHandler.go:614:           fmt.Println("Disk Size Error!!: ", targetDiskSize, diskSizeValue.diskMinSize, diskSizeValue.diskMaxSize)
    alibaba/resources/PriceInfoHandler.go:400:                                                      fmt.Println("priceResponseStr::", priceResponseStr)
    alibaba/AlibabaDriver.go:135:   fmt.Println("AlibabaDriver : getECSClient() - Region : [" + connectionInfo.RegionInfo.Region + "]")
    alibaba/AlibabaDriver.go:172:           fmt.Println("Could not create alibaba's ecs service client", err)
    alibaba/AlibabaDriver.go:193:   fmt.Println("AlibabaDriver : getVPCClient() - Region : [" + connectionInfo.RegionInfo.Region + "]")
    alibaba/AlibabaDriver.go:227:           fmt.Println("Could not create alibaba's vpc service client", err)
    alibaba/AlibabaDriver.go:237:   fmt.Println("AlibabaDriver : getNLBClient() - Region : [" + connectionInfo.RegionInfo.Region + "]")
    alibaba/AlibabaDriver.go:252:           fmt.Println("Could not create alibaba's server loadbalancer service client", err)
    alibaba/AlibabaDriver.go:261:   fmt.Println("AlibabaDriver : getBssClient() - Region : [" + connectionInfo.RegionInfo.Region + "]")
    alibaba/AlibabaDriver.go:301:           fmt.Println("Could not create alibaba's server bss open api client", err)
    alibaba/AlibabaDriver.go:311:   fmt.Println("AlibabaDriver : getVpc2016Client() - Region : [" + connectionInfo.RegionInfo.Region + "]")
    alibaba/AlibabaDriver.go:321:           fmt.Println("Could not create alibaba's vpc service client", err)
    alibaba/AlibabaDriver.go:331:   fmt.Println("AlibabaDriver : getCs2015Client() - Region : [" + connectionInfo.RegionInfo.Region + "]")
    alibaba/AlibabaDriver.go:341:           fmt.Println("Could not create alibaba's cs service client", err)
    alibaba/AlibabaDriver.go:351:   fmt.Println("AlibabaDriver : getEcs2014Client() - Region : [" + connectionInfo.RegionInfo.Region + "]")
    alibaba/AlibabaDriver.go:361:           fmt.Println("Could not create alibaba's ecs service client", err)
    ncp/resources/CommonNcpFunc.go:140:             fmt.Println(fmt.Sprint(cmdErr) + ": " + string(cmdOut))
    ncp/resources/CommonNcpFunc.go:145:     fmt.Println("cmdOut : ", string(cmdOut))
    ncp/resources/NLBHandler.go:586:                fmt.Println("First part:", virtualIPs[0])
    ncp/resources/NLBHandler.go:589:                fmt.Println("nlb.VirtualIp does not contain a comma.")
    ncp/resources/VMHandler.go:370:         fmt.Println("AccessControlGroupList is empty or nil")
    ncp/resources/VMHandler.go:1798:                fmt.Printf("Region No '%s' not found from the Map. So Set ZoneNo List!!\n", regionNo)
    ncp/resources/PriceInfoHandler.go:241:          fmt.Printf("The ProductFamily '%s' is Included in the ProductFamily.\n", productFamily)
    ncp/resources/PriceInfoHandler.go:287:                          fmt.Printf("RegionCode: %s\n", price.Region.RegionCode)
    ncp/resources/PriceInfoHandler.go:347:                          fmt.Printf("RegionCode: %s\n", price.Region.RegionCode)
    

2. 다음 이슈 중 관련 부분 점검 부탁 드립니다.


3. 다음처럼 log level 출력 점검 부탁 드립니다.

  • (1) 다음 2개 config 파일의 log level을 error로 설정 (default: info)
    ubuntu@node:cb-spider# cd conf
    
    ubuntu@node:conf# grep loglevel log_conf.yaml
      loglevel: error # If loopcheck is true, You can set this online.
    
    ubuntu@node:conf# grep loglevel calllog_conf.yaml
      loglevel: error # If loopcheck is true, You can set this online.
    
  • (2) Spider 서버 실행 (실행 방법: 아래 가이드 참고)
  • (3) AdminWeb에서 Driver가 제공하는 모든 기능에 대한 생성/목록/삭제 메뉴 실행
  • (4) 목표 결과: 실제 error 발생 상황이 아닌 경우 서버 터미널에 출력이 없어야 합니다.

4. 참고: 서버 실행 및 AdminWeb 활용 가이드

  • Spider 서버 실행 가이드: Quick Start Guide
  • AdminWeb 활용 가이드: Wiki 우측에서 AdminWeb Tool Guide 참고
    • image


[Driver 반영 현황]

  • AWS
  • Azure
  • GCP
  • Alibaba
  • Tencent
  • IBM VPC
  • OpenStack
  • NHN
  • NCP Classic
  • NCP VPC
  • KT Classic
  • KT VPC
@powerkimhub
Copy link
Member Author

powerkimhub commented Jun 2, 2024

  • spew.Dump 사용 되는 부분도 점검 부탁드립니다.
    • 삭제, 꼭 필요시 logger.info, logger.debug 등으로 교체
nhncloud/resources/NLBHandler.go:197:   spew.Dump(newHealthMonitor)
nhncloud/resources/NLBHandler.go:221:   spew.Dump(newMembers)
nhncloud/resources/NLBHandler.go:418:   spew.Dump(newMembers)
nhncloud/resources/NLBHandler.go:483:   spew.Dump(newMembers)
ktcloud/resources/KeyPairHandler.go:191:                spew.Dump(err)
ktcloud/resources/VMHandler.go:318:     spew.Dump(jobResult.Queryasyncjobresultresponse.JobResult)
ktcloud/resources/VMHandler.go:780:             spew.Dump(jobResult.Queryasyncjobresultresponse.JobResult)
ktcloud/resources/VMHandler.go:866:             spew.Dump(jobResult.Queryasyncjobresultresponse.JobResult)
ktcloud/resources/VMHandler.go:945:             spew.Dump(jobResult.Queryasyncjobresultresponse.JobResult)
ktcloud/resources/VMHandler.go:1828:                                    spew.Dump(pfRulesResult.Listportforwardingrulesresponse.PortForwardingRule)
ktcloud/resources/VMHandler.go:1865:                                    spew.Dump(firewallRulesResult.Listfirewallrulesresponse.FirewallRule)
tencent/resources/KeyPairHandler.go:71: spew.Dump(keyPair)
tencent/resources/SecurityHandler.go:102:               spew.Dump(defaultEgressRequest)
tencent/resources/SecurityHandler.go:151:               spew.Dump(request)
tencent/resources/VMHandler.go:374:     spew.Dump(response)
tencent/resources/MyImageHandler.go:116:        spew.Dump(response)
tencent/resources/VPCHandler.go:338:    spew.Dump(response)
tencent/resources/VPCHandler.go:451:    spew.Dump(response)
tencent/resources/PriceInfoHandler.go:409:              spew.Dump(v)
gcp/resources/ImageHandler.go:144:                              spew.Dump(item)
gcp/resources/ImageHandler.go:186:      spew.Dump(imageInfo)
gcp/resources/ImageHandler.go:564:                                      spew.Dump(imageInfo)
gcp/resources/ClusterHandler.go:151:    spew.Dump(rb)
gcp/resources/ClusterHandler.go:333:    spew.Dump(op)
gcp/resources/ClusterHandler.go:483:    spew.Dump(rb)
gcp/resources/ClusterHandler.go:494:    spew.Dump(op)
gcp/resources/ClusterHandler.go:578:            spew.Dump(op)
gcp/resources/ClusterHandler.go:636:            spew.Dump(op2)
gcp/resources/ClusterHandler.go:674:    spew.Dump(op)
gcp/resources/ClusterHandler.go:711:    spew.Dump(op)
gcp/resources/ClusterHandler.go:1143:                           spew.Dump(nodeGroupInfo)
gcp/resources/NLBHandler.go:2916:       spew.Dump(vm)
gcp/resources/CommonHandler.go:539:             spew.Dump(opSatus)
gcp/resources/CommonHandler.go:580:             spew.Dump(opSatus)
gcp/resources/SecurityHandler.go:259:   spew.Dump(vNetInfo)
gcp/resources/VMHandler.go:230:         spew.Dump(keypairInfo)
gcp/resources/VMHandler.go:425: spew.Dump(instance)
gcp/resources/VMHandler.go:472: spew.Dump(op)
gcp/resources/VMHandler.go:580: spew.Dump(inst)
gcp/resources/VMHandler.go:623: spew.Dump(inst)
gcp/resources/VMHandler.go:767: spew.Dump(inst)
gcp/resources/VMHandler.go:949: spew.Dump(vm)
gcp/resources/VMHandler.go:995:                                 spew.Dump(instance)
gcp/resources/VMHandler.go:1036:        spew.Dump(server)
gcp/resources/VMHandler.go:1192:                spew.Dump(info)
gcp/resources/VMHandler.go:1229:        spew.Dump(info)
gcp/resources/VPCHandler.go:209:                                spew.Dump(vpcInfo)
gcp/resources/VPCHandler.go:220:                                spew.Dump(vpcInfo)
gcp/resources/VPCHandler.go:258:                                spew.Dump(err)
gcp/resources/VPCHandler.go:270:                                spew.Dump(chkInfo)
gcp/resources/VPCHandler.go:280:                                spew.Dump(chkInfo)
gcp/resources/VPCHandler.go:290:                                spew.Dump(err)
gcp/resources/VPCHandler.go:444:        spew.Dump(infoVPC)
gcp/resources/VPCHandler.go:660:        spew.Dump(infoSubnet)
ncpvpc/resources/ImageHandler.go:106:           spew.Dump(regionListResult.RegionList)
ncpvpc/resources/NLBHandler.go:163:     spew.Dump(subnetNoList)
ncpvpc/resources/SecurityHandler.go:1022:       spew.Dump(sgInfo)
aws/resources/RegionZoneHandler.go:104:         spew.Dump("####################", region.RegionName)
aws/resources/DiskHandler.go:289:               spew.Dump(result)
aws/resources/DiskHandler.go:413:               spew.Dump(result)
aws/resources/DiskHandler.go:467:               spew.Dump(result)
aws/resources/DiskHandler.go:915:               spew.Dump(diskInfo)
aws/resources/ClusterHandler.go:149:            spew.Dump(result)
aws/resources/ClusterHandler.go:171:                            spew.Dump(resultNodeGroupInfo)
aws/resources/ClusterHandler.go:277:            spew.Dump(result)
aws/resources/ClusterHandler.go:344:            spew.Dump(result)
aws/resources/ClusterHandler.go:412:            spew.Dump(resNodeGroupList)
aws/resources/ClusterHandler.go:422:            spew.Dump(clusterInfo)
aws/resources/ClusterHandler.go:517:            spew.Dump(result)
aws/resources/ClusterHandler.go:588:            spew.Dump(subnetList)
aws/resources/ClusterHandler.go:657:            spew.Dump(input)
aws/resources/ClusterHandler.go:667:            spew.Dump(result)
aws/resources/ClusterHandler.go:695:            spew.Dump(input)
aws/resources/ClusterHandler.go:704:            spew.Dump(result)
aws/resources/ClusterHandler.go:732:            spew.Dump(result)
aws/resources/ClusterHandler.go:756:            spew.Dump(result)
aws/resources/ClusterHandler.go:789:    spew.Dump(nodeList)
aws/resources/ClusterHandler.go:816:            spew.Dump(result.Nodegroup)
aws/resources/ClusterHandler.go:840:                    spew.Dump(updateResult)
aws/resources/ClusterHandler.go:867:            spew.Dump(result)
aws/resources/ClusterHandler.go:907:            spew.Dump(result)
aws/resources/NLBHandler.go:128:                spew.Dump(result)
aws/resources/NLBHandler.go:213:                spew.Dump(result)
aws/resources/NLBHandler.go:250:                spew.Dump(result)
aws/resources/NLBHandler.go:534:                spew.Dump(result)
aws/resources/NLBHandler.go:561:                spew.Dump(targetGroup)
aws/resources/NLBHandler.go:608:                spew.Dump(listener)
aws/resources/NLBHandler.go:651:                spew.Dump(result)
aws/resources/NLBHandler.go:748:                spew.Dump(result)
aws/resources/NLBHandler.go:816:                spew.Dump(resListener)
aws/resources/NLBHandler.go:869:                spew.Dump(result)
aws/resources/NLBHandler.go:945:                spew.Dump(result)
aws/resources/NLBHandler.go:1054:               spew.Dump(result)
aws/resources/NLBHandler.go:1086:               spew.Dump(result)
aws/resources/NLBHandler.go:1104:               spew.Dump(nlbInfo)
aws/resources/NLBHandler.go:1189:               spew.Dump(result)
aws/resources/NLBHandler.go:1316:               spew.Dump(result)
aws/resources/NLBHandler.go:1408:               spew.Dump(input)
aws/resources/NLBHandler.go:1455:               spew.Dump(result)
aws/resources/NLBHandler.go:1506:               spew.Dump(input)
aws/resources/NLBHandler.go:1547:               spew.Dump(result)
aws/resources/NLBHandler.go:1583:               spew.Dump(result)
aws/resources/NLBHandler.go:1761:               spew.Dump(result)
aws/resources/CommonAwsFunc.go:127:             spew.Dump(awsVpcInfo)
aws/resources/CommonAwsFunc.go:132:             spew.Dump(awsSubnetInfo)
aws/resources/CommonAwsFunc.go:138:             spew.Dump(awsCBNetworkInfo)
aws/resources/CommonAwsFunc.go:251:             spew.Dump(result)
aws/resources/KeyPairHandler.go:276:            spew.Dump(keyPairInfo)
aws/resources/CommonHandler.go:245:             spew.Dump(result)
aws/resources/CommonHandler.go:275:             spew.Dump(result)
aws/resources/CommonHandler.go:318:     spew.Dump(input)
aws/resources/CommonHandler.go:334:     spew.Dump(result.Volumes)
aws/resources/CommonHandler.go:375:             spew.Dump(result)
aws/resources/CommonHandler.go:409:                             spew.Dump(result)
aws/resources/VMHandler.go:104:         spew.Dump(vmReqInfo)
aws/resources/VMHandler.go:283:         spew.Dump(userDataBase64)
aws/resources/VMHandler.go:633: spew.Dump(result)
aws/resources/VMHandler.go:640:         spew.Dump(result)
aws/resources/VMHandler.go:698: spew.Dump(result)
aws/resources/VMHandler.go:703:         spew.Dump(result)
aws/resources/VMHandler.go:771:         spew.Dump(result)
aws/resources/VMHandler.go:822: spew.Dump(result)
aws/resources/VMHandler.go:863:         spew.Dump(result)
aws/resources/VMHandler.go:1637:        spew.Dump(assocRes)
aws/resources/MyImageHandler.go:310:            spew.Dump(input)
aws/resources/MyImageHandler.go:364:            spew.Dump(result)
aws/resources/MyImageHandler.go:423:            spew.Dump(diskIIDs)
aws/resources/MyImageHandler.go:439:            spew.Dump(result)
aws/resources/MyImageHandler.go:574:            spew.Dump(result)
aws/resources/VPCHandler.go:221:        spew.Dump(result)
aws/resources/VPCHandler.go:453:        spew.Dump(vNetworkInfoList)
aws/resources/VPCHandler.go:725:        spew.Dump(result)
aws/resources/VPCHandler.go:846:        spew.Dump(result)
ktcloudvpc/resources/NLBHandler.go:1069:        spew.Dump(natResult)
ktcloudvpc/resources/MyImageHandler.go:72:      spew.Dump(volumeImage)
ktcloudvpc/resources/MyImageHandler.go:142:     spew.Dump(ktImageList)
alibaba/resources/ImageHandler.go:107:  spew.Dump(result)
alibaba/resources/ImageHandler.go:202:          spew.Dump(image)
alibaba/resources/CommonAlibabaFunc.go:206:     spew.Dump(v)
alibaba/resources/KeyPairHandler.go:146:        spew.Dump(result)
alibaba/resources/KeyPairHandler.go:157:        spew.Dump(publicKey)
alibaba/resources/KeyPairHandler.go:257:        spew.Dump(keyPair)
alibaba/resources/KeyPairHandler.go:318:        spew.Dump(request)
alibaba/resources/CommonHandler.go:98:          spew.Dump(resultDiskList)
alibaba/resources/SecurityHandler.go:93:        spew.Dump(request)
alibaba/resources/SecurityHandler.go:135:       spew.Dump(reqSecurityRules)
alibaba/resources/SecurityHandler.go:171:                       spew.Dump(request)
alibaba/resources/SecurityHandler.go:188:                       spew.Dump(request)
alibaba/resources/SecurityHandler.go:212:       spew.Dump(reqSecurityRules)
alibaba/resources/SecurityHandler.go:273:                       spew.Dump(request)
alibaba/resources/SecurityHandler.go:290:                       spew.Dump(request)
alibaba/resources/SecurityHandler.go:310:       spew.Dump(request)
alibaba/resources/VMHandler.go:118:             spew.Dump(userDataBase64)
alibaba/resources/VMHandler.go:992:             spew.Dump(vmInfo)
alibaba/resources/VMHandler.go:998:     spew.Dump(vmInfoList)
alibaba/resources/VPCHandler.go:294:    spew.Dump(result)
alibaba/AlibabaDriver.go:146:           spew.Dump(config)
alibaba/AlibabaDriver.go:173:           spew.Dump(err)

powerkimhub added a commit that referenced this issue Jun 7, 2024
[AWS, ALIBABA, GCP, TENCENT] Resolve Issue :  Remove Print Statements and Check Log Level #1207
@powerkimhub
Copy link
Member Author

powerkimhub commented Jun 9, 2024

  • 관련하여, 다음 CSP에 대한 현재 버전 시험 결과가 다음과 같습니다.
    • 대상 CSP: AWS, GCP, Alibaba, Tencent
  • 시험 방법: loglevel=error 상태에서 다음 정보 제공 및 자원 생성/목록/삭제 등 실행
    • Region/Zone, Price, Image, VMSpec, VPC/Subnet, SG, KeyPair, VM, NLB, Disk, Disk Mount, MyImage, VM(with MyImage)
  • 시험 결과:
    • 아래 시험 결과를 참고하시어,
    • 정상 동작 시 출력되는 에러 로그들이 존재하는데 재차 확인 부탁드립니다.

[AWS]

  • OK

[GCP]

  • VM 정상 생성시 발생하는 에러 로그
    [CB-SPIDER].[ERROR]: 2024-06-09 23:51:07 VMHandler.go:1299, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.(*GCPVMHandler).WaitForRun() - The VM status is not [Running], so waiting for 1 second before querying.
    [CB-SPIDER].[ERROR]: 2024-06-09 23:51:07 VMHandler.go:1299, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.(*GCPVMHandler).WaitForRun() - The VM status is not [Running], so waiting for 1 second before querying.
    ... 중략 ...
    

  • NLB 정상 생성시 발생하는 에러 로그
    [CB-SPIDER].[ERROR]: 2024-06-10 00:02:00 NLBHandler.go:2103, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.(*GCPNLBHandler).getTargetPool() - TargetPools.Get googleapi: Error 404: The resource 'projects/powerkimhub/regions/us-central1/targetPools/spider-nlb-01-cpis7pjp70iquvblfiq0' was not found, notFound
    [CB-SPIDER].[ERROR]: 2024-06-10 00:02:00 NLBHandler.go:3109, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.checkErrorCode() - errorDetailgoogleapi: Error 404: The resource 'projects/powerkimhub/regions/us-central1/targetPools/spider-nlb-01-cpis7pjp70iquvblfiq0' was not found, notFound
    [CB-SPIDER].[ERROR]: 2024-06-10 00:02:00 NLBHandler.go:3110, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.checkErrorCode() - oktrue
    [CB-SPIDER].[ERROR]: 2024-06-10 00:02:00 NLBHandler.go:3112, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.checkErrorCode() - Error Code %v404
    [CB-SPIDER].[ERROR]: 2024-06-10 00:02:00 NLBHandler.go:3113, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.checkErrorCode() - Error Message %vThe resource 'projects/powerkimhub/regions/us-central1/targetPools/spider-nlb-01-cpis7pjp70iquvblfiq0' was not found
    
    ... 중략 ...
    
    [CB-SPIDER].[ERROR]: 2024-06-10 00:02:01 NLBHandler.go:286, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.(*GCPNLBHandler).CreateNLB() - existsTargetPoolChecks : googleapi: Error 404: The resource 'projects/powerkimhub/regions/us-central1/forwardingRules/spider-nlb-01-cpis7pjp70iquvblfiq0' was not found, notFound
    

  • NLB 정상 삭제시 발생하는 에러 로그
    [CB-SPIDER].[ERROR]: 2024-06-10 00:33:29 NLBHandler.go:2103, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.(*GCPNLBHandler).getTargetPool() - TargetPools.Get googleapi: Error 404: The resource 'projects/powerkimhub/regions/us-central1/targetPools/spider-nlb-01-cpis7pjp70iquvblfiq0' was not found, notFound
    [CB-SPIDER].[ERROR]: 2024-06-10 00:33:29 NLBHandler.go:2275, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/gcp/resources.(*GCPNLBHandler).removeHttpHealthCheck() - targetPoolList  list for removeHttpHealthCheck: googleapi: Error 404: The resource 'projects/powerkimhub/regions/us-central1/targetPools/spider-nlb-01-cpis7pjp70iquvblfiq0' was not found, notFound
    

[Alibaba]

  • VPC/Subnet -> SG -> KeyPair -> VM 2개 생성시 발생하는 에러 로글 및 화면 출력
    [CB-SPIDER].[ERROR]: 2024-06-10 00:48:24 VPCHandler.go:255, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.(*AlibabaVPCHandler).WaitForRun() - Waiting for 1 second and then querying because the VPC status is not Available.
    [CB-SPIDER].[ERROR]: 2024-06-10 00:48:26 VPCHandler.go:255, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.(*AlibabaVPCHandler).WaitForRun() - Waiting for 1 second and then querying because the VPC status is not Available.
    (*vpc.DescribeVpcsResponse)(0xc0021fba90)(HTTP/1.1 200 OK
    Content-Type: application/json;charset=utf-8
    Connection: keep-alive
    Access-Control-Expose-Headers: *
    X-Acs-Request-Id: 9DD548EB-446B-5035-89F8-918BBB0732CF
    X-Acs-Trace-Id: a38a86fecddc03eb0fbe28b2b13f7b6a
    Date: Sun, 09 Jun 2024 15:48:29 GMT
    Content-Length: 804
    Keep-Alive: timeout=25
    Access-Control-Allow-Origin: *
    Etag: 8ryWsZGSytxRR+ATb7x8hiw4
    
    {"TotalCount":1,"Vpcs":{"Vpc":[{"Status":"Available","IsDefault":false,"CenStatus":"Detached","Description":"","ResourceGroupId":"rg-acfnyca3hcx27oq","VSwitchIds":{"VSwitchId":["vsw-2zekpxzu92swo9zbxx05l"]},"SecondaryCidrBlocks":{"SecondaryCidrBlock":[]},"CidrBlock":"192.168.0.0/16","RouterTableIds":{"RouterTableIds":["vtb-2zemnz2ywrha4dv62tjlt"]},"UserCidrs":{"UserCidr":[]},"NetworkAclNum":0,"AdvancedResource":false,"VRouterId":"vrt-2ze3ziddmeq26f8oleqgw","NatGatewayIds":{"NatGatewayIds":[]},"VpcId":"vpc-2zeskscdllitjsto8cscf","OwnerId":5881385118576570,"CreationTime":"2024-06-09T15:48:24Z","VpcName":"spider-vm-ssh-test-vpc-01-cpisthjp70iquvblfisg","EnabledIpv6":false,"RegionId":"cn-beijing","Ipv6CidrBlock":""}]},"PageSize":10,"RequestId":"9DD548EB-446B-5035-89F8-918BBB0732CF","PageNumber":1}
    )
    (*ecs.CreateSecurityGroupRequest)(0xc0004ca000)({
     RpcRequest: (*requests.RpcRequest)(0xc005e97500)({
      baseRequest: (*requests.baseRequest)(0xc0004e0280)({
       Scheme: (string) (len=5) "https",
       Method: (string) (len=4) "POST",
       Domain: (string) (len=27) "ecs.cn-beijing.aliyuncs.com",
       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=19) "CreateSecurityGroup",
       AcceptFormat: (string) (len=4) "JSON",
       QueryParams: (map[string]string) (len=15) {
        (string) (len=17) "SecurityGroupType": (string) (len=10) "enterprise",
        (string) (len=9) "Timestamp": (string) (len=20) "2024-06-09T15:48:29Z",
         ... 중략 ...
    
    [CB-SPIDER].[ERROR]: 2024-06-10 00:48:39 VMHandler.go:572, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.(*AlibabaVMHandler).WaitForRun() - The VM status is not [Running], so waiting for 1 second before querying.
    [CB-SPIDER].[ERROR]: 2024-06-10 00:48:39 VMHandler.go:572, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.(*AlibabaVMHandler).WaitForRun() - The VM status is not [Running], so waiting for 1 second before querying.
    ... 중략 ...
    

  • MyImage(Snapshot) 생성시 발생하는 에러 로글 및 화면 출력
    [CB-SPIDER].[ERROR]: 2024-06-10 00:56:29 CommonHandler.go:497, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.WaitForImageStatus() - MyImage의 상태가 [Available]이 아니라서 1초 대기후 조회합니다. 현재 [Creating]
    [CB-SPIDER].[ERROR]: 2024-06-10 00:56:31 CommonHandler.go:497, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.WaitForImageStatus() - MyImage의 상태가 [Available]이 아니라서 1초 대기후 조회합니다. 현재 [Creating]
    [CB-SPIDER].[ERROR]: 2024-06-10 00:56:32 CommonHandler.go:497, github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba/resources.WaitForImageStatus() - MyImage의 상태가 [Available]이 아니라서 1초 대기후 조회합니다. 현재 [Creating]
    ... 중략 ...
    

  • 이슈: MyImage 이용한 VM 생성시 다음 오류 발생
    • 동일 리전, 동일 환경에서 생성한 MyImage를 이용한 VM 생성이 안되는 것은 좀 이상합니다.
    • 원인 분석/확인 부탁 드립니다.
[CB-SPIDER].[ERROR]: 2024-06-10 01:07:14 VMManager.go:509, github.com/cloud-barista/cb-spider/api-runtime/common-runtime.StartVM() - SDK.ServerError
ErrorCode: InvalidDataDiskCategory.ValueNotSupported
... 중략 ...
    • 참고: 생성 요청 인자 및 결과 오류 메시지
    curl -sX POST http://localhost:1024/spider/vm -H 'Content-Type: application/json' -d '{ "ConnectionName" : "alibaba-beijing-config", "ReqInfo" : { "Name" : "vm-01", "ImageType" : "MyImage",                                "ImageName" : "spider-myimage-01", "VMSpecName" : "ecs.c7.large", "VPCName" : "SPIDER-VM-SSH-Test-vpc-01", "SubnetName" : "SPIDER-VM-SSH-Test-subnet-01",                                 "SecurityGroupNames" : ["SPIDER-VM-SSH-Test-SG01"], "RootDiskType" : "", "DataDiskNames" : [], "KeyPairName" : "SPIDER-VM-SSH-Test-keypair-01",                                 "VMUserId" : "Administrator", "VMUserPasswd" : "cloudbarista123^" }}'
    
    [1:17:28 AM]    ==> {"message":"SDK.ServerError\nErrorCode: InvalidDataDiskCategory.ValueNotSupported\nRecommend: https://api.alibabacloud.com/troubleshoot?intl_lang=EN_US\u0026q=InvalidDataDiskCategory.ValueNotSupported\u0026product=Ecs\u0026requestId=0ECF0F3F-1231-57C4-9C29-0F9714635A5F\nRequestId: 0ECF0F3F-1231-57C4-9C29-0F9714635A5F\nMessage: The specified parameter DataDisk.n.Category is not valid.\nRespHeaders: map[Access-Control-Allow-Origin:[*] Access-Control-Expose-Headers:[*] Connection:[keep-alive] Content-Length:[387] Content-Type:[application/json;charset=utf-8] Date:[Sun, 09 Jun 2024 16:17:28 GMT] Keep-Alive:[timeout=25] X-Acs-Request-Id:[0ECF0F3F-1231-57C4-9C29-0F9714635A5F] X-Acs-Trace-Id:[93540c582304acb663d41d9438f5a69e]]"}
    

[Tencent]

  • Code 내 LogLevel 설정 삭제 필요

    cloud-control-manager/cloud-driver/drivers/tencent/resources/SecurityHandler.go:52:     cblog.SetLevel("debug")
    
    • ./conf/log_conf.yaml 설정이 먹히지 않고 있습니다.
    • 실수로 남겨진 듯하여 일단, 해당 라인을 삭제하였습니다.
  • Disk 생성 이슈 (대상 리전: ap-beijing / ap-beijing-3)

    • 모든 Disk Type 생성 요청이 오류가 발생하고 있습니다.

    • 현황 참고

      [오전 10:14:36] curl -sX POST http://localhost:1024/spider/disk -H 'Content-Type: application/json' -d '{ "ConnectionName" : "tencent-beijing3-config", "ReqInfo" : { "Name" : "spider-disk-01", "Zone" : "ap-beijing-3", "DiskType" : "CLOUD_PREMIUM", "DiskSize" : "default"}}'
      [오전 10:14:39]    ==> {"message":"search failed"}
      
      [오전 10:14:47] curl -sX POST http://localhost:1024/spider/disk -H 'Content-Type: application/json' -d '{ "ConnectionName" : "tencent-beijing3-config", "ReqInfo" : { "Name" : "spider-disk-01", "Zone" : "ap-beijing-3", "DiskType" : "CLOUD_HSSD", "DiskSize" : "default"}}'
      [오전 10:14:50]    ==> {"message":"search failed"}
      
      [오전 10:15:17] curl -sX POST http://localhost:1024/spider/disk -H 'Content-Type: application/json' -d '{ "ConnectionName" : "tencent-beijing3-config", "ReqInfo" : { "Name" : "spider-disk-01", "Zone" : "ap-beijing-3", "DiskType" : "CLOUD_BASIC", "DiskSize" : "default"}}'
      [오전 10:15:19]    ==> {"message":"[TencentCloudSDKError] Code=ResourceInsufficient, Message=(a12b8a236ce2)[19003]required disk is not supported in current region, RequestId=c1356cfb-a76f-4c8c-a598-a12b8a236ce2"}
      
      [오전 10:15:46] curl -sX POST http://localhost:1024/spider/disk -H 'Content-Type: application/json' -d '{ "ConnectionName" : "tencent-beijing3-config", "ReqInfo" : { "Name" : "spider-disk-01", "Zone" : "ap-beijing-3", "DiskType" : "CLOUD_TSSD", "DiskSize" : "default"}}'
      [오전 10:15:48]    ==> {"message":"[TencentCloudSDKError] Code=InvalidParameter, Message=(2b11053567f2)TSSD Disk disk can not create alone current, RequestId=8d5efa00-35a2-4dcb-b511-2b11053567f2"}
      
      [오전 10:16:06] curl -sX POST http://localhost:1024/spider/disk -H 'Content-Type: application/json' -d '{ "ConnectionName" : "tencent-beijing3-config", "ReqInfo" : { "Name" : "spider-disk-01", "Zone" : "", "DiskType" : "default", "DiskSize" : "default"}}'
      [오전 10:16:09]    ==> {"message":"search failed"}  
      
    • 추가로, 현황 파악이 될 수 있도록 오류 메시지 보완 필요

      [오전 10:08:48] curl -sX POST http://localhost:1024/spider/disk -H 'Content-Type: application/json' -d '{ "ConnectionName" : "tencent-beijing3-config", "ReqInfo" : { "Name" : "spider-disk-01", "Zone" : "ap-beijing-3", "DiskType" : "default", "DiskSize" : "default"}}'
      [오전 10:08:53]    ==> {"message":"search failed"}
      
      • 유사 부분
        resources/CommonHandler.go:45:          return cbs.Disk{}, errors.New("search failed")
        resources/CommonHandler.go:168:         return cvm.Image{}, errors.New("search failed")
        resources/CommonHandler.go:205:         return cbs.Snapshot{}, errors.New("search failed")
        
  • Disk를 제외한 정보 제공 및 자원 생성/목록/삭제 등 로그 출력 및 화면 메시지는 OK


[부탁] 기본 Test 후 PR 부탁 드립니다.

  • 시험 방법: link의 3번 항목 참고

@powerkimhub powerkimhub pinned this issue Jun 10, 2024
@powerkimhub
Copy link
Member Author

@innodreamer


[NCPVPC]


  • Price 정보 요청시 다음 메시지 출력
     The ProductFamily 'Server' is Included in the ProductFamily.
    

  • Image 정보 요청시 다음 메시지 출력
     ([]*vserver.Region) (len=3 cap=4) {
     (*vserver.Region)(0xc0004868c0)({
      RegionCode: (*string)(0xc0004868d0)((len=2) "KR"),
      RegionName: (*string)(0xc0004868e0)((len=5) "Korea")
     }),
     (*vserver.Region)(0xc000486900)({
      RegionCode: (*string)(0xc000486910)((len=3) "SGN"),
      RegionName: (*string)(0xc000486970)((len=14) "Singapore(New)")
     }),
     (*vserver.Region)(0xc000486980)({
      RegionCode: (*string)(0xc000486990)((len=3) "JPN"),
      RegionName: (*string)(0xc0004869a0)((len=10) "Japan(New)")
     })
    }
    

  • VMSpec 정보 요청시 다음 메시지 출력
    ([]*vserver.Region) (len=3 cap=4) {
     (*vserver.Region)(0xc001726cc0)({
      RegionCode: (*string)(0xc001726cd0)((len=2) "KR"),
      RegionName: (*string)(0xc001726ce0)((len=5) "Korea")
     }),
     (*vserver.Region)(0xc001726d00)({
      RegionCode: (*string)(0xc001726d10)((len=3) "SGN"),
      RegionName: (*string)(0xc001726d20)((len=14) "Singapore(New)")
     }),
     (*vserver.Region)(0xc001726d30)({
      RegionCode: (*string)(0xc001726d40)((len=3) "JPN"),
      RegionName: (*string)(0xc001726d50)((len=10) "Japan(New)")
     })
    }
    

  • VM 생성시 다음 메시지 출력

    0
    0
    
  • NLB 생성시 다음 메시지 출력

    ([]*string) (len=1 cap=1) {
     (*string)(0xc00248f220)((len=6) "154308")
    }
    
  • 이슈 발생: Storage -> VM Attach시 오류 발생

    • '할당중' 상태로 멈춘 상태
    • Storage Detach 및 VM 삭제가 안되는 Deadlock 상태
  • 일단, 부착된 Disk 없는 VM으로 MyImage 생성 및 MyImage 기반 VM 생성 시험

    • VM 생성시와 동일한 '0'을 화면에 출력하고 있음

※ 그외 자원: OK


[부탁] 화면 출력 관련 국내 타 CSP에 대한 기본 Test 후 PR 부탁 드립니다.

  • 시험 방법: link의 3번 항목 참고

powerkimhub added a commit that referenced this issue Jul 3, 2024
[AWS] Resolve Issue : Remove Print Statements and Check Log Level #1207
@innodreamer
Copy link
Member

@powerkimhub 위의 PR merge된 이후 NCP VPC에서 불필요한 메시지 출력되지 않는거 확인했습니다.
그리고, disk volume을 VM에 attach도 정상적으로 되는거 확인했습니다.

다만, Spider server 관련하여 아래의 issue를 좀 확인 부탁드립니다.
#1228

@powerkimhub
Copy link
Member Author

@innodreamer

  • 넵, 캄사합니다.
  • #1228 점검해보도록 하겠습니다.

@powerkimhub
Copy link
Member Author

  • 대체로 정리되어 close 합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants