Hudratronium opened a new issue, #6680:
URL: https://github.com/apache/cloudstack/issues/6680

   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete 
the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   CS Agent
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main 
branch.
   -->
   
   ~~~
   4.17.0.1
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, 
advanced networking, etc.  N/A otherwise
   -->
   
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   Host OS:     Ubuntu 20.04.5 LTS
   Hypervisor: KVM
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   After upgradeing existing agents from 4.16.1 to 4.17.0.1 the retrieval of 
the CPU Speed fails. Nevertheless the Agents reports CPU Speeds which seem to 
be the actual running speed of the cores, not the potentially max. availeable 
speed of the CPU.
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   
   Upgarde existing CS Agent from 4.16.1 to 4.17.0.1
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   CPU Speeds are retrieved for the max. availeable CPU speeds
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   Agent is reporting "live" CPU Speed; Error out of agent.log
   
   2022-08-28 13:36:51,849 INFO  [utils.linux.KVMHostInfo] 
(Agent-Handler-1:null) (logid:) Fetching CPU speed from command "lscpu".
   2022-08-28 13:36:51,858 ERROR [utils.linux.KVMHostInfo] 
(Agent-Handler-1:null) (logid:) Unable to retrieve the CPU speed from lscpu.
   java.lang.NullPointerException
           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:455)
           at 
org.apache.cloudstack.utils.linux.KVMHostInfo.getCpuSpeedFromCommandLscpu(KVMHostInfo.java:107)
           at 
org.apache.cloudstack.utils.linux.KVMHostInfo.getCpuSpeed(KVMHostInfo.java:87)
           at 
org.apache.cloudstack.utils.linux.KVMHostInfo.getHostInfoFromLibvirt(KVMHostInfo.java:133)
           at 
org.apache.cloudstack.utils.linux.KVMHostInfo.<init>(KVMHostInfo.java:53)
           at 
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.initialize(LibvirtComputingResource.java:3373)
           at com.cloud.agent.Agent.sendStartup(Agent.java:441)
           at com.cloud.agent.Agent$ServerHandler.doTask(Agent.java:1099)
           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:1128)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
           at java.base/java.lang.Thread.run(Thread.java:829)
   2022-08-28 13:36:51,859 INFO  [utils.linux.KVMHostInfo] 
(Agent-Handler-1:null) (logid:) Fetching CPU speed from file 
[/sys/devices/system/cpu/cpu0/cpufreq/base_frequency].
   2022-08-28 13:36:51,860 ERROR [utils.linux.KVMHostInfo] 
(Agent-Handler-1:null) (logid:) Unable to retrieve the CPU speed from file 
[/sys/devices/system/cpu/cpu0/cpufreq/base_frequency]
   java.io.FileNotFoundException: 
/sys/devices/system/cpu/cpu0/cpufreq/base_frequency (No such file or directory)
           at java.base/java.io.FileInputStream.open0(Native Method)
           at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
           at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
           at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
           at java.base/java.io.FileReader.<init>(FileReader.java:60)
           at 
org.apache.cloudstack.utils.linux.KVMHostInfo.getCpuSpeedFromFile(KVMHostInfo.java:118)
           at 
org.apache.cloudstack.utils.linux.KVMHostInfo.getCpuSpeed(KVMHostInfo.java:92)
           at 
org.apache.cloudstack.utils.linux.KVMHostInfo.getHostInfoFromLibvirt(KVMHostInfo.java:133)
           at 
org.apache.cloudstack.utils.linux.KVMHostInfo.<init>(KVMHostInfo.java:53)
           at 
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.initialize(LibvirtComputingResource.java:3373)
           at com.cloud.agent.Agent.sendStartup(Agent.java:441)
           at com.cloud.agent.Agent$ServerHandler.doTask(Agent.java:1099)
           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:1128)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
           at java.base/java.lang.Thread.run(Thread.java:829)
   2022-08-28 13:36:51,860 INFO  [utils.linux.KVMHostInfo] 
(Agent-Handler-1:null) (logid:) Using the value [1803] provided by Libvirt.
   ~~~
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to