You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "hsato03 (via GitHub)" <gi...@apache.org> on 2023/11/20 21:33:47 UTC

[PR] Prioritize hypervisor.uri configuration [cloudstack]

hsato03 opened a new pull request, #8254:
URL: https://github.com/apache/cloudstack/pull/8254

   ### Description
   
   The KVM Agent has the `hypervisor.uri` configuration to define the connection with Libvirt; however, this property is ignored and a hardcoded value is used in many parts of the code.
   
   This PR intends to prioritize the `hypervisor.uri` property in Libvirt connections and use the hypervisor default URI only when this configuration is not defined.
   
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [X] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   I followed the same steps from `How did you try to break this feature...` and verified that the host was only using the URI defined in the `hypervisor.uri` property.
   
   
   #### How did you try to break this feature and the system with this change?
   
   1. Add the `hypervisor.uri` property to a host's agent.properties, `hypervisor.uri=qemu:///session` for example;
   2. Check the agent logs;
   3. Although the `hypervisor.uri` property is defined, the agent is still using the hypervisor default URI in many connections;


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1821896737

   <b>[SF] Trillian test result (tid-8384)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 51995 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8254-t8384-kvm-centos7.zip
   Smoke tests completed. 118 look OK, 0 have errors, 0 did not run
   Only failed and skipped 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.

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

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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1834224352

   > @DaanHoogland @weizhouapache do we need third-party testing for this one?
   
   Yes @GutoVeronezi 
   Would you like to test it? 


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "GutoVeronezi (via GitHub)" <gi...@apache.org>.
GutoVeronezi commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1843577894

   Merging this one based on the approvals and tests results.


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1819982991

   Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 7807


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1820540829

   @DaanHoogland a [SL] 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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1819925825

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. 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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "GutoVeronezi (via GitHub)" <gi...@apache.org>.
GutoVeronezi commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1835943214

   > > @DaanHoogland @weizhouapache do we need third-party testing for this one?
   > 
   > Yes @GutoVeronezi Would you like to test it?
   
   I can put it on my tasks for the next week.


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1842661014

   > > > @DaanHoogland @weizhouapache do we need third-party testing for this one?
   > > 
   > > 
   > > Yes @GutoVeronezi Would you like to test it?
   > 
   > I can put it on my tasks for the next week.
   
   cool, thanks @GutoVeronezi 
   assigned to you then
   


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "GutoVeronezi (via GitHub)" <gi...@apache.org>.
GutoVeronezi commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1834034084

   @DaanHoogland @weizhouapache do we need third-party testing for this one?


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1819931323

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8254?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Comparison is base [(`c7100c3`)](https://app.codecov.io/gh/apache/cloudstack/commit/c7100c3d751923547d16e04949c186ef8e46f792?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 21.64% compared to head [(`2f7193c`)](https://app.codecov.io/gh/apache/cloudstack/pull/8254?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 4.49%.
   > Report is 15 commits behind head on main.
   
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main   #8254       +/-   ##
   ============================================
   - Coverage     21.64%   4.49%   -17.15%     
   ============================================
     Files          5052     354     -4698     
     Lines        343910   27907   -316003     
     Branches      49538    4881    -44657     
   ============================================
   - Hits          74431    1255    -73176     
   + Misses       258607   26514   -232093     
   + Partials      10872     138    -10734     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8254/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8254/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/8254/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.49% <ø> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8254?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1819924933

   @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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "GutoVeronezi (via GitHub)" <gi...@apache.org>.
GutoVeronezi commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1843576122

   Hello guys
   
   I did some basic tests with the feature:
   - without the configuration, the Agent took the default URI; with that, I successfully created a VM, migrated it, and scaled it;
     ```
     [...]
     2023-12-06 19:32:19,539 DEBUG [agent.properties.AgentPropertiesFileHandler] (agentRequest-Handler-2:null) (logid:7626c82c) Property [hypervisor.uri] has empty or null value. Using default value [null].
     2023-12-06 19:32:19,539 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-2:null) (logid:7626c82c) Looking for libvirtd connection at: qemu:///system
     [...]
     2023-12-06 19:32:19,566 DEBUG [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-2:null) (logid:7626c82c) starting i-2-9-VM: <domain type='kvm'>
     [...]
     2023-12-06 19:32:20,961 DEBUG [cloud.agent.Agent] (agentRequest-Handler-2:null) (logid:7626c82c) Seq 4-6525434385083138169:  { Ans: , MgmtId: 262659038986676, via: 4, Ver: v1, Flags: 10, [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":"9","name":"i-2-9-VM","state":"Starting","type":"User","cpus":"2","minSpeed":"1560","maxSpeed":"1560","minRam":"(1.00 GB) 1073741824","maxRam":"(4.00 GB) 4294967296","arch":"x86_64","os":"Other (64-bit)","platformEmulator":"Other","bootArgs":"","enableHA":"false","limitCpuUse":"false","enableDynamicallyScaleVm":"
     [...]
     ```
   
   - with the configuration, the Agent took the URI I set; with that, I successfully created a VM, migrated it, and scaled it;
     ```
     [...]
     2023-12-06 19:37:23,206 DEBUG [agent.properties.AgentPropertiesFileHandler] (agentRequest-Handler-5:null) (logid:951c7230) Property [hypervisor.uri] was altered. Now using the value [qemu+tcp://192.168.123.173/system].
     2023-12-06 19:37:23,206 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-5:null) (logid:951c7230) Looking for libvirtd connection at: qemu+tcp://192.168.123.173/system
     [...]
     2023-12-06 19:37:23,248 DEBUG [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-5:null) (logid:951c7230) starting i-2-9-VM: <domain type='kvm'>
     [...]
     2023-12-06 19:37:24,280 DEBUG [cloud.agent.Agent] (agentRequest-Handler-5:null) (logid:951c7230) Seq 4-5190117095567785998:  { Ans: , MgmtId: 262659038986676, via: 4, Ver: v1, Flags: 10, [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":"9","name":"i-2-9-VM","state":"Starting","type":"User","cpus":"2","minSpeed":"1560","maxSpeed":"1560","minRam":"(1.00 GB) 1073741824","maxRam":"(4.00 GB) 4294967296","arch":"x86_64","os":"Other (64-bit)","platformEmulator":"Other","bootArgs":"","enableHA":"false","limitCpuUse":"false","enableDynamicallyScaleVm":"
     ```
   


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "GutoVeronezi (via GitHub)" <gi...@apache.org>.
GutoVeronezi merged PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254


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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1820538939

   @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


Re: [PR] Prioritize hypervisor.uri configuration [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #8254:
URL: https://github.com/apache/cloudstack/pull/8254#issuecomment-1834044696

   > @DaanHoogland @weizhouapache do we need third-party testing for this one?
   
   in principle I'd say we always do, but I'm sensitive to arguments why we wouldn't. I think we can only decide on this based on the code and available automatic tests though, never relying on the author. I would appreciate it if you didn't trust my PRs in that respect either.


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