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/02/22 10:00:51 UTC

[GitHub] [cloudstack] ravening opened a new pull request #4422: Count resources of virtual routers cpu/memory

ravening opened a new pull request #4422:
URL: https://github.com/apache/cloudstack/pull/4422


   ## Description
   <!--- Describe your changes in detail -->
   Currently the virtual router resources are not counted
       towards domain resource count. Only the CPU/MEM of user
       virtual machine are counted. If some customers have
       VR's with higher cpu/memory values than the default value of
       1 core, 256MB RAM then they are consuming extra resources
       which are not counted towards the resource calculation
       of the domain/account.
   
   So two global settings are added in this change
   
       "resource.count.running.routers" and "resource.count.running.routers.type"
   
       "resource.count.running.routers" can have either true of false
       "resource.count.running.routers.type" can have either "all" or "delta"
       Default value is "all"
   
       If "resource.count.running.routers" is true then if
       "resource.count.running.routers.type" is "all" then all VR resources
       are counted towards the domain resource consumption
   
       For example: If VR is running with 4 cores, 4GB ram then all 4 cores
       and 4 gb are added to domain resource consumption
   
       If "resource.count.running.routers.type" is "delta" then the diff
       between the current VR cpu/ram and default VR offering cpu/ram
       is considered for domain resource calculation.
   
       For example: If vr is running with 4 core and 4Gb ram, then
       3 cores and 4gb-0.25Gb will be counted for resource consumption
   
       If "resource.count.running.routers" is false then even if VR
       has higher cpu/ram then its not counted towards domain resource
       consumption
   
       Test cases:
   
       It can be tested using
   
       nosetests --with-marvin --marvin-config=<your test config file>.cfg test_router_resources.py
   
   <!-- 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: # -->
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] 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)
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document -->
   


----------------------------------------------------------------
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 #4422: Count resources of virtual routers cpu/memory

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


   @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 #4422: Count resources of virtual routers cpu/memory

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


   @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] sureshanaparti closed pull request #4422: Count resources of virtual routers cpu/memory

Posted by GitBox <gi...@apache.org>.
sureshanaparti closed pull request #4422:
URL: https://github.com/apache/cloudstack/pull/4422


   


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] ravening commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   > @ravening can you fix the conflicts and advise how this was tested?
   > cc @weizhouapache for review and testing
   
   @rhtyd will work on it soon.
   
   
   we tested it by calculating the resource count of the domain before and after increasing the capacity of VR.
   will add more details


-- 
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 #4422: Count resources of virtual routers cpu/memory

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


   <b>Trillian test result (tid-358)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 40426 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4422-t358-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
   Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
   Smoke tests completed. 84 look OK, 2 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestKubernetesCluster>:teardown | `Error` | 79.20 | test_kubernetes_clusters.py
   test_01_migrate_VM_and_root_volume | `Error` | 73.46 | test_vm_life_cycle.py
   test_02_migrate_VM_with_two_data_disks | `Error` | 52.27 | 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] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2782


----------------------------------------------------------------
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 #4422: Count resources of virtual routers cpu/memory

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


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


-- 
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 #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @ravening there's an exception in Travis wrt `test_08_count_resources_restarting_network` in the test suite added. Following is the exception:
   ```
   2021-02-22 10:26:15,826 - CRITICAL - EXCEPTION: test_08_count_resources_restarting_network: ['Traceback (most recent call last):\n', '  File "/usr/lib/python2.7/unittest/case.py", line 329, in run\n    testMethod()\n', '  File "/home/travis/build/apache/cloudstack/test/integration/component/test_router_resources.py", line 722, in test_08_count_resources_restarting_network\n    self.apiclient.scaleSystemVm(scale_systemvm_cmd)\n', '  File "/home/travis/.local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py", line 937, in scaleSystemVm\n    response = self.connection.marvinRequest(command, response_type=response, method=method)\n', '  File "/home/travis/.local/lib/python2.7/site-packages/marvin/cloudstackConnection.py", line 379, in marvinRequest\n    raise e\n', "Exception: Job failed: {jobprocstatus : 0, created : u'2021-02-22T10:26:14+0000', completed : u'2021-02-22T10:26:14+0000', cmd : u'org.apache.cloudstack.api.command.admin.systemvm.ScaleSystemVMCmd', 
 userid : u'19e1316e-74f7-11eb-b374-42010a1e044f', jobstatus : 2, jobid : u'd9667994-678b-48e3-a6ef-151fbb885185', jobresultcode : 530, jobresulttype : u'object', jobresult : {errorcode : 431, errortext : u'Hypervisor Simulator does not support  rootdisksize override'}, accountid : u'19e10caf-74f7-11eb-b374-42010a1e044f'}\n"]
   ```
   We can either skip that specific test for simulator or add Simulator to the list of supported hypervisors at https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java#L955 to align with the check at 
   https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L3988


-- 
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 #4422: Count resources of virtual routers cpu/memory

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






-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] shwstppr commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @ravening Moving to 4.16.0.0 milestone based on base branch please update if needed


----------------------------------------------------------------
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 #4422: Count resources of virtual routers cpu/memory

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


   @Pearl1594 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 #4422: Count resources of virtual routers cpu/memory

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


   @Pearl1594 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] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   <b>Trillian test result (tid-315)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 38466 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4422-t315-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
   Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
   Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
   Smoke tests completed. 83 look OK, 3 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_08_deploy_and_upgrade_kubernetes_ha_cluster | `Failure` | 143.22 | test_kubernetes_clusters.py
   ContextSuite context=TestKubernetesCluster>:teardown | `Error` | 565.23 | test_kubernetes_clusters.py
   test_01_migrate_VM_and_root_volume | `Error` | 67.17 | test_vm_life_cycle.py
   test_02_migrate_VM_with_two_data_disks | `Error` | 48.06 | test_vm_life_cycle.py
   test_hostha_enable_ha_when_host_in_maintenance | `Error` | 303.61 | test_hostha_kvm.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] nvazquez commented on pull request #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @ravening conflicts again, please fix. thanks!


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] ravening commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   > > > @ravening there's an exception in Travis wrt `test_08_count_resources_restarting_network` in the test suite added. Following is the exception:
   > > > ```
   > > > 2021-02-22 10:26:15,826 - CRITICAL - EXCEPTION: test_08_count_resources_restarting_network: ['Traceback (most recent call last):\n', '  File "/usr/lib/python2.7/unittest/case.py", line 329, in run\n    testMethod()\n', '  File "/home/travis/build/apache/cloudstack/test/integration/component/test_router_resources.py", line 722, in test_08_count_resources_restarting_network\n    self.apiclient.scaleSystemVm(scale_systemvm_cmd)\n', '  File "/home/travis/.local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py", line 937, in scaleSystemVm\n    response = self.connection.marvinRequest(command, response_type=response, method=method)\n', '  File "/home/travis/.local/lib/python2.7/site-packages/marvin/cloudstackConnection.py", line 379, in marvinRequest\n    raise e\n', "Exception: Job failed: {jobprocstatus : 0, created : u'2021-02-22T10:26:14+0000', completed : u'2021-02-22T10:26:14+0000', cmd : u'org.apache.cloudstack.api.command.admin.systemvm.ScaleSystemVM
 Cmd', userid : u'19e1316e-74f7-11eb-b374-42010a1e044f', jobstatus : 2, jobid : u'd9667994-678b-48e3-a6ef-151fbb885185', jobresultcode : 530, jobresulttype : u'object', jobresult : {errorcode : 431, errortext : u'Hypervisor Simulator does not support  rootdisksize override'}, accountid : u'19e10caf-74f7-11eb-b374-42010a1e044f'}\n"]
   > > > ```
   > > > 
   > > > 
   > > > We can either skip that specific test for simulator or add Simulator to the list of supported hypervisors at https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java#L955 to align with the check at
   > > > https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L3988
   > > 
   > > 
   > > will add
   > 
   > @ravening can you please address the travis test failure. Thanks
   
   @Pearl1594 done


-- 
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] Pearl1594 commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @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] DaanHoogland commented on pull request #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   <b>Trillian test result (tid-3595)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 30818 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4422-t3595-kvm-centos7.zip
   Smoke tests completed. 86 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 #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] shwstppr commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @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] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   <b>Trillian Build Failed (tid-2241)<b/>


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan removed a comment on pull request #4422: Count resources of virtual routers cpu/memory

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on pull request #4422:
URL: https://github.com/apache/cloudstack/pull/4422#issuecomment-783302935






----------------------------------------------------------------
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] nvazquez commented on pull request #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   Packaging result: ✔centos7 ✔centos8 ✖debian. JID-2788


----------------------------------------------------------------
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] sureshanaparti commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @ravening can you fix conflicts again, thanks.


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1333


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @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] weizhouapache commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @rhtyd @ravening should this be targeted to 4.16.0.0 ?


-- 
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 #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] nvazquez commented on pull request #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] rhtyd commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @ravening can you fix the conflicts and advise how this was tested?
   cc @weizhouapache for review and testing


-- 
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] nvazquez commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   Hi @ravening can you please fix the conflicts?


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] shwstppr removed a comment on pull request #4422: Count resources of virtual routers cpu/memory

Posted by GitBox <gi...@apache.org>.
shwstppr removed a comment on pull request #4422:
URL: https://github.com/apache/cloudstack/pull/4422#issuecomment-783252501


   @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] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @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] Pearl1594 commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   > > Verified behaviour - LGTM.
   > > One question though @ravening - when we enable the GS `resource.count.running.routers` does it automatically consider the existing routers' resource count and add it to the domain's resource count or it considers the domain routers stats only when the next VM is deployed? Based on my tests it is the latter case, just wanted to confirm.
   > 
   > @Pearl1594 the resources are counted only if the VR is running else it wont be counted
   
   Thanks @ravening, what I mean is, say I have a VR running and at this point `resource.count.running.routers` is false and  we then go and enable the global setting. So, does it update the stats with the routers cpu/mem stats if we attempt to refresh / update resource count?


-- 
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 #4422: Count resources of virtual routers cpu/memory

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


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


-- 
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 #4422: Count resources of virtual routers cpu/memory

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


   Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2778


----------------------------------------------------------------
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 closed pull request #4422: Count resources of virtual routers cpu/memory

Posted by GitBox <gi...@apache.org>.
shwstppr closed pull request #4422:
URL: https://github.com/apache/cloudstack/pull/4422


   


----------------------------------------------------------------
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 #4422: Count resources of virtual routers cpu/memory

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


   @ravening Moving to 4.16.0.0 milestone based on base branch please update if needed


----------------------------------------------------------------
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 #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4422: Count resources of virtual routers cpu/memory

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






-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] ravening commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   > @ravening conflicts again, please fix. thanks!
   
   @sureshanaparti done


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @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 #4422: Count resources of virtual routers cpu/memory

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


   Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian. SL-JID 920


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian. SL-JID 925


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] nvazquez removed a comment on pull request #4422: Count resources of virtual routers cpu/memory

Posted by GitBox <gi...@apache.org>.
nvazquez removed a comment on pull request #4422:
URL: https://github.com/apache/cloudstack/pull/4422#issuecomment-923160125


   @blueorangutan tesst


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] rhtyd commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   +1 @weizhouapache it's slightly bigger change and enhancement


-- 
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] Pearl1594 commented on pull request #4422: Count resources of virtual routers cpu/memory

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






-- 
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] ravening commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   > ping @ravening, can you fix conflicts and packaging issues.
   
   @nvazquez @sureshanaparti done


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] ravening commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   > @ravening there's an exception in Travis wrt `test_08_count_resources_restarting_network` in the test suite added. Following is the exception:
   > 
   > ```
   > 2021-02-22 10:26:15,826 - CRITICAL - EXCEPTION: test_08_count_resources_restarting_network: ['Traceback (most recent call last):\n', '  File "/usr/lib/python2.7/unittest/case.py", line 329, in run\n    testMethod()\n', '  File "/home/travis/build/apache/cloudstack/test/integration/component/test_router_resources.py", line 722, in test_08_count_resources_restarting_network\n    self.apiclient.scaleSystemVm(scale_systemvm_cmd)\n', '  File "/home/travis/.local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py", line 937, in scaleSystemVm\n    response = self.connection.marvinRequest(command, response_type=response, method=method)\n', '  File "/home/travis/.local/lib/python2.7/site-packages/marvin/cloudstackConnection.py", line 379, in marvinRequest\n    raise e\n', "Exception: Job failed: {jobprocstatus : 0, created : u'2021-02-22T10:26:14+0000', completed : u'2021-02-22T10:26:14+0000', cmd : u'org.apache.cloudstack.api.command.admin.systemvm.ScaleSystemVMCmd'
 , userid : u'19e1316e-74f7-11eb-b374-42010a1e044f', jobstatus : 2, jobid : u'd9667994-678b-48e3-a6ef-151fbb885185', jobresultcode : 530, jobresulttype : u'object', jobresult : {errorcode : 431, errortext : u'Hypervisor Simulator does not support  rootdisksize override'}, accountid : u'19e10caf-74f7-11eb-b374-42010a1e044f'}\n"]
   > ```
   > 
   > We can either skip that specific test for simulator or add Simulator to the list of supported hypervisors at https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java#L955 to align with the check at
   > https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java#L3988
   
   will add


-- 
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] sureshanaparti commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   ping @ravening, can you fix conflicts and packaging issues.


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @Pearl1594 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] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @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 #4422: Count resources of virtual routers cpu/memory

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


   Packaging result: :heavy_multiplication_x: centos7 :heavy_check_mark: centos8 :heavy_check_mark: debian. SL-JID 291


-- 
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] nvazquez commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   Hi @ravening can you please resolve the conflicts?


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] rhtyd commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @ravening can you address the comments, thanks.


-- 
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] nvazquez commented on pull request #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4422: Count resources of virtual routers cpu/memory

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



##########
File path: server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
##########
@@ -996,7 +1052,51 @@ public long calculateMemoryForAccount(long accountId) {
         for (UserVmJoinVO vm : userVms) {
             ramtotal += Long.valueOf(vm.getRamSize());
         }
-        return ramtotal;
+
+        ServiceOffering defaultRouterOffering = null;
+        String globalRouterOffering = VirtualNetworkApplianceManager.VirtualRouterServiceOffering.value();
+        if (globalRouterOffering != null) {
+            defaultRouterOffering = _serviceOfferingDao.findByUuid(globalRouterOffering);
+        }
+        if (defaultRouterOffering == null) {
+            defaultRouterOffering =  _serviceOfferingDao.findByName(ServiceOffering.routerDefaultOffUniqueName);
+        }

Review comment:
       no reason to grow this method for this bit.
   ```suggestion
           ServiceOffering defaultRouterOffering = getDefaultServiceOfferingOrSomeOtherNewName();
   ```

##########
File path: server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
##########
@@ -972,11 +980,59 @@ public long countCpusForAccount(long accountId) {
         for (UserVmJoinVO vm : userVms) {
             cputotal += Long.valueOf(vm.getCpu());
         }
-        return cputotal;
+
+        ServiceOffering defaultRouterOffering = null;
+        String globalRouterOffering = VirtualNetworkApplianceManager.VirtualRouterServiceOffering.value();
+        if (globalRouterOffering != null) {
+            defaultRouterOffering = _serviceOfferingDao.findByUuid(globalRouterOffering);
+        }
+        if (defaultRouterOffering == null) {
+            defaultRouterOffering =  _serviceOfferingDao.findByName(ServiceOffering.routerDefaultOffUniqueName);
+        }
+        GenericSearchBuilder<ServiceOfferingVO, SumCount> cpuSearch = _serviceOfferingDao.createSearchBuilder(SumCount.class);
+        cpuSearch.select("sum", Func.SUM, cpuSearch.entity().getCpu());
+        cpuSearch.select("count", Func.COUNT, (Object[])null);
+        SearchBuilder<VMInstanceVO> join1 = _vmDao.createSearchBuilder();
+        join1.and("accountId", join1.entity().getAccountId(), Op.EQ);
+        join1.and("type", join1.entity().getType(), Op.IN);
+        join1.and("state", join1.entity().getState(), SearchCriteria.Op.NIN);
+        join1.and("displayVm", join1.entity().isDisplayVm(), Op.EQ);
+        cpuSearch.join("offerings", join1, cpuSearch.entity().getId(), join1.entity().getServiceOfferingId(), JoinBuilder.JoinType.INNER);
+        cpuSearch.done();
+
+        SearchCriteria<SumCount> sc = cpuSearch.create();
+        sc.setJoinParameters("offerings", "accountId", accountId);
+        sc.setJoinParameters("offerings", "type", VirtualMachine.Type.DomainRouter); // domain routers
+
+        if (VirtualMachineManager.ResoureCountRunningVMsonly.value()) {
+            sc.setJoinParameters("offerings", "state", new Object[] {State.Destroyed, State.Error, State.Expunging, State.Stopped});
+        } else {
+            sc.setJoinParameters("offerings", "state", new Object[] {State.Destroyed, State.Error, State.Expunging});
+        }
+        sc.setJoinParameters("offerings", "displayVm", 1);
+        List<SumCount> cpus = _serviceOfferingDao.customSearch(sc, null);

Review comment:
       should be in `ServiceOfferingDao`, no reason to grow this method for this code.

##########
File path: server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
##########
@@ -996,7 +1052,51 @@ public long calculateMemoryForAccount(long accountId) {
         for (UserVmJoinVO vm : userVms) {
             ramtotal += Long.valueOf(vm.getRamSize());
         }
-        return ramtotal;
+
+        ServiceOffering defaultRouterOffering = null;
+        String globalRouterOffering = VirtualNetworkApplianceManager.VirtualRouterServiceOffering.value();
+        if (globalRouterOffering != null) {
+            defaultRouterOffering = _serviceOfferingDao.findByUuid(globalRouterOffering);
+        }
+        if (defaultRouterOffering == null) {
+            defaultRouterOffering =  _serviceOfferingDao.findByName(ServiceOffering.routerDefaultOffUniqueName);
+        }
+        GenericSearchBuilder<ServiceOfferingVO, SumCount> memorySearch = _serviceOfferingDao.createSearchBuilder(SumCount.class);
+        memorySearch.select("sum", Func.SUM, memorySearch.entity().getRamSize());
+        memorySearch.select("count", Func.COUNT, (Object[])null);
+        SearchBuilder<VMInstanceVO> join1 = _vmDao.createSearchBuilder();
+        join1.and("accountId", join1.entity().getAccountId(), Op.EQ);
+        join1.and("type", join1.entity().getType(), Op.IN);
+        join1.and("state", join1.entity().getState(), SearchCriteria.Op.NIN);
+        join1.and("displayVm", join1.entity().isDisplayVm(), Op.EQ);
+        memorySearch.join("offerings", join1, memorySearch.entity().getId(), join1.entity().getServiceOfferingId(), JoinBuilder.JoinType.INNER);
+        memorySearch.done();
+
+        SearchCriteria<SumCount> sc = memorySearch.create();
+        sc.setJoinParameters("offerings", "accountId", accountId);
+        sc.setJoinParameters("offerings", "type", VirtualMachine.Type.DomainRouter); // domain routers
+        sc.setJoinParameters("offerings", "displayVm", 1);
+
+        if (VirtualMachineManager.ResoureCountRunningVMsonly.value()) {
+            sc.setJoinParameters("offerings", "state", new Object[] {State.Destroyed, State.Error, State.Expunging, State.Stopped});
+        } else {
+            sc.setJoinParameters("offerings", "state", new Object[] {State.Destroyed, State.Error, State.Expunging});
+        }
+        sc.setJoinParameters("offerings", "displayVm", 1);
+        List<SumCount> memory = _serviceOfferingDao.customSearch(sc, null);

Review comment:
       this bit seems like it should be a member method of `ServiceOfferringDao`, or activated by flag in an existing method in `ServiceOfferringDao`

##########
File path: server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
##########
@@ -972,11 +980,59 @@ public long countCpusForAccount(long accountId) {
         for (UserVmJoinVO vm : userVms) {
             cputotal += Long.valueOf(vm.getCpu());
         }
-        return cputotal;
+
+        ServiceOffering defaultRouterOffering = null;
+        String globalRouterOffering = VirtualNetworkApplianceManager.VirtualRouterServiceOffering.value();
+        if (globalRouterOffering != null) {
+            defaultRouterOffering = _serviceOfferingDao.findByUuid(globalRouterOffering);
+        }
+        if (defaultRouterOffering == null) {
+            defaultRouterOffering =  _serviceOfferingDao.findByName(ServiceOffering.routerDefaultOffUniqueName);
+        }

Review comment:
       ```suggestion
           ServiceOffering defaultRouterOffering = getDefaultServiceOfferingOrSomeOtherNewName();
   ```
   
   this happens below as well, for memory.

##########
File path: engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
##########
@@ -1368,6 +1382,131 @@ private void logBootModeParameters(Map<VirtualMachineProfile.Param, Object> para
         }
     }
 
+    /**

Review comment:
       `incrementVrResourceCount` (60 lines) and `decrementVrResourceCount` (38 lines) are big to start with and a lot of comment. Each comment could be the javadoc for a new method instead of having just these two.

##########
File path: server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
##########
@@ -972,11 +980,59 @@ public long countCpusForAccount(long accountId) {
         for (UserVmJoinVO vm : userVms) {
             cputotal += Long.valueOf(vm.getCpu());
         }
-        return cputotal;
+
+        ServiceOffering defaultRouterOffering = null;
+        String globalRouterOffering = VirtualNetworkApplianceManager.VirtualRouterServiceOffering.value();
+        if (globalRouterOffering != null) {
+            defaultRouterOffering = _serviceOfferingDao.findByUuid(globalRouterOffering);
+        }
+        if (defaultRouterOffering == null) {
+            defaultRouterOffering =  _serviceOfferingDao.findByName(ServiceOffering.routerDefaultOffUniqueName);
+        }
+        GenericSearchBuilder<ServiceOfferingVO, SumCount> cpuSearch = _serviceOfferingDao.createSearchBuilder(SumCount.class);
+        cpuSearch.select("sum", Func.SUM, cpuSearch.entity().getCpu());
+        cpuSearch.select("count", Func.COUNT, (Object[])null);
+        SearchBuilder<VMInstanceVO> join1 = _vmDao.createSearchBuilder();
+        join1.and("accountId", join1.entity().getAccountId(), Op.EQ);
+        join1.and("type", join1.entity().getType(), Op.IN);
+        join1.and("state", join1.entity().getState(), SearchCriteria.Op.NIN);
+        join1.and("displayVm", join1.entity().isDisplayVm(), Op.EQ);
+        cpuSearch.join("offerings", join1, cpuSearch.entity().getId(), join1.entity().getServiceOfferingId(), JoinBuilder.JoinType.INNER);
+        cpuSearch.done();
+
+        SearchCriteria<SumCount> sc = cpuSearch.create();
+        sc.setJoinParameters("offerings", "accountId", accountId);
+        sc.setJoinParameters("offerings", "type", VirtualMachine.Type.DomainRouter); // domain routers
+
+        if (VirtualMachineManager.ResoureCountRunningVMsonly.value()) {
+            sc.setJoinParameters("offerings", "state", new Object[] {State.Destroyed, State.Error, State.Expunging, State.Stopped});
+        } else {
+            sc.setJoinParameters("offerings", "state", new Object[] {State.Destroyed, State.Error, State.Expunging});
+        }
+        sc.setJoinParameters("offerings", "displayVm", 1);
+        List<SumCount> cpus = _serviceOfferingDao.customSearch(sc, null);
+        if (cpus != null) {
+            // Calculate the VR CPU resource count depending on the global setting
+            if (VirtualMachineManager.ResourceCountRouters.valueIn(domain.getId())) {
+                cputotal += cpus.get(0).sum;
+
+                // Get the diff of current router offering with default offering
+                if (VirtualMachineManager.ResourceCountRoutersType.valueIn(domain.getId())
+                        .equalsIgnoreCase(VirtualMachineManager.COUNT_DELTA_VR_RESOURCES)) {
+                    cputotal = cputotal - cpus.get(0).count * defaultRouterOffering.getCpu();
+                }
+            }
+            return cputotal;
+        } else {
+            return cputotal;
+        }

Review comment:
       this also is the same as below with the exception of the naming
   maybe create a 
   private long totaliseResourceCount(List<SumCount> resourceCounts){...}




-- 
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 #4422: Count resources of virtual routers cpu/memory

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


   @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] ravening commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   > @ravening conflicts again, please fix. thanks!
   
   @sureshanaparti done


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1446


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] nvazquez commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @ravening can you check the issues with packaging and fix?


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] ravening commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   > > > Verified behaviour - LGTM.
   > > > One question though @ravening - when we enable the GS `resource.count.running.routers` does it automatically consider the existing routers' resource count and add it to the domain's resource count or it considers the domain routers stats only when the next VM is deployed? Based on my tests it is the latter case, just wanted to confirm.
   > > 
   > > 
   > > @Pearl1594 the resources are counted only if the VR is running else it wont be counted
   > 
   > Thanks @ravening, what I mean is, say I have a VR running and at this point `resource.count.running.routers` is false and we then go and enable the global setting. So, does it update the stats with the routers cpu/mem stats if we attempt to refresh / update resource count?
   
   @Pearl1594 once you change the setting `resource.count.running.routers` to true then it updates the resource count depending on the setting `resource.count.running.routers.type` you select. By default vr has 1core and 256mb. so thats not counted under `delta` but if you select it as `all` then even that will be counted


-- 
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 #4422: Count resources of virtual routers cpu/memory

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


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

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   Verified behaviour - LGTM.
   One question though @ravening - when we enable the GS `resource.count.running.routers` does it automatically consider the existing routers' resource count and add it to the domain's resource count or it considers the domain routers stats only when the next VM is deployed? Based on my tests it is the latter case, just wanted to confirm. 


-- 
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] ravening commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   > Verified behaviour - LGTM.
   > One question though @ravening - when we enable the GS `resource.count.running.routers` does it automatically consider the existing routers' resource count and add it to the domain's resource count or it considers the domain routers stats only when the next VM is deployed? Based on my tests it is the latter case, just wanted to confirm.
   
   @Pearl1594 the resources are counted only if the VR is running else it wont be counted


-- 
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 #4422: Count resources of virtual routers cpu/memory

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


   @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 #4422: Count resources of virtual routers cpu/memory

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


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1316


-- 
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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] shwstppr commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @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] blueorangutan commented on pull request #4422: Count resources of virtual routers cpu/memory

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


   @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