Skip to content

StartVM and TerminateVM Main Flow of Cloud Drivers

ByoungSeob Kim edited this page May 21, 2021 · 11 revisions

StartVM()/TerminateVM() retry timeout 조정 이력

[Init]

  • StartVM: 30s
  • TerminateVM: 10s
  • issues:
    • Alibaba TerminateVM 시 오류 발생
    • OpenStack StartVM 시 오류 발생

[2021.05.21.]

  • StartVM: 120s
  • TerminateVM: 60s

[StartVM main flow]

  • Focusing on CallLog and Waiting Loop
  • Waiting Loop: VM 정보 제공을 위해서 VM 정보가 생성될 때까지(=running status) 기다리는 작업
    • StartVM 규격 참고: StartVM(vmReqInfo VMReqInfo) (VMInfo, error)
  • Flow에서 함수 이름은 실제 이름과 다를 수 있음
    • SetUser('cb-user'): cloud-init 데이터 설정
    • CreateUser('cb-user'): runSSH into VM

Driver Names StartVM Flow Etc
ALIBABA GetKey()
SetUser('cb-user')
StartTime
  RunInstances()
EndTime
  Loop-120sec(getStatus('Running'): sleep 1s)
return GetVMInfo()
AWS GetKey()
SetUser('cb-user')
StartTime
  RunInstances()
EndTime
  WaitUntilInstanceRunning()
return GetVMInfo()
AZURE CheckVM()
CreatePublicIP()
CreateVNic()
GetPublicKey()
StartTime
  CreateOrUpdate()
EndTime
  WaitForCompletionRef()
return GetVMInfo()
CLOUDIT StartTime
  Rest.Post(ACE, servers)
EndTime
  Loop-120sec(get(PrivateIP && Running): sleep 1s)
  Loop-120sec(echo: sleep 1)
CreateUser('cb-user')
Restart(sshd)
return GetVMInfo()
GCP GetKey()
StartTime
  Instances.Insert.Do()
EndTime
  Loop-120sec(getStatus('Running'): sleep 1s)
return GetVMInfo()
OPENSTACK CheckVM()
setUser('cb-user')
StartTime
  servers.Create()
EndTime
  Loop-120sec(getStatus('active'): sleep 1s)
  AssociatePublicIP()
return GetVMInfo()

[TerminateVM main flow]

  • Focusing on CallLog and Waiting Loop
  • Waiting Loop: VM이 원하는 상태로 될 때까지 기다리는 작업
    • TerminateVM 규격 참고: TerminateVM(vmIID IID) (VMStatus, error)
  • Flow에서 함수 이름은 실제 이름과 다를 수 있음

Driver Names TerminateVM Flow Etc
ALIBABA SuspendVM()
  Loop-60sec(getStatus('Suspended'): sleep 1s)
Starttime
  DeleteInstance()
EndTime
return 'Terminating'
AWS StartTime
  TerminateInstances()
EndTime
return 'Terminating'
AZURE GetVM()
StartTime
  Delete()
EndTime
  WaitForCompletionRef()
DeleteVNic()
DeletePublicIP()
DeleteVMDisk()
return irs.NotExist
CLOUDIT GetVM()
DisassociatePublicIP() sleep 5s
StartTime
  Terminate()
EndTime
return irs.Terminating
GCP StartTime
  Delete()
EndTime
return 'Terminating'
OPENSTACK GetVM()
floatingip.Delete()
StartTime
  Delete()
EndTime
return irs.Terminating

Table of contents



Clone this wiki locally