benj-n opened a new issue, #7000:
URL: https://github.com/apache/cloudstack/issues/7000

   <!--
   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.
   -->
   ~~~
   Prometheus integration
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main 
branch.
   -->
   
   ~~~
   4.17.X
   ~~~
   
   ##### 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
   -->
   Irrelevant.
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   The prometheus integration returns inconsistent capacity values when a host 
is in "maintenance" and cloudstack-management service is restarted.
   
   ##### 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 -->
   ~~~
   1. Set "maintenance" status for a host
   2. In database, the capacity rows are deleted in the op_host_capacity table, 
for the said host
   3. Prometheus integration returns capacities with value=0 
   4. Restart cloudstack-management service while the host is still in 
maintenance
   5. In database, table op_host_capacity is populated, with capacity_state = 
Disabled
   6. Prometheus integration now returns capacity values from 
used/total_capacity columns, ignoring the capacity_state
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   Prometheus integration returns capacity values=0 when the capacity is 
missing (eg. host is in maintenance) or when the capacity_state is set at 
Disabled (eg. host in maintenance and service is restarted)
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   Prometheus integration returns capacity values all the time as long as the 
used/total_capacity columns exist, ignoring when the capacity_state is Disabled.
   ~~~
   


-- 
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: commits-unsubscr...@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to