GitHub user leduyquy added a comment to the discussion: Host stuck state: 
Alert, When add Secondary storage

I don't use KVM migration so I didn't install it, Other hosts also do not need 
to install this package and it still works fine. After I installed it, the log 
also no longer has the alert, but the host is still stuck in the alert.

Log on agent:

> 2025-04-11 16:26:49,589 INFO  [cloud.agent.Agent] (Agent-Handler-2:[]) 
> (logid:) Reconnecting to host:<IP managerment>
> 2025-04-11 16:26:49,590 INFO  [utils.nio.NioClient] (Agent-Handler-2:[]) 
> (logid:) Connecting to <IP managerment>:8250
> 2025-04-11 16:26:49,591 INFO  [utils.nio.Link] (Agent-Handler-2:[]) (logid:) 
> Conf file found: /etc/cloudstack/agent/agent.properties
> 2025-04-11 16:26:49,677 INFO  [utils.nio.NioClient] (Agent-Handler-2:[]) 
> (logid:) SSL: Handshake done
> 2025-04-11 16:26:49,677 INFO  [utils.nio.NioClient] (Agent-Handler-2:[]) 
> (logid:) Connected to <IP managerment>:8250
> 2025-04-11 16:26:49,706 INFO  [utils.linux.KVMHostInfo] (Agent-Handler-1:[]) 
> (logid:) Fetching CPU speed from command "lscpu".
> 2025-04-11 16:26:49,740 ERROR [utils.linux.KVMHostInfo] (Agent-Handler-1:[]) 
> (logid:) Unable to retrieve the CPU speed from lscpu. 
> java.lang.NullPointerException: Cannot invoke "String.trim()" because "in" is 
> null
>       at 
> java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838)
>       at 
> java.base/jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
>       at java.base/java.lang.Float.parseFloat(Float.java:476)
>       at 
> org.apache.cloudstack.utils.linux.KVMHostInfo.getCpuSpeedFromCommandLscpu(KVMHostInfo.java:141)
>       at 
> org.apache.cloudstack.utils.linux.KVMHostInfo.getCpuSpeed(KVMHostInfo.java:116)
>       at 
> org.apache.cloudstack.utils.linux.KVMHostInfo.getHostInfoFromLibvirt(KVMHostInfo.java:196)
>       at 
> org.apache.cloudstack.utils.linux.KVMHostInfo.<init>(KVMHostInfo.java:69)
>       at 
> com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.initialize(LibvirtComputingResource.java:3672)
>       at com.cloud.agent.Agent.sendStartup(Agent.java:458)
>       at com.cloud.agent.Agent$ServerHandler.doTask(Agent.java:1128)
>       at com.cloud.utils.nio.Task.call(Task.java:83)
>       at com.cloud.utils.nio.Task.call(Task.java:29)
>       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
>       at java.base/java.lang.Thread.run(Thread.java:840)
> 
> 2025-04-11 16:26:49,741 INFO  [utils.linux.KVMHostInfo] (Agent-Handler-1:[]) 
> (logid:) Fetching CPU speed from file 
> [/sys/devices/system/cpu/cpu0/cpufreq/base_frequency].
> 2025-04-11 16:26:49,742 INFO  [utils.linux.KVMHostInfo] (Agent-Handler-1:[]) 
> (logid:) Retrieved value [2000000] from file 
> [/sys/devices/system/cpu/cpu0/cpufreq/base_frequency]. This corresponds to a 
> CPU speed of [2000] MHz.
> 2025-04-11 16:26:49,742 INFO  [utils.linux.KVMHostInfo] (Agent-Handler-1:[]) 
> (logid:) Fetching host CPU arch
> 2025-04-11 16:26:49,753 INFO  [kvm.resource.LibvirtComputingResource] 
> (Agent-Handler-1:[]) (logid:) Host uses control group [cgroup2fs].
> 2025-04-11 16:26:49,753 INFO  [kvm.resource.LibvirtComputingResource] 
> (Agent-Handler-1:[]) (logid:) Calculating the max shares of the host.
> 2025-04-11 16:26:49,753 INFO  [kvm.resource.LibvirtComputingResource] 
> (Agent-Handler-1:[]) (logid:) The max shares of the host is [64000].
> 2025-04-11 16:26:49,898 INFO  [kvm.storage.LibvirtStorageAdaptor] 
> (Agent-Handler-1:[]) (logid:) Attempting to create storage pool 
> 4952e569-130a-4dd8-817c-78f945323cfa (Filesystem) in libvirt
> 2025-04-11 16:26:49,901 INFO  [kvm.storage.LibvirtStorageAdaptor] 
> (Agent-Handler-1:[]) (logid:) Found existing defined storage pool 
> 4952e569-130a-4dd8-817c-78f945323cfa, using it.
> 2025-04-11 16:26:49,902 INFO  [kvm.storage.LibvirtStorageAdaptor] 
> (Agent-Handler-1:[]) (logid:) Trying to fetch storage pool 
> 4952e569-130a-4dd8-817c-78f945323cfa from libvirt
> 2025-04-11 16:26:49,947 INFO  [cloud.agent.Agent] (Agent-Handler-2:[]) 
> (logid:) Process agent startup answer, agent id = 0
> 2025-04-11 16:26:49,949 INFO  [cloud.agent.Agent] (Agent-Handler-2:[]) 
> (logid:) Startup Response Received: agent id = 0
> 2025-04-11 16:26:50,236 WARN  [cloud.agent.Agent] (Agent-Handler-1:[]) 
> (logid:6ffc30f3) Unable to send response: null






GitHub link: 
https://github.com/apache/cloudstack/discussions/10718#discussioncomment-12839043

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscr...@cloudstack.apache.org

Reply via email to