Skip to content

core->control cpu 스탯 이슈 #27

@kwonkwonn

Description

@kwonkwonn

func (c *CoreClient) GetVMCpuInfo(ctx context.Context, uuid structure.UUID) (model.CoreMachineCpuInfoResponse, error) {

여기에 cpu 정보를 받아오는 함수가 정의되어 있습니다.

"init":

return fmt.Errorf("failed to get Disk info for core %s:%d: %w", currentCore.IP, currentCore.Port, err)

Init에서 cpu를 받아오는 함수와 변수를 초기화하지 않은 상태에서 cpu를 읽으려고 해서 이상한 값이 읽히는 게 아닌가 싶습니다.

추가로, coreInfo 구조체와 init에서의 cpu 비교방식이 달라서, control에서 총 vcpu와 할당된 vcpu를 원하는건지 말씀해주시면 코어에서
vcpu total, vcpu used 이런 값 추가해서 반환하고 컨트롤 코드 수정하겠습니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions