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

GCP, Debian 10 VM에 대해 "failed to get package. osType DEBIAN not supported" 에러 발생 #139

Closed
jihoon-seo opened this issue Oct 24, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@jihoon-seo
Copy link
Member

What happened
:

[GCP VM 정보]

[Agent install request body]
POST http://localhost:9090/dragonfly/agent

{
  "ns_id": "ns01",
  "mcis_id": "jhseo",
  "vm_id": "gcp-us-central1-1",
  "public_ip": "34.134.240.49",
  "port": "22",
  "user_name": "cb-user",
  "ssh_key": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----\n",
  "cspType": "gcp",
  "service_type": "vm"
}

[Agent install response body]

{
  "message": "failed to get package. osType DEBIAN not supported"
}

What you expected to happen
:

How to reproduce it (as minimally and precisely as possible)
:

Anything else we need to know?
:

Environment

Proposed solution
:

Any other context
:

@jihoon-seo jihoon-seo added the bug Something isn't working label Oct 24, 2022
@pjini
Copy link
Contributor

pjini commented Oct 27, 2022

@jihoon-seo @seokho-son @powerkimhub
안녕하세요~
우선 해당 이슈 관련해서는 v0.6.7 태그/프리릴리스에서 수정 완료했습니다~
내부적으로 에이전트 설치 파일을 제공할 때 osType에 따라 파싱하는 부분에서 기능이 누락된 것이 있어서 추가해두었습니다.
확인 부탁드려요~

관련 PR: #142
관련 태그/프릴리스: v0.6.7

이슈는 확인하시고 Close 시키도록 하겠습니다~

@jihoon-seo
Copy link
Member Author

@pjini
위 본문과 동일하게 agent 설치 요청을 해 보니
"failed to get package. osType DEBIAN not supported" 에러는 발생하지 않으나

cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:25 sshrun.go:133, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.SSHRun() - call SSHRun() 
cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:25 sshrun.go:41, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.Connect() - call Connect() 
cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:27 sshrun.go:90, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.RunCommand() - call RunCommand() 
cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:27 sshrun.go:84, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.Close() - call Close() 
cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:27 sshrun.go:133, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.SSHRun() - call SSHRun() 
cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:27 sshrun.go:41, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.Connect() - call Connect() 
cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:29 sshrun.go:90, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.RunCommand() - call RunCommand() 
cb-dragonfly               | E: Package 'mysql-server' has no installation candidate
cb-dragonfly               | ./install_mcis_script.sh: line 24: mysql: command not found
cb-dragonfly               | ./install_mcis_script.sh: line 25: mysql: command not found
cb-dragonfly               | ./install_mcis_script.sh: line 26: mysql: command not found
cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:33 sshrun.go:84, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.Close() - call Close() 
cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:33 sshrun.go:133, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.SSHRun() - call SSHRun() 
cb-dragonfly               | [CLOUD-BARISTA].[INFO]: 2022-11-01 14:36:33 sshrun.go:41, github.com/cloud-barista/cb-spider/cloud-control-manager/vm-ssh.Connect() - call Connect() 

DF 로그에 mysql 관련 에러가 찍혔고
Agent install request에 대한 response body 로는 #138 과 동일하게

{
  "message": "failed to change telegraf permission, err=Process exited with status 1"
}

이 출력되었습니다.

한번 더 확인 부탁드립니다. 😊

[SP, TB, DF 버전]

  • CB-Spider: d238e20 (Tue Nov 1 13:34:45 2022 +0900)
  • CB-Tumblebug: v0.6.14
  • CB-Dragonfly: v0.6.7

@Jin-Whee-Park
Copy link
Member

Debian 10 OS 기반 에이전트 설치 기능 테스트 결과 공유드립니다.
[테스트 CSP]

  • AWS, Azure

[테스트 환경]

  • DF 버전: 0.6.9
  • 구동 환경: Docker-compose

[테스트 방법]

  • Spider Admin 웹 콘솔 기반 VM 생성
  • Postman API 기반 에이전트 설치 기능 테스트

[테스트 결과]

  • 에이전트 설치: 정상
  • 모니터링 메트릭 수집: 정상

[Azure VM 배포 상태]
스크린샷, 2022-11-08 12-15-51
스크린샷, 2022-11-08 12-15-11

[Azure 에이전트 설치 API]
스크린샷, 2022-11-08 12-14-58

[Azure 모니터링 수집 로그]
스크린샷, 2022-11-08 12-14-39

[Azure Chronograf 수집 상태]
스크린샷, 2022-11-08 12-20-36

@Jin-Whee-Park
Copy link
Member

추가적으로, 에이전트 설치 로직 중 Debian 관련 로직이 수정된 부분은 DF 0.6.7 <> 0.6.9 사이에 없습니다.

@seokho-son
Copy link
Member

seokho-son commented Nov 8, 2022

@Jin-Whee-Park 안녕하세요. AWS, Azure 에 대한 0.6.9 테스트 결과 공유 감사합니다.

다만, @jihoon-seo 께서 공유해주신, GCP의 경우에는 문제가 있을 수도 있겠다는 생각이 듭니다.

공유해주신 에러 메시지를 보면,

cb-dragonfly               | E: Package 'mysql-server' has no installation candidate
cb-dragonfly               | ./install_mcis_script.sh: line 24: mysql: command not found

라고 되어 있는 데,

테스트된 GCP의 이미지를 기준으로 mysql을 패키지를 설치하기 위한 스크립트 코드가 정상 동작하지 않았을 가능성이 있어 보입니다. (mysql 다운로드에 문제가 있을 가능성. apt 등의 업데이트가 막혀있을 가능성 등등)

아마도 이러한 문제는 GCP 뿐만 아니라,
다양한 CSP 및 OS 이미지들도 테스트하다보면
발생할 수 있는 문제가 아닐까 싶습니다.

확인 및 일반적으로 에러가 나지 않도록 대응이 필요하지 않을까 문의 드립니다.

@Jin-Whee-Park
Copy link
Member

@seokho-son @jihoon-seo
안녕하세요.
0.6.10 프리릴리스에서 Debian, Ubuntu 에이전트 설치 정상 설치를 위해 mysql-server 패키지 설치 부분을
mariadb-server로 수정 후 설치 테스트 및 정상 구동 확인했습니다.

여전히 GCP Debian의 경우 @jihoon-seo 님께서 리포트 해주신
{
"message": "failed to change telegraf permission, err=Process exited with status 1"
}

에러는 계정 문제로 인해 테스트해보진 못했지만 AWS, AZURE에서는 정상 설치 확인한 상태입니다.

@jihoon-seo
Copy link
Member Author

Debian 관련 에러는 v0.6.7 에서 처리가 되었고,
말씀드린 다른 이슈는 #138 과 동일하므로
이 이슈는 제가 close 처리 하도록 하겠습니다.. ㅎㅎ

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

4 participants