You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/03/11 12:11:24 UTC

[GitHub] [cloudstack] shwstppr opened a new pull request #4795: api: cpu values with overprovisioning in host metrics response

shwstppr opened a new pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795


   ### Description
   
   Fixes #4778
   
   Adds new response key - `cpuallocatedghzwithoverprovisioning` in listHostsMetrics response
   Enables returning `cpuallocatedwithoverprovisioning` in the response.
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
   
   With cmk,
   
   ```
   (localcloud) SBCM5> > list hostsmetrics id=4937aa4f-6f27-4dc8-af70-2335279edf27 
   {
     "count": 1,
     "host": [
       {
         "capabilities": "hvm,snapshot",
         "clusterid": "881c01ec-7a4b-4c55-af5c-d53de5880b5e",
         "clustername": "p1-c1",
         "clustertype": "CloudManaged",
         "cpuallocated": "7.09%",
         "cpuallocateddisablethreshold": false,
         "cpuallocatedghz": "0.50 Ghz",
         "cpuallocatedghzwithoverprovisioning": "0.25 Ghz",
         "cpuallocatedthreshold": false,
         "cpuallocatedwithoverprovisioning": "3.55%",
         "cpunumber": 3,
         "cpusockets": 3,
         "cpuspeed": 2350,
         "cputotalghz": "7.05 Ghz (x 2.0)",
         "cpuwithoverprovisioning": "14100",
         "created": "2021-03-03T06:09:26+0000",
         "details": {
           "Host.OS": "CentOS",
           "Host.OS.Kernel.Version": "3.10.0-957.12.2.el7.x86_64",
           "Host.OS.Version": "7.6.1810",
           "com.cloud.network.Networks.RouterPrivateIpStrategy": "HostLocal",
           "secured": "true"
         },
         "events": "PingTimeout; AgentDisconnected; AgentConnected; Ready; ShutdownRequested; Ping; ManagementServerDown; HostDown",
         "hahost": false,
         "hostha": {
           "haenable": false,
           "hastate": "Disabled"
         },
         "hosttags": "test,ha",
         "hypervisor": "KVM",
         "id": "4937aa4f-6f27-4dc8-af70-2335279edf27",
         "instances": "0 / 0",
         "ipaddress": "10.10.3.146",
         "lastpinged": "1970-01-19T06:13:21+0000",
         "managementserverid": "2bb26158-495c-472e-865f-d24205d2befc",
         "memoryallocated": 268435456,
         "memoryallocateddisablethreshold": false,
         "memoryallocatedgb": "0.25 GB",
         "memoryallocatedthreshold": false,
         "memorytotal": 7277121536,
         "memorytotalgb": "6.78 GB (x 1.0)",
         "name": "pr4710-t3640-kvm-centos7-kvm1",
         "outofbandmanagement": {
           "enabled": false,
           "powerstate": "Disabled"
         },
         "podid": "496029eb-411a-4736-954d-73d5a8d15e56",
         "podname": "Pod1",
         "powerstate": "Disabled",
         "resourcestate": "Enabled",
         "state": "Connecting",
         "type": "Routing",
         "ueficapability": false,
         "version": "4.15.1.0-SNAPSHOT",
         "zoneid": "3f4d015c-7d6b-4b5e-86b0-79552910f77b",
         "zonename": "pr4710-t3640-kvm-centos7"
       }
     ]
   }
   ```
   


----------------------------------------------------------------
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.

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



[GitHub] [cloudstack] shwstppr commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-800986762


   @DaanHoogland not sure if we really need to change anything in terms of memory,
   ```
         "memoryallocated": 268435456,
         "memoryallocateddisablethreshold": false,
         "memoryallocatedgb": "0.25 GB",
         "memoryallocatedthreshold": false,
         "memorytotal": 7277121536,
         "memorytotalgb": "6.78 GB (x 1.0)"
   ```
   `memorytotalgb` mentions overcommit ratio here and unlike cpu `memoryallocated` is giving a bytes value and not a percentage.
   Let me know if you see any improvement here.
   


----------------------------------------------------------------
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-824685499


   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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.

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



[GitHub] [cloudstack] DaanHoogland edited a comment on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
DaanHoogland edited a comment on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-801877730


   > @DaanHoogland not sure if we really need to change anything in terms of memory,
   > 
   > ```
   >       "memoryallocated": 268435456,
   >       "memoryallocateddisablethreshold": false,
   >       "memoryallocatedgb": "0.25 GB",
   >       "memoryallocatedthreshold": false,
   >       "memorytotal": 7277121536,
   >       "memorytotalgb": "6.78 GB (x 1.0)"
   > ```
   > 
   > `memorytotalgb` mentions overcommit ratio here and unlike cpu `memoryallocated` is giving a bytes value and not a percentage.
   > Let me know if you see any improvement here.
   
   Yes, but we have an inconsistency, `memorytotalgb` and `cputotalghz` have inconsistent meanings. That was the reason to add the `-withoverprovisioning`, if i remember correctly.


-- 
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.

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



[GitHub] [cloudstack] rhtyd merged pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795


   


-- 
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-796714355


   @shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]


----------------------------------------------------------------
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-796727877


   Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 91


----------------------------------------------------------------
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-824732202


   @shwstppr a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
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.

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



[GitHub] [cloudstack] shwstppr commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-810864586


   @shwstppr thread on dev@ here, https://lists.apache.org/thread.html/r9833add572ddd7303c2a523c833a8c863e8d272db268927a7ca9b525%40%3Cdev.cloudstack.apache.org%3E


-- 
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.

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



[GitHub] [cloudstack] rhtyd commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-824685207


   @blueorangutan package


-- 
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.

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



[GitHub] [cloudstack] shwstppr commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-824731865


   @blueorangutan test


-- 
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-797618337


   <b>[S] Trillian test result (tid-92)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 35368 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4795-t92-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
   Smoke tests completed. 85 look OK, 1 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_migrate_VM_and_root_volume | `Error` | 79.55 | test_vm_life_cycle.py
   test_02_migrate_VM_with_two_data_disks | `Error` | 50.17 | test_vm_life_cycle.py
   


----------------------------------------------------------------
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.

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



[GitHub] [cloudstack] rhtyd commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-826611135


   @shwstppr is this ready for review/merging?


-- 
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.

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-799497951


   @shwstppr are you going to extend this as you sugested in #4778? or is it ready now? (cgltm)


----------------------------------------------------------------
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-825148039


   <b>Trillian test result (tid-503)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 32079 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4795-t503-kvm-centos7.zip
   Smoke tests completed. 87 look OK, 0 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-823859889


   @shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-797264084


   @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests [S]


----------------------------------------------------------------
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.

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



[GitHub] [cloudstack] rhtyd commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-797263842


   @blueorangutan test 


----------------------------------------------------------------
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.

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



[GitHub] [cloudstack] rhtyd commented on a change in pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#discussion_r598459209



##########
File path: plugins/metrics/src/main/java/org/apache/cloudstack/response/HostMetricsResponse.java
##########
@@ -43,6 +44,10 @@
     @Param(description = "the total cpu allocated in Ghz")
     private String cpuAllocated;
 
+    @SerializedName("cpuallocatedghzwithoverprovisioning")
+    @Param(description = "the total cpu allocated in Ghz after applying the cpu.overprovisioning.factor", since="4.15.1")
+    private String cpuAllocatedWithOverprovisioning;

Review comment:
       I think allocated cpu metric should involve overprovisioning (if the UI is not doing that); if the overprovisioning factor is not being considered is the cpu alllocated same as usage?




-- 
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-824699282


   Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 447


-- 
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.

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



[GitHub] [cloudstack] shwstppr commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-796713892


   @blueorangutan package


----------------------------------------------------------------
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.

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



[GitHub] [cloudstack] shwstppr commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
shwstppr commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-823859317


   @blueorangutan package


-- 
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.

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



[GitHub] [cloudstack] rhtyd commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-810036049


   ping @shwstppr cc @davidjumani 


-- 
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.

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



[GitHub] [cloudstack] rhtyd commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-805755117


   @shwstppr can you start a discussion thread on dev@ to get feedback from others, I think all allocated metrics should include/consider the overprovisioning factor.


-- 
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.

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4795: api/server: cpu, memory values with overprovisioning in metrics response

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-823881645


   Packaging result: :heavy_check_mark: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 444


-- 
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.

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4795: api: cpu values with overprovisioning in host metrics response

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4795:
URL: https://github.com/apache/cloudstack/pull/4795#issuecomment-801877730


   > @DaanHoogland not sure if we really need to change anything in terms of memory,
   > 
   > ```
   >       "memoryallocated": 268435456,
   >       "memoryallocateddisablethreshold": false,
   >       "memoryallocatedgb": "0.25 GB",
   >       "memoryallocatedthreshold": false,
   >       "memorytotal": 7277121536,
   >       "memorytotalgb": "6.78 GB (x 1.0)"
   > ```
   > 
   > `memorytotalgb` mentions overcommit ratio here and unlike cpu `memoryallocated` is giving a bytes value and not a percentage.
   > Let me know if you see any improvement here.
   
   Yes, but we have an incosistency, `memorytotalgb` and `cputotalgb` have incosistent meanings. That was the reason to add the `-withoverprovisioning`, if i remember correctly.


----------------------------------------------------------------
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.

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