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

Regarding response results from the MCI recommendation API #119

Closed
MZC-CSC opened this issue Sep 4, 2024 · 4 comments
Closed

Regarding response results from the MCI recommendation API #119

MZC-CSC opened this issue Sep 4, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@MZC-CSC
Copy link

MZC-CSC commented Sep 4, 2024

What happened
: VM 추천 모델을 받기 위해 How to reproduce it (as minimally and precisely as possible)
: How to run and use the CM-Beetle 문서에 나온 샘플 Data로 {{baseUrl}}/recommendation/mci API를 호출 했습니다.

beetle의 api 응답 결과를 보면 실제 추천된 VM 정보는 없지만 에러 메시지는 없어서 정상 응답처럼 보이는데...
log 내용을 살펴 보면 추천할 모델이 없기 때문에 추천을 못 한 것으로 추정됩니다.

cm-beetle       | 4:52AM WRN pkg/core/recommendation/recommendation.go:193 > no VM spec recommended for the inserted PM/VM with spec (cores: 18, memory (GiB): 244)

What you expected to happen
: 추천 모델 정보 또는 추전 모델이 없을 경우 추천할 VM이 없다는 내용이 있어야 할 것 같습니다.

Anything else we need to know?
:

아래는 Body Data입니다.

{
  "servers": [
    {
      "compute": {
        "os": {
          "os": {
            "name": "linux",
            "vendor": "ubuntu",
            "version": "22.04.4 LTS (Jammy Jellyfish)",
            "release": "22.04",
            "architecture": "x86_64"
          },
          "kernel": {
            "release": "6.5.0-28-generic",
            "version": "#29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  4 14:39:20 UTC 2",
            "architecture": "x86_64"
          },
          "node": {
            "hostname": "cm-web",
            "hypervisor": "",
            "machineid": "0036e4b9-c8b4-e811-906e-000ffee02d5c",
            "timezone": "KST"
          }
        },
        "compute_resource": {
          "cpu": {
            "vendor": "GenuineIntel",
            "model": "Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz",
            "max_speed": 3700,
            "cache": 25344,
            "cpus": 2,
            "cores": 18,
            "threads": 36
          },
          "memory": {
            "type": "DDR4",
            "speed": 2666,
            "size": 262136
          },
          "root_disk": {
            "label": "Windows 11 (TODO: DUMMY DATA)",
            "type": "SSD",
            "size": 50
          },
          "data_disk": [
            {
              "label": "Storage 1 (TODO: DUMMY DATA)",
              "type": "HDD",
              "size": 100
            },
            {
              "label": "Storage 2 (TODO: DUMMY DATA)",
              "type": "HDD",
              "size": 200
            }
          ]
        },
        "connection": null
      },
      "network": {
        "host": {
          "network_interface": [
            {
              "interface": "lo",
              "address": [
                "127.0.0.1/8",
                "::1/128"
              ],
              "gateway": null,
              "mac_address": "",
              "mtu": 65536
            },
            {
              "interface": "eno1",
              "address": [
                "172.29.0.103/24",
                "fe80::a6bf:1ff:fe5a:b11b/64"
              ],
              "gateway": null,
              "mac_address": "a4:bf:01:5a:b1:1b",
              "mtu": 1500
            },
            {
              "interface": "enp24s0f0",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:53:01:58",
              "mtu": 1500
            },
            {
              "interface": "enp175s0f0",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:55:23:8c",
              "mtu": 1500
            },
            {
              "interface": "enp175s0f1",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:55:23:8e",
              "mtu": 1500
            },
            {
              "interface": "enp24s0f1",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:53:01:59",
              "mtu": 1500
            },
            {
              "interface": "enp177s0f0",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:55:1e:04",
              "mtu": 1500
            },
            {
              "interface": "eno2",
              "address": [
                "192.168.110.103/24",
                "fe80::a6bf:1ff:fe5a:b11c/64"
              ],
              "gateway": [
                "192.168.110.254"
              ],
              "mac_address": "a4:bf:01:5a:b1:1c",
              "mtu": 1500
            },
            {
              "interface": "enp26s0f0",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:53:01:6c",
              "mtu": 1500
            },
            {
              "interface": "enp26s0f1",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:53:01:6d",
              "mtu": 1500
            },
            {
              "interface": "enp177s0f1",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:55:1e:06",
              "mtu": 1500
            },
            {
              "interface": "docker0",
              "address": [
                "172.17.0.1/16"
              ],
              "gateway": null,
              "mac_address": "02:42:64:bb:bd:75",
              "mtu": 1500
            }
          ],
          "dns": {
            "dns_server": [
              "1.1.1.1",
              "1.0.0.1"
            ]
          },
          "route": [
            {
              "destination": "0.0.0.0",
              "netmask": "0.0.0.0",
              "next_hop": "192.168.110.254"
            },
            {
              "destination": "172.17.0.0",
              "netmask": "255.255.0.0",
              "next_hop": "docker0"
            },
            {
              "destination": "172.29.0.0",
              "netmask": "255.255.255.0",
              "next_hop": "eno1"
            },
            {
              "destination": "192.168.110.0",
              "netmask": "255.255.255.0",
              "next_hop": "eno2"
            }
          ],
          "firewall_rule": []
        },
        "csp": {
          "name": "",
          "vpc": null,
          "nlb": null,
          "security_group": null
        }
      },
      "gpu": {
        "nvidia": [],
        "drm": [
          {
            "driver_name": "ast",
            "driver_version": "0.1.0",
            "driver_date": "20120228",
            "driver_description": "AST"
          }
        ]
      },
      "storage": {
        "mount_point": {
          "mounted_information": null
        }
      }
    },
    {
      "compute": {
        "os": {
          "os": {
            "name": "linux",
            "vendor": "ubuntu",
            "version": "22.04.4 LTS (Jammy Jellyfish)",
            "release": "22.04",
            "architecture": "x86_64"
          },
          "kernel": {
            "release": "6.5.0-28-generic",
            "version": "#29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  4 14:39:20 UTC 2",
            "architecture": "x86_64"
          },
          "node": {
            "hostname": "cm-nfs",
            "hypervisor": "",
            "machineid": "00a9f3d4-74b6-e811-906e-000ffee02d5c",
            "timezone": "KST"
          }
        },
        "compute_resource": {
          "cpu": {
            "vendor": "GenuineIntel",
            "model": "Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz",
            "max_speed": 3700,
            "cache": 25344,
            "cpus": 2,
            "cores": 18,
            "threads": 36
          },
          "memory": {
            "type": "DDR4",
            "speed": 2666,
            "size": 262136
          },
          "root_disk": {
            "label": "Windows 11 (TODO: DUMMY DATA)",
            "type": "SSD",
            "size": 50
          },
          "data_disk": [
            {
              "label": "Storage 1 (TODO: DUMMY DATA)",
              "type": "HDD",
              "size": 100
            },
            {
              "label": "Storage 2 (TODO: DUMMY DATA)",
              "type": "HDD",
              "size": 200
            }
          ]
        },
        "connection": null
      },
      "network": {
        "host": {
          "network_interface": [
            {
              "interface": "lo",
              "address": [
                "127.0.0.1/8",
                "::1/128"
              ],
              "gateway": null,
              "mac_address": "",
              "mtu": 65536
            },
            {
              "interface": "enp175s0f0",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:47:70:f0",
              "mtu": 1500
            },
            {
              "interface": "eno1",
              "address": [
                "172.29.0.102/24",
                "fe80::a6bf:1ff:fe5a:b003/64"
              ],
              "gateway": null,
              "mac_address": "a4:bf:01:5a:b0:03",
              "mtu": 1500
            },
            {
              "interface": "enp24s0f0",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:52:fa:e8",
              "mtu": 1500
            },
            {
              "interface": "enp175s0f1",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:47:70:f2",
              "mtu": 1500
            },
            {
              "interface": "enp24s0f1",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:52:fa:e9",
              "mtu": 1500
            },
            {
              "interface": "enp177s0f0",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:47:80:0c",
              "mtu": 1500
            },
            {
              "interface": "enp177s0f1",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:47:80:0e",
              "mtu": 1500
            },
            {
              "interface": "enp26s0f0",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:53:01:54",
              "mtu": 1500
            },
            {
              "interface": "eno2",
              "address": [
                "192.168.110.102/24",
                "fe80::a6bf:1ff:fe5a:b004/64"
              ],
              "gateway": [
                "192.168.110.254"
              ],
              "mac_address": "a4:bf:01:5a:b0:04",
              "mtu": 1500
            },
            {
              "interface": "enp26s0f1",
              "address": null,
              "gateway": null,
              "mac_address": "b4:96:91:53:01:55",
              "mtu": 1500
            },
            {
              "interface": "docker0",
              "address": [
                "172.17.0.1/16",
                "fe80::42:ddff:fe60:6f36/64"
              ],
              "gateway": null,
              "mac_address": "02:42:dd:60:6f:36",
              "mtu": 1500
            },
            {
              "interface": "br-d6538831e60d",
              "address": [
                "172.20.0.1/16",
                "fe80::42:47ff:fedd:b497/64"
              ],
              "gateway": null,
              "mac_address": "02:42:47:dd:b4:97",
              "mtu": 1500
            },
            {
              "interface": "veth22e63e1",
              "address": [
                "fe80::b8c9:62ff:fea9:871/64"
              ],
              "gateway": null,
              "mac_address": "ba:c9:62:a9:08:71",
              "mtu": 1500
            },
            {
              "interface": "vethc755782",
              "address": [
                "fe80::2078:1cff:fea6:3617/64"
              ],
              "gateway": null,
              "mac_address": "22:78:1c:a6:36:17",
              "mtu": 1500
            },
            {
              "interface": "veth189cac2",
              "address": [
                "fe80::7c29:acff:fe6f:7414/64"
              ],
              "gateway": null,
              "mac_address": "7e:29:ac:6f:74:14",
              "mtu": 1500
            }
          ],
          "dns": {
            "dns_server": [
              "1.1.1.1",
              "1.0.0.1"
            ]
          },
          "route": [
            {
              "destination": "0.0.0.0",
              "netmask": "0.0.0.0",
              "next_hop": "192.168.110.254"
            },
            {
              "destination": "172.17.0.0",
              "netmask": "255.255.0.0",
              "next_hop": "docker0"
            },
            {
              "destination": "172.20.0.0",
              "netmask": "255.255.0.0",
              "next_hop": "br-d6538831e60d"
            },
            {
              "destination": "172.29.0.0",
              "netmask": "255.255.255.0",
              "next_hop": "eno1"
            },
            {
              "destination": "192.168.110.0",
              "netmask": "255.255.255.0",
              "next_hop": "eno2"
            }
          ],
          "firewall_rule": []
        },
        "csp": {
          "name": "",
          "vpc": null,
          "nlb": null,
          "security_group": null
        }
      },
      "gpu": {
        "nvidia": [],
        "drm": [
          {
            "driver_name": "ast",
            "driver_version": "0.1.0",
            "driver_date": "20120228",
            "driver_description": "AST"
          }
        ]
      },
      "storage": {
        "mount_point": {
          "mounted_information": null
        }
      }
    }
  ]
}

아래는 API 응답 결과입니다.

{
    "name": "mmci01",
    "installMonAgent": "no",
    "label": "rehosted-mci",
    "systemLabel": "",
    "description": "A cloud infra recommended by CM-Beetle",
    "vm": []
}

아래는 로그 내용입니다.

cm-beetle       | 2024/09/03 04:52:59.223126 WARN RESTY Using Basic Auth in HTTP mode is not secure, use HTTPS
cb-tumblebug    | 4:52AM DBG src/core/infra/recommendation.go:111 > [Filtering specs]
cb-tumblebug    | 4:52AM INF src/core/resource/spec.go:390 > Filtering by providerName: aws
cb-tumblebug    | 4:52AM INF src/core/resource/spec.go:390 > Filtering by regionName: ap-northeast-2
cb-tumblebug    | 4:52AM INF src/api/rest/server/middlewares/custom-middleware/custom-middleware.go:62 > request URI=/tumblebug/mciRecommendVm bytes_in=471 bytes_out=3 client_ip=172.18.0.14 id=1725339179225590647 latency_human=1.371202ms method=POST status=200
cm-beetle       | 4:52AM WRN pkg/core/recommendation/recommendation.go:193 > no VM spec recommended for the inserted PM/VM with spec (cores: 18, memory (GiB): 244)
cm-beetle       | 2024/09/03 04:52:59.229126 WARN RESTY Using Basic Auth in HTTP mode is not secure, use HTTPS
cb-tumblebug    | 4:52AM DBG src/core/infra/recommendation.go:111 > [Filtering specs]
cb-tumblebug    | 4:52AM INF src/core/resource/spec.go:390 > Filtering by providerName: aws
cb-tumblebug    | 4:52AM INF src/core/resource/spec.go:390 > Filtering by regionName: ap-northeast-2
cb-tumblebug    | 4:52AM INF src/api/rest/server/middlewares/custom-middleware/custom-middleware.go:62 > request URI=/tumblebug/mciRecommendVm bytes_in=471 bytes_out=3 client_ip=172.18.0.14 id=1725339179229545600 latency_human="936.566µs" method=POST status=200
cm-beetle       | 4:52AM WRN pkg/core/recommendation/recommendation.go:193 > no VM spec recommended for the inserted PM/VM with spec (cores: 18, memory (GiB): 244)
cm-beetle       | 4:52AM INF pkg/api/rest/middlewares/zerologger.go:56 > request URI=/beetle/recommendation/mci bytes_in=12845 bytes_out=144 id= latency_human=9.617665ms method=POST remote_ip=106.247.225.50 status=200

Environment

  • Source version or branch: edge

  • OS: docker container

  • Others:
    docker 기반으로 테스트했으며 tumblebug에서 MCIS가 MCI로 변경되어서 9월 2일과 3일 기준 가장 최신 도커 이미지들로 진행했었습니다.
    Proposed solution
    : 에러가 발생한 어제까지 테스트했을 때에는 cb-spider의 adminweb에서 등록된 데이터로만 테스트했었는데...
    오늘 전체 데이터 파일을 삭제 후 텀블벅의 init.sh로 DB를 구축 후 테스트했더니 정상적으로 결과가 나옵니다.

    MCI 추천 방식에서 텀블벅이 사용하는 커넥션들을 비롯한 리소스들의 네이밍 규칙 등의 종속성과 관련이 있다면 관련 가이드 보완이
    필요해 보이며, 어제 테스트처럼 텀블벅에서 에러를 리턴 받았을 때 사용자에게는 정상적으로 응답되는 현상도 있기에 리포팅해 놓습니다.

Any other context
:

@MZC-CSC MZC-CSC added the bug Something isn't working label Sep 4, 2024
@yunkon-kim
Copy link
Member

@MZC-CSC 테스트 및 개선이 필요한 사항들을 공유해주셔서 감사합니다.

보완 후, pre-release 찍어서 공유 드리겠습니다.

(참고 - Plan)
Tumblebug pre-release -> Beetle 통합 및 개선 -> Beetle pre-release 및 공유 (예정: ~ 9/9(월)까지)

@yunkon-kim
Copy link
Member

@MZC-CSC

추천을 요청했으나 추천할 모델이 없는 경우에 대해 현황을 공유 드립니다.

추천할 모델이 없는 경우는 시스템 에러는 아닌 것이라 생각됩니다. 그래서 성공에 대한 상태 코드 200으로 응답하고자 합니다.
API 사용자가 추천된 모델이 없음을 확인하고 처리하는 방식을 지원하고자, Response Body에 Status 를 추가해둔 상태 입니다.
현재는 "none", "partial", "ok" 세 가지 상태가 지원됩니다.

Tumbleubug 초기 설정 (init/init.sh)은 Beetle 동작에 중요한 부분입니다. 향후 가이드를 확실히 보강해 놓도록 하겠습니다 :-)

@yunkon-kim
Copy link
Member

@seokho-son @sykim-etri

관련하여 추가 의견 또는 더 나은 방법을 알고 계시면 공유하여 주시기 바랍니다.

@yunkon-kim
Copy link
Member

Resolved by #105 #124

Honeybee에 인프라 형상 정보(Raw)를 제공하는 API와 별개로,
on-premise model 정보(Refined)를 제공하는 API 추가를 부탁드린 상태로, 이후 관련 테스트 진행 예정입니다. 참고하시면 될 것 같습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants