Skip to content

CloudStack agent trims Host.OS in the response to management server #7547

@yadvr

Description

@yadvr

CloudStack agent trims the output for Host.OS from the version.sh (see below). In case of RHEL KVM hosts, CloudStack thinks they are "Red" OS and not "Red Hat Enterprise Linux", and doesn't allow the host to be added to an existing cluster.

# /usr/share/cloudstack-common/scripts/vm/hypervisor/versions.sh
Host.OS=Red Hat Enterprise Linux
Host.OS.Version=9.2
Host.OS.Kernel.Version=5.14.0-284.11.1.el9_2.x86_64

This causes NPE at:

2023-05-23 13:29:42,728 DEBUG [c.c.a.m.AgentManagerImpl] (AgentConnectTaskPool-348:ctx-f5b5e351) (logid:36272aee) Failed to handle host connection:
java.lang.NullPointerException
        at com.cloud.hypervisor.kvm.discoverer.LibvirtServerDiscoverer.createHostVOForConnectedAgent(LibvirtServerDiscoverer.java:473)
        at com.cloud.resource.ResourceManagerImpl.dispatchToStateAdapters(ResourceManagerImpl.java:1997)

And the Host.OS in the cluster's first host's DB detail doesn't match that of the host being added:

https://github.com/apache/cloudstack/blob/4.18/server/src/main/java/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java#L471

Without DEBUG logs enabled in cloudstack-agent it may read as if libvirt is having issues.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
RHEL9 + ACS 4.18+

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions