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

Add MCIS Refine feature #572

Merged
merged 7 commits into from
May 30, 2021
Merged

Add MCIS Refine feature #572

merged 7 commits into from
May 30, 2021

Conversation

seokho-son
Copy link
Member

@seokho-son seokho-son commented May 29, 2021

Fix #469

MCIS에 다수의 VM을 포함시, 일부 VM에 대한 생성이 실패하거나 오류가 발생하는 경우가 있음.

본 PR은 MCIS에 문제가 있는 VM을 쉽게 정리할 수 있도록 정제 기능을 제공함.

image

테스트

임의로 Failed, Undefined 상태의 VM이 포함된 MCIS 생성 (총 3개의 VM: 1 failed, 1 undefined, 1 running)

son@son:~/go/src/github.com/cloud-barista/cb-tumblebug/src/testclient/scripts/sequentialFullTest$ ./create-all.sh all 1 shson16 ../testSetCustom.env 
####################################################################
## Create MCIS from Zero Base
####################################################################
[Input parameters]
CSP: all, REGION: 1, POSTFIX: shson16,
[Parallel excution for all CSP regions]
- Create MCIR in alibaba-cn-wulanchabu
- Create MCIR in alibaba-cn-heyuan
- Create MCIR in alibaba-cn-chengdu

####################################################################
## 8. VM: Status MCIS
####################################################################
mcis-shson16
{
  "status": {
    "id": "mcis-shson16",
    "name": "mcis-shson16",
    "status": "Partial-Undefined-(2/3)",
    "targetStatus": "None",
    "targetAction": "None",
    "installMonAgent": "no",
    "masterVmId": "alibaba-cn-heyuan-shson16-0",
    "masterIp": "47.113.200.168",
    "masterSSHPort": "22",
    "vm": [
      {
        "id": "alibaba-cn-wulanchabu-shson16-lead-0",
        "name": "alibaba-cn-wulanchabu-shson16-lead-0",
        "cspVmId": "",
        "status": "Undefined",
        "targetStatus": "None",
        "targetAction": "None",
        "nativeStatus": "",
        "monAgentStatus": "notInstalled",
        "systemMessage": "",
        "createdTime": "2021-05-30 00:34:20",
        "publicIp": "",
        "privateIp": "",
        "sshPort": "0",
        "location": {
          "latitude": "40.9937",
          "longitude": " 113.1333",
          "briefAddr": "China (Ulanqab)",
          "cloudType": "alibaba",
          "nativeRegion": "cn-wulanchabu"
        }
      },
      {
        "id": "alibaba-cn-chengdu-shson16-0",
        "name": "alibaba-cn-chengdu-shson16-0",
        "cspVmId": "",
        "status": "Undefined",
        "targetStatus": "None",
        "targetAction": "None",
        "nativeStatus": "",
        "monAgentStatus": "notInstalled",
        "systemMessage": "",
        "createdTime": "2021-05-30 00:34:37",
        "publicIp": "",
        "privateIp": "",
        "sshPort": "0",
        "location": {
          "latitude": "30.6570",
          "longitude": "104.0800",
          "briefAddr": "China (Chengdu)",
          "cloudType": "alibaba",
          "nativeRegion": "cn-chengdu"
        }
      },
      {
        "id": "alibaba-cn-heyuan-shson16-0",
        "name": "alibaba-cn-heyuan-shson16-0",
        "cspVmId": "alibaba-cn-heyuan-shson16-0",
        "status": "Running",
        "targetStatus": "None",
        "targetAction": "None",
        "nativeStatus": "Running",
        "monAgentStatus": "notInstalled",
        "systemMessage": "",
        "createdTime": "2021-05-30 00:34:44",
        "publicIp": "47.113.200.168",
        "privateIp": "192.168.4.10",
        "sshPort": "22",
        "location": {
          "latitude": "23.7333",
          "longitude": "114.6830",
          "briefAddr": "China (Heyuan)",
          "cloudType": "alibaba",
          "nativeRegion": "cn-heyuan"
        }
      }
    ]
  }
}

8.mcis/refine-mcis.sh 스트립트를 통해 refine 수행

son@son:~/go/src/github.com/cloud-barista/cb-tumblebug/src/testclient/scripts/sequentialFullTest$ ../8.mcis/refine-mcis.sh all 1 shson16 ../testSetCustom.env 
####################################################################
## 8. VM: Refine MCIS (remove failed VMs)
####################################################################
mcis-shson16
{
  "message": "Refined the MCIS"
}

Refine 후에 상태 확인 (Running VM 1개만 빼고 모두 삭제가 완료됨)

son@son:~/go/src/github.com/cloud-barista/cb-tumblebug/src/testclient/scripts/sequentialFullTest$ ../8.mcis/status-mcis.sh all 1 shson16 ../testSetCustom.env 
####################################################################
## 8. VM: Status MCIS
####################################################################
mcis-shson16
{
  "status": {
    "id": "mcis-shson16",
    "name": "mcis-shson16",
    "status": "Running-(1/1)",
    "targetStatus": "None",
    "targetAction": "None",
    "installMonAgent": "no",
    "masterVmId": "alibaba-cn-heyuan-shson16-0",
    "masterIp": "47.113.200.168",
    "masterSSHPort": "22",
    "vm": [
      {
        "id": "alibaba-cn-heyuan-shson16-0",
        "name": "alibaba-cn-heyuan-shson16-0",
        "cspVmId": "alibaba-cn-heyuan-shson16-0",
        "status": "Running",
        "targetStatus": "None",
        "targetAction": "None",
        "nativeStatus": "Running",
        "monAgentStatus": "notInstalled",
        "systemMessage": "",
        "createdTime": "2021-05-30 00:34:44",
        "publicIp": "47.113.200.168",
        "privateIp": "192.168.4.10",
        "sshPort": "22",
        "location": {
          "latitude": "23.7333",
          "longitude": "114.6830",
          "briefAddr": "China (Heyuan)",
          "cloudType": "alibaba",
          "nativeRegion": "cn-heyuan"
        }
      }
    ]
  }
}

@seokho-son seokho-son requested a review from jihoon-seo as a code owner May 29, 2021 15:47
@seokho-son
Copy link
Member Author

개발 시급성으로 인해 제가 머지하겠습니다~~
@jihoon-seo 머지되고 나서 의견 주시면 추가 PR로 반영하도록 하겠습니다.. ^^

@seokho-son seokho-son merged commit 60f2940 into cloud-barista:master May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Abnormal MCIS/VM object can be created
1 participant