Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2052960883

   [SF] Trillian test result (tid-9811)
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 48680 seconds
   Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8903-t9811-kvm-centos7.zip
   Smoke tests completed. 129 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-unsubscr...@cloudstack.apache.org

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



Re: [PR] sanatise trace logging of async jobs [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8892:
URL: https://github.com/apache/cloudstack/pull/8892#issuecomment-2052669535

   [SF] Trillian test result (tid-9806)
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 54452 seconds
   Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8892-t9806-kvm-centos7.zip
   Smoke tests completed. 129 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-unsubscr...@cloudstack.apache.org

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



Re: [PR] Fix volume snapshot of encrypted NFS/StorPool volume [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8873:
URL: https://github.com/apache/cloudstack/pull/8873#issuecomment-2052618680

   [SF] Trillian test result (tid-9808)
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 45835 seconds
   Marvin logs: 
https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8873-t9808-kvm-centos7.zip
   Smoke tests completed. 128 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_vpc_site2site_vpn | `Failure` | 279.99 | test_vpc_vpn.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.

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

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



Re: [PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8906:
URL: https://github.com/apache/cloudstack/pull/8906#issuecomment-2052550327

   @nvazquez a [SL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, 
rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) 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-unsubscr...@cloudstack.apache.org

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



Re: [PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


nvazquez commented on PR #8906:
URL: https://github.com/apache/cloudstack/pull/8906#issuecomment-2052549387

   @blueorangutan test matrix


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

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

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



Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2052545482

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9239


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

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

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



Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2052455084

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

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



Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


vishesh92 commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2052453001

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

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



Re: [PR] Normalizing volume consolidation in live migration on KVM [cloudstack]

2024-04-12 Thread via GitHub


codecov-commenter commented on PR #8911:
URL: https://github.com/apache/cloudstack/pull/8911#issuecomment-2052448953

   ## 
[Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8911?dropdown=coverage=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 4.36%. Comparing base 
[(`c7626eb`)](https://app.codecov.io/gh/apache/cloudstack/commit/c7626ebfd6323b7bb656dbe5bf221a8c811769fd?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 to head 
[(`f406118`)](https://app.codecov.io/gh/apache/cloudstack/pull/8911?dropdown=coverage=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   > Report is 5 commits behind head on 4.19.
   
   
   Additional details and impacted files
   
   
   ```diff
   @@ Coverage Diff  @@
   ##   4.19   #8911   +/-   ##
   
   - Coverage 15.36%   4.36%   -11.00% 
   
 Files  4862 362 -4500 
 Lines325934   28798   -297136 
 Branches  458145021-40793 
   
   - Hits  500741258-48816 
   + Misses   268857   27399   -241458 
   + Partials   7003 141 -6862 
   ```
   
   | 
[Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8911/flags?src=pr=flags_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8911/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `?` | |
   | 
[uitests](https://app.codecov.io/gh/apache/cloudstack/pull/8911/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `4.36% <ø> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8911?dropdown=coverage=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_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-unsubscr...@cloudstack.apache.org

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



[PR] Normalizing volume consolidation in live migration on KVM [cloudstack]

2024-04-12 Thread via GitHub


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

   ### Description
   
   Currently, when a volume that was created with linked clone is live migrated 
from an NFS storage to another NFS storage in KVM, it continues to have the 
template as a backing file on the destination storage. In all other cases, such 
as NFS to SharedMountPoint, the volume is consolidated with its backing file 
during migration.
   
   This special case adds unnecessary complexity to ACS; In most cases, 
performing the migration without consolidating the volume does not 
significantly optimize resource usage. On the other hand, when consolidating 
the volume with its backing file, the hypervisor detects empty sectors and 
removes them from the final volume, therefore, consolidating the volume can 
reduce storage usage.
   
   This PR fixes the problem explained in #7615 and #8834, but without 
corrupting the volume.
   
   ### 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)
   - [ ] build/CI
   
   ### Feature/Enhancement Scale or Bug Severity
   
    Feature/Enhancement Scale
   
   - [ ] Major
   - [X] Minor
   
    Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   Before applying the changes, a VM was created using linked clone on an NFS 
storage, when migrating it to another NFS storage, the template was copied to 
the destination storage and it continued to be used by the VM as a backing file.
   
   After applying the changes, a new VM was created under the same conditions 
as the old one (except for the template being different), when migrating the VM 
from one NFS storage to another, the VM template was not copied to the new 
storage and the VM volume was consolidated.


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

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

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



Re: [PR] Fix migration from local storage to NFS in KVM [cloudstack]

2024-04-12 Thread via GitHub


JoaoJandre commented on PR #8909:
URL: https://github.com/apache/cloudstack/pull/8909#issuecomment-2052424087

   > @JoaoJandre is this also applicable fix for 4.19?
   
   @rohityadavcloud yes, I'll rebase with 4.19 and target 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-unsubscr...@cloudstack.apache.org

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



Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

2024-04-12 Thread via GitHub


yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2052420650

   My ldapsearch CLI works ok, but in ACS, it can't list the ldap users.
   
   Could you please help this?
   
   Brs


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

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

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



Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

2024-04-12 Thread via GitHub


yuangeqingian commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2052419819

   Also, I did some test, trying to bind ldap to a domain, this error comes out:
   Request failed. (530)
   com.cloud.exception.InvalidParameterValueException: Unable to bind to the 
given LDAP server
   
   I checked logs in ACS management.log, this error comes out:
   
   DEBUG [o.a.c.l.LdapContextFactory] (qtp1789718525-1052:ctx-bf2f48df 
ctx-f171c9d9) (logid:7d7a3c5c) initializing ldap with provider url: 
ldap://dir.slb.com:389
   DEBUG [o.a.c.l.LdapManagerImpl] (qtp1789718525-1052:ctx-bf2f48df 
ctx-f171c9d9) (logid:7d7a3c5c) NamingException while doing an LDAP bind
   javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: 
LdapErr: DSID-0C090449, comment: AcceptSecurityContext error, data 52e, v3839]
   at 
java.naming/com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3259)
   at 
java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3205)
   at 
java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2991)
   
   INFO  [c.c.a.ApiServer] (qtp1789718525-1052:ctx-bf2f48df ctx-f171c9d9) 
(logid:7d7a3c5c) com.cloud.exception.InvalidParameterValueException: Unable to 
bind to the given LDAP server
   


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

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

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



Re: [I] CloudStask Add Ldap Account Empty List [cloudstack]

2024-04-12 Thread via GitHub


boring-cyborg[bot] commented on issue #8910:
URL: https://github.com/apache/cloudstack/issues/8910#issuecomment-2052413615

   Thanks for opening your first issue here! Be sure to follow the issue 
template!
   


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

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

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



[I] CloudStask Add Ldap Account Empty List [cloudstack]

2024-04-12 Thread via GitHub


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

   CloudStack Version: 4.19.0.1
   OS Version:  Ubuntu 22
Ldap Search can work with stable output for query:
   
![image](https://github.com/apache/cloudstack/assets/9658083/4d289b34-e618-44cd-8ebd-b8628ad0c293)
   
   Global ldap setting in ACS UI:
   
![image](https://github.com/apache/cloudstack/assets/9658083/5c40ad1d-d137-4eae-82c3-1edeb9b23445)
   
![image](https://github.com/apache/cloudstack/assets/9658083/43af4936-f586-452d-9fc1-8b79806e336c)
   
![image](https://github.com/apache/cloudstack/assets/9658083/d63829a4-c2f5-4742-8660-3374c2079820)
   
   
   My Ldap Configuration:
   
![image](https://github.com/apache/cloudstack/assets/9658083/73313d7b-ec9f-40b7-a0c9-35734e350d5c)
   
   While I add account, the user list showed empty:
   
![image](https://github.com/apache/cloudstack/assets/9658083/934bd3dc-750d-4415-bd64-4381cf229b1d)
   


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

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

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



Re: [PR] Fix migration from local storage to NFS in KVM [cloudstack]

2024-04-12 Thread via GitHub


rohityadavcloud commented on PR #8909:
URL: https://github.com/apache/cloudstack/pull/8909#issuecomment-2052416091

   @JoaoJandre is this also applicable fix for 4.19?


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

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

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



Re: [PR] Fix migration from local storage to NFS in KVM [cloudstack]

2024-04-12 Thread via GitHub


codecov-commenter commented on PR #8909:
URL: https://github.com/apache/cloudstack/pull/8909#issuecomment-2052350097

   ## 
[Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8909?dropdown=coverage=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 4.31%. Comparing base 
[(`a5508ac`)](https://app.codecov.io/gh/apache/cloudstack/commit/a5508acc54d1638ba469f4d7ce9898b81b5209d0?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 to head 
[(`0bec7da`)](https://app.codecov.io/gh/apache/cloudstack/pull/8909?dropdown=coverage=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   > Report is 561 commits behind head on main.
   
   
   Additional details and impacted files
   
   
   ```diff
   @@ Coverage Diff  @@
   ##   main   #8909   +/-   ##
   
   - Coverage 13.17%   4.31%-8.86% 
   
 Files  2725 362 -2363 
 Lines258235   29176   -229059 
 Branches  402495120-35129 
   
   - Hits  340131260-32753 
   + Misses   219913   27774   -192139 
   + Partials   4309 142 -4167 
   ```
   
   | 
[Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8909/flags?src=pr=flags_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[uitests](https://app.codecov.io/gh/apache/cloudstack/pull/8909/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `4.31% <ø> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8909?dropdown=coverage=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_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-unsubscr...@cloudstack.apache.org

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



Re: [PR] Removed unnecessary migration of `ROOT` volumes with KVM [cloudstack]

2024-04-12 Thread via GitHub


codecov-commenter commented on PR #8908:
URL: https://github.com/apache/cloudstack/pull/8908#issuecomment-2052350103

   ## 
[Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8908?dropdown=coverage=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   Attention: Patch coverage is `0%` with `2 lines` in your changes are missing 
coverage. Please review.
   > Project coverage is 17.12%. Comparing base 
[(`a5508ac`)](https://app.codecov.io/gh/apache/cloudstack/commit/a5508acc54d1638ba469f4d7ce9898b81b5209d0?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 to head 
[(`42aea70`)](https://app.codecov.io/gh/apache/cloudstack/pull/8908?dropdown=coverage=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   > Report is 561 commits behind head on main.
   
   | 
[Files](https://app.codecov.io/gh/apache/cloudstack/pull/8908?dropdown=coverage=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...n/java/com/cloud/vm/VirtualMachineManagerImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8908?src=pr=tree=engine%2Forchestration%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fvm%2FVirtualMachineManagerImpl.java_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-ZW5naW5lL29yY2hlc3RyYXRpb24vc3JjL21haW4vamF2YS9jb20vY2xvdWQvdm0vVmlydHVhbE1hY2hpbmVNYW5hZ2VySW1wbC5qYXZh)
 | 0.00% | [2 Missing :warning: 
](https://app.codecov.io/gh/apache/cloudstack/pull/8908?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   
   Additional details and impacted files
   
   
   ```diff
   @@ Coverage Diff  @@
   ##   main#8908  +/-   ##
   
   + Coverage 13.17%   17.12%   +3.95% 
   - Complexity 921415262+6048 
   
 Files  2725 4880+2155 
 Lines258235   327081   +68846 
 Branches  4024946227+5978 
   
   + Hits  3401356027   +22014 
   - Misses   219913   262982   +43069 
   - Partials   4309 8072+3763 
   ```
   
   | 
[Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8908/flags?src=pr=flags_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8908/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `17.12% <0.00%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8908?dropdown=coverage=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_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-unsubscr...@cloudstack.apache.org

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



[PR] Fix migration from local storage to NFS in KVM [cloudstack]

2024-04-12 Thread via GitHub


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

   ### Description
   
   Using KVM as a hypervisor, when performing a live migration of a VM with a 
volume, if the volume is on local storage and the migration destination is an 
NFS storage, an error occurs during the migration. This happens because there 
is a validation to check whether the destination host has direct access to the 
source storage of the volume being migrated. However, this validation is not 
necessary, since the host that will perform the migration is the source host 
itself. Therefore, the destination host only needs access to the destination 
storage.
   
   ### 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
   - [X] Minor
   
    Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   Before this PR, the following live volume migration cases failed in KVM:
   
   | Volume |  Origin |  Destination |
   | -- | -- | -- |
   | ROOT | Local | NFS1 |
   | DATA1 | Local | NFS1 |
   
   | Volume |  Origin |  Destination |
   | -- | -- | -- |
   | ROOT | Local | NFS1 |
   
   With this PR, the above cases now work. Furthermore, the following cases 
where validated, to make sure that no regressions were introduced:
   
   | Volume |  Origin |  Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | NFS2 |
   | DATA1 | NFS1 | NFS2 |
   
   | Volume |  Origin |  Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | Local |
   | DATA1 | NFS1 | Local |
   
   | Volume |  Origin |  Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | ISCSI1 |
   | DATA1 | NFS1 | ISCSI1 |
   
   | Volume |  Origin |  Destination |
   | -- | -- | -- |
   | ROOT | ISCSI1 | NFS1 |
   | DATA1 | ISCSI1 | NFS1 |
   


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

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

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



Re: [PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8906:
URL: https://github.com/apache/cloudstack/pull/8906#issuecomment-2052304647

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9238


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

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

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



Re: [PR] Normalize dates in Usage and Quota APIs [cloudstack]

2024-04-12 Thread via GitHub


GutoVeronezi commented on PR #8243:
URL: https://github.com/apache/cloudstack/pull/8243#issuecomment-2052271599

   The Simulator CI / build is passing; however, Codecov is struggling with 
something during the report upload; thus the errors in the checks. 
   
   @DaanHoogland, can we do a last CI run 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-unsubscr...@cloudstack.apache.org

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



(cloudstack-terraform-provider) branch main updated: Update README.md (#110)

2024-04-12 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/cloudstack-terraform-provider.git


The following commit(s) were added to refs/heads/main by this push:
 new 845e996  Update README.md (#110)
845e996 is described below

commit 845e9962c4c7ff8c781a99bc9ce2cc5c89531c48
Author: CodeBleu <400979+codeb...@users.noreply.github.com>
AuthorDate: Fri Apr 12 14:26:31 2024 -0400

Update README.md (#110)
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 74537a2..d7baa42 100644
--- a/README.md
+++ b/README.md
@@ -82,7 +82,7 @@ User hitting installation issue using registry can install 
using the local insta
 Documentation
 -
 
-For more details on how to use the provider, visit 
https://registry.terraform.io/providers/cloudstack/cloudstack/latest/docs
+For more details on how to use the provider, click [here](website/) or visit 
https://registry.terraform.io/providers/cloudstack/cloudstack/latest/docs
 
 Developing the Provider
 ---



[PR] Removed unnecessary migration of `ROOT` volumes with KVM [cloudstack]

2024-04-12 Thread via GitHub


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

   ### Description
   
   Using KVM as a hypervisor, when performing a live migration of a VM with its 
datadisks, the ROOT volume is also migrated, even if the user has not requested 
this action. Since this migration of the root volume is unnecessary and causes 
greater latency for the live migrate process, this behavior has been changed. 
Now, when migrating a VM and its datadisks, only the volumes selected for 
migration will actually be migrated.
   
   ### 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
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   ### Description of tests
   
   A new VM was created with a root and a data volume for testing; Several live 
migration scenarios were tested. The cases are described below.
   
   The following migrations occurred successfully, in each case, when only the 
datadisk was moved, a dump of the VM XML was performed to verify that the ROOT 
volume had not been moved.
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | iSCSI1 | iSCSI2 |
   | DATA1 | iSCSI1 | --- |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | iSCSI1 | --- |
   | DATA1 | iSCSI1 | iSCSI2 |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | iSCSI1 | iSCSI2 |
   | DATA1 | iSCSI1 | iSCSI2 |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | iSCSI1 | Local |
   | DATA1 | iSCSI1 | Local |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | Local | iSCSI1 |
   | DATA1 | Local | iSCSI1 |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | iSCSI1 | NFS1 |
   | DATA1 | iSCSI1 | NFS1 |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | iSCSI1 | NFS1 |
   | DATA1 | iSCSI1 | --- |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | iSCSI1 | --- |
   | DATA1 | iSCSI1 | NFS1 |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | NFS2 |
   | DATA1 | NFS1 | NFS2 |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | Local |
   | DATA1 | NFS1 | Local |
   
   The following migrations ended in error. However, the error is expected, 
because, as described in #8907, when migrating the VM + volume and not 
migrating all NFS volumes, an error occurs. This error will be fixed in another 
PR.
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | Local |
   | DATA1 | NFS1 | --- |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | --- |
   | DATA1 | NFS1 | Local |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | NFS2 |
   | DATA1 | NFS1 | --- |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | NFS2 |
   | DATA1 | NFS1 | --- |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | ISCSI1 | --- |
   | DATA1 | NFS1 | ISCSI1 |
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | NFS1 | --- |
   | DATA1 | ISCSI1 | NFS1 |
   
   The following migration ended in error; however, this case is due to another 
bug that was also described in #8907: when migrating to an NFS storage, ACS 
will validate if the destination host has access to the source storage. This 
causes an issue when migrating from local storage to NFS storage, as the 
destination host will never have direct access to the source host's local 
storage. This bug will be fixed in another PR.
   
   | Volume | Origin | Destination |
   | -- | -- | -- |
   | ROOT | Local | NFS1 |
   | DATA1 | Local | NFS1 |
   


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

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

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



Re: [PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8906:
URL: https://github.com/apache/cloudstack/pull/8906#issuecomment-2052195017

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

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



Re: [PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


Pearl1594 commented on PR #8906:
URL: https://github.com/apache/cloudstack/pull/8906#issuecomment-2052193620

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

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



Re: [I] KVM Incremental Snapshots/Backups [cloudstack]

2024-04-12 Thread via GitHub


boring-cyborg[bot] commented on issue #8907:
URL: https://github.com/apache/cloudstack/issues/8907#issuecomment-2052191058

   Thanks for opening your first issue here! Be sure to follow the issue 
template!
   


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

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

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



Re: [PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8906:
URL: https://github.com/apache/cloudstack/pull/8906#issuecomment-2052191206

   Packaging result [SF]: ✔️ el7 ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 9237


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

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

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



[I] KVM Incremental Snapshots/Backups [cloudstack]

2024-04-12 Thread via GitHub


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

   # ISSUE TYPE
* Feature Idea
   
   
   # COMPONENT NAME
   ~~~
   Volume Snapshot
   ~~~
   
   # CLOUDSTACK VERSION
   
   ~~~
   4.20/main
   ~~~
   
   # CONFIGURATION
   
   # OS / ENVIRONMENT
   
   KVM, file storage (NFS, Shared mountpoint, local storage)
   
   # SUMMARY
   
   This spec addresses a new feature to allow users to create differential 
volume snapshots/backups on KVM
   
   # 1. Problem description
   
   Currently, when taking a volume snapshot/backup with KVM as the hypervisor, 
ACS creates a temporary delta and makes it the VM's source file, with the 
original volume as a backing store. After that, the original volume is copied 
to another directory (with qemu-img convert), if the 
`snapshot.backup.to.secondary` configuration is set to `true`, the snapshot 
will be copied to the secondary storage, transforming it in a backup; the delta 
is then merged into the original volume. Using this approach, every volume 
snapshot is a full snapshot/backup. However, in many situations, always taking 
full snapshots of volumes is costly for both the storage network and storage 
systems. ACS already executes differential snapshots for XenServer volumes. 
Therefore, the goal of this proposal is to extend the current workflow for the 
integration with KVM, leveraging it to present a similar feature set as we have 
with XenServer.
   
   For the sake of clarity, in this document, we will use the following 
definitions of snapshots and backups:
   
   * Snapshot: A snapshot is a full or incremental copy of a VM's volume in the 
primary storage;
   * Backup: A backup is a volume snapshot that is stored on secondary storage.
   
   # 2. Proposed changes
   
   To address the described problems, we propose to extend the volume snapshot 
feature on KVM that was normalized by #5297, allowing users to create 
differential volume snapshots on KVM. To give operators fine control over which 
type of snapshot is being taken, we propose to add a new global configuration 
`kvm.incremental.snapshot`, which can be overridden on the zone and cluster 
configuration levels; this configuration will be `false` by default.
   
   Using XenServer as the hypervisor, the `snapshot.delta.max` configuration is 
used to determine the number of volume deltas that will be kept simultaneously 
in the primary storage. We propose to use the same configuration for the 
incremental snapshot feature on KVM, and use it to limit the size of the 
snapshot backing chain on the primary/secondary storage. We will also update 
the configuration description to specify that this configuration is only used 
with XenServer and KVM. The implications of the `snapshot.delta.max` 
configuration will be explained in the snapshot/backup creation section. 
   
   Also, it's important to notice that, while the `snapshot.delta.max` 
configuration will define the maximum number of deltas for a backing chain on 
the primary/secondary storage; the maximum number of snapshots that will be 
available to the user is defined by the account's snapshot limit. The interactions between recurring 
snapshots, configurations and account limits section addresses the 
relationship between account limits and configurations.   
   
   ### 2.0.1. The DomainBackupBegin API
   
   To allow incremental snapshots on KVM, we propose to use Libvirt's 
`domainBackupBegin` API. This API allows the creation of either full snapshots 
or incremental snapshots; it also allows the creation of checkpoints, which 
Libvirt uses to create incremental snapshots. A checkpoint represents a point 
in time after which blocks changed by the hypervisor are tracked. The 
checkpoints are Libvirt's abstraction of bitmaps, that is, a checkpoint always 
corresponds to a bitmap on the VM's volume. 
   
   The `domainBackupBegin` API has two main parameters that interest us: 
   
   * `backupXML`: this parameter contains details about the snapshots, 
including which snapshot mode to use, whether the snapshot is incremental from 
a previous checkpoint, which disks participate in the snapshot and the snapshot 
destination.
   * `checkpointXML`: when this parameter is informed, Libvirt creates a 
checkpoint atomically covering the same point in time as the `backup`.
   
   When using Libvirt's `domainBackupBegin` API, if the `backupXML` has the tag 
`` informing the name of a valid checkpoint, an incremental 
snapshot is created based on that checkpoint. Furthermore, the API requires 
that the volume is attached to a VM that is running or paused, as it uses the 
VM's process (QEMU process in the hypervisor operating system) to execute the 
volume snapshot.
   
   Libvirt's checkpoints are always linked to a VM, this means that if we 
undefine or migrate it, they will be lost. However, the bitmap on the volume 
does not depend on the VM; thus, if we save the checkpoint metadata, 

Re: [PR] Quota tariff order [cloudstack]

2024-04-12 Thread via GitHub


JoaoJandre commented on code in PR #8347:
URL: https://github.com/apache/cloudstack/pull/8347#discussion_r1562910276


##
framework/quota/src/main/java/org/apache/cloudstack/quota/QuotaManagerImpl.java:
##
@@ -367,9 +369,22 @@ protected BigDecimal aggregateQuotaTariffsValues(UsageVO 
usageRecord, List lastTariffs = new ArrayList<>();
+
+
 for (QuotaTariffVO quotaTariff : quotaTariffs) {
 if (isQuotaTariffInPeriodToBeApplied(usageRecord, quotaTariff, 
accountToString)) {
-aggregatedQuotaTariffsValue = 
aggregatedQuotaTariffsValue.add(getQuotaTariffValueToBeApplied(quotaTariff, 
jsInterpreter, presetVariables));
+
+BigDecimal tariffValue = 
getQuotaTariffValueToBeApplied(quotaTariff, jsInterpreter, presetVariables, 
lastTariffs);
+
+aggregatedQuotaTariffsValue = 
aggregatedQuotaTariffsValue.add(tariffValue);
+
+Tariff tariffPresetVariable = new Tariff();
+tariffPresetVariable.setId(quotaTariff.getUuid());
+tariffPresetVariable.setValue(tariffValue);
+lastTariffs.add(tariffPresetVariable);

Review Comment:
   Yes, the `tariffPresetVariable` holds the value of the tariff being 
processed now, and it is added to the `lastTariffs` list, so that it can be 
processed in a future activation rule.



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

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

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



Re: [PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8906:
URL: https://github.com/apache/cloudstack/pull/8906#issuecomment-2052084809

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

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



Re: [PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


Pearl1594 commented on PR #8906:
URL: https://github.com/apache/cloudstack/pull/8906#issuecomment-2052083788

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

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



Re: [PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


codecov-commenter commented on PR #8906:
URL: https://github.com/apache/cloudstack/pull/8906#issuecomment-2052042824

   ## 
[Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8906?dropdown=coverage=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   Attention: Patch coverage is `25.0%` with `24 lines` in your changes are 
missing coverage. Please review.
   > Project coverage is 17.72%. Comparing base 
[(`a5508ac`)](https://app.codecov.io/gh/apache/cloudstack/commit/a5508acc54d1638ba469f4d7ce9898b81b5209d0?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 to head 
[(`f44b8aa`)](https://app.codecov.io/gh/apache/cloudstack/pull/8906?dropdown=coverage=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   > Report is 561 commits behind head on main.
   
   | 
[Files](https://app.codecov.io/gh/apache/cloudstack/pull/8906?dropdown=coverage=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...er/actionworkers/KubernetesClusterStartWorker.java](https://app.codecov.io/gh/apache/cloudstack/pull/8906?src=pr=tree=plugins%2Fintegrations%2Fkubernetes-service%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fkubernetes%2Fcluster%2Factionworkers%2FKubernetesClusterStartWorker.java_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-cGx1Z2lucy9pbnRlZ3JhdGlvbnMva3ViZXJuZXRlcy1zZXJ2aWNlL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL2t1YmVybmV0ZXMvY2x1c3Rlci9hY3Rpb253b3JrZXJzL0t1YmVybmV0ZXNDbHVzdGVyU3RhcnRXb3JrZXIuamF2YQ==)
 | 0.00% | [12 Missing :warning: 
](https://app.codecov.io/gh/apache/cloudstack/pull/8906?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...KubernetesClusterResourceModifierActionWorker.java](https://app.codecov.io/gh/apache/cloudstack/pull/8906?src=pr=tree=plugins%2Fintegrations%2Fkubernetes-service%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fkubernetes%2Fcluster%2Factionworkers%2FKubernetesClusterResourceModifierActionWorker.java_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-cGx1Z2lucy9pbnRlZ3JhdGlvbnMva3ViZXJuZXRlcy1zZXJ2aWNlL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL2t1YmVybmV0ZXMvY2x1c3Rlci9hY3Rpb253b3JrZXJzL0t1YmVybmV0ZXNDbHVzdGVyUmVzb3VyY2VNb2RpZmllckFjdGlvbldvcmtlci5qYXZh)
 | 0.00% | [9 Missing :warning: 
](https://app.codecov.io/gh/apache/cloudstack/pull/8906?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...loudstack/resourcedetail/FirewallRuleDetailVO.java](https://app.codecov.io/gh/apache/cloudstack/pull/8906?src=pr=tree=engine%2Fschema%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fresourcedetail%2FFirewallRuleDetailVO.java_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-ZW5naW5lL3NjaGVtYS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9yZXNvdXJjZWRldGFpbC9GaXJld2FsbFJ1bGVEZXRhaWxWTy5qYXZh)
 | 0.00% | [2 Missing :warning: 
](https://app.codecov.io/gh/apache/cloudstack/pull/8906?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[...ain/java/com/cloud/network/NetworkServiceImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8906?src=pr=tree=server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fnetwork%2FNetworkServiceImpl.java_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL25ldHdvcmsvTmV0d29ya1NlcnZpY2VJbXBsLmphdmE=)
 | 0.00% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/cloudstack/pull/8906?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   
   Additional details and impacted files
   
   
   ```diff
   @@ Coverage Diff  @@
   ##   main#8906  +/-   ##
   
   + Coverage 13.17%   17.72%   +4.54% 
   - Complexity 921415937+6723 
   
 Files  2725 4880+2155 
 Lines258235   330669   +72434 
 Branches  4024947925+7676 
   
   + Hits  3401358596   +24583 
   - Misses   219913   263506   +43593 
   - Partials   4309 8567+4258 
   ```
   
   | 
[Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8906/flags?src=pr=flags_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8906/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `17.72% <25.00%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click 

(cloudstack) branch nsx-integration-fixes updated (bcc8ff27a6c -> f44b8aa49c3)

2024-04-12 Thread pearl11594
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a change to branch nsx-integration-fixes
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


from bcc8ff27a6c NSX: Fix number of physical networks for Guest traffic 
checks and leftover rules on CKS cluster deletion (#45)
 add f44b8aa49c3 fix logger

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/cloudstack/resource/NsxResource.java   |  8 
 .../java/org/apache/cloudstack/service/NsxElement.java | 14 +++---
 2 files changed, 11 insertions(+), 11 deletions(-)



(cloudstack) branch main updated (19f79b1d94f -> 45daa1ce591)

2024-04-12 Thread weizhou
This is an automated email from the ASF dual-hosted git repository.

weizhou pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


from 19f79b1d94f Merge branch '4.19'
 add b998e7dbb63 Allow overriding root disk offering & size, and expunge 
old root disk while restoring a VM (#8800)
 add 44aa08c02a3 Fixup 4.19 build issue (#8905)
 new 45daa1ce591 Merge remote-tracking branch 'apache/4.19'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/com/cloud/storage/VolumeApiService.java   |   2 +
 api/src/main/java/com/cloud/vm/UserVmService.java  |   2 +-
 .../api/command/user/vm/RestoreVMCmd.java  |  45 ++-
 .../java/com/cloud/vm/VirtualMachineManager.java   |   2 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java|  18 +-
 .../src/main/java/com/cloud/vm/VmWorkRestore.java  |  27 +-
 .../engine/orchestration/CloudOrchestrator.java|   7 +-
 .../engine/orchestration/VolumeOrchestrator.java   |  65 ++---
 .../com/cloud/storage/VolumeApiServiceImpl.java|  14 +-
 .../main/java/com/cloud/vm/UserVmManagerImpl.java  | 124 +++--
 .../cloudstack/vm/UnmanagedVMsManagerImpl.java |  11 +-
 .../java/com/cloud/vm/UserVmManagerImplTest.java   |  26 +-
 ui/src/config/section/compute.js   |  27 +-
 ui/src/views/compute/ReinstallVm.vue   | 307 +
 14 files changed, 542 insertions(+), 135 deletions(-)
 create mode 100644 ui/src/views/compute/ReinstallVm.vue



(cloudstack) 01/01: Merge remote-tracking branch 'apache/4.19'

2024-04-12 Thread weizhou
This is an automated email from the ASF dual-hosted git repository.

weizhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 45daa1ce591a43442c30cc6ec9a70124440063eb
Merge: 19f79b1d94f 44aa08c02a3
Author: Wei Zhou 
AuthorDate: Fri Apr 12 16:40:07 2024 +0200

Merge remote-tracking branch 'apache/4.19'

 .../java/com/cloud/storage/VolumeApiService.java   |   2 +
 api/src/main/java/com/cloud/vm/UserVmService.java  |   2 +-
 .../api/command/user/vm/RestoreVMCmd.java  |  45 ++-
 .../java/com/cloud/vm/VirtualMachineManager.java   |   2 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java|  18 +-
 .../src/main/java/com/cloud/vm/VmWorkRestore.java  |  27 +-
 .../engine/orchestration/CloudOrchestrator.java|   7 +-
 .../engine/orchestration/VolumeOrchestrator.java   |  65 ++---
 .../com/cloud/storage/VolumeApiServiceImpl.java|  14 +-
 .../main/java/com/cloud/vm/UserVmManagerImpl.java  | 124 +++--
 .../cloudstack/vm/UnmanagedVMsManagerImpl.java |  11 +-
 .../java/com/cloud/vm/UserVmManagerImplTest.java   |  26 +-
 ui/src/config/section/compute.js   |  27 +-
 ui/src/views/compute/ReinstallVm.vue   | 307 +
 14 files changed, 542 insertions(+), 135 deletions(-)

diff --cc 
api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
index e1c4dd5f678,17c4e97eb3b..3839049eee5
--- 
a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
+++ 
b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
@@@ -16,9 -16,12 +16,9 @@@
  // under the License.
  package org.apache.cloudstack.api.command.user.vm;
  
- import org.apache.cloudstack.api.ApiCommandResourceType;
- 
+ import com.cloud.vm.VmDetailConstants;
 -import org.apache.cloudstack.api.ApiCommandResourceType;
 -import org.apache.cloudstack.api.response.DiskOfferingResponse;
 -import org.apache.log4j.Logger;
 -
  import org.apache.cloudstack.acl.SecurityChecker.AccessType;
++import org.apache.cloudstack.api.ApiCommandResourceType;
  import org.apache.cloudstack.api.ACL;
  import org.apache.cloudstack.api.APICommand;
  import org.apache.cloudstack.api.ApiConstants;
@@@ -28,6 -31,6 +28,7 @@@ import org.apache.cloudstack.api.Parame
  import org.apache.cloudstack.api.ResponseObject.ResponseView;
  import org.apache.cloudstack.api.ServerApiException;
  import org.apache.cloudstack.api.command.user.UserCmd;
++import org.apache.cloudstack.api.response.DiskOfferingResponse;
  import org.apache.cloudstack.api.response.TemplateResponse;
  import org.apache.cloudstack.api.response.UserVmResponse;
  import org.apache.cloudstack.context.CallContext;
diff --cc 
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
index 4372741de66,243613907ff..9f743668cd5
--- 
a/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
+++ 
b/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
@@@ -5691,8 -5610,20 +5691,8 @@@ public class VirtualMachineManagerImpl 
  return workJob;
  }
  
 -protected void resourceCountIncrement (long accountId, Long cpu, Long 
memory) {
 -_resourceLimitMgr.incrementResourceCount(accountId, 
ResourceType.user_vm);
 -_resourceLimitMgr.incrementResourceCount(accountId, ResourceType.cpu, 
cpu);
 -_resourceLimitMgr.incrementResourceCount(accountId, 
ResourceType.memory, memory);
 -}
 -
 -protected void resourceCountDecrement (long accountId, Long cpu, Long 
memory) {
 -_resourceLimitMgr.decrementResourceCount(accountId, 
ResourceType.user_vm);
 -_resourceLimitMgr.decrementResourceCount(accountId, ResourceType.cpu, 
cpu);
 -_resourceLimitMgr.decrementResourceCount(accountId, 
ResourceType.memory, memory);
 -}
 -
  @Override
- public UserVm restoreVirtualMachine(final long vmId, final Long 
newTemplateId) throws ResourceUnavailableException, 
InsufficientCapacityException {
+ public UserVm restoreVirtualMachine(final long vmId, final Long 
newTemplateId, final Long rootDiskOfferingId, final boolean expunge, final 
Map details) throws ResourceUnavailableException, 
InsufficientCapacityException {
  final AsyncJobExecutionContext jobContext = 
AsyncJobExecutionContext.getCurrentExecutionContext();
  if 
(jobContext.isJobDispatchedBy(VmWorkConstants.VM_WORK_JOB_DISPATCHER)) {
  VmWorkJobVO placeHolder = null;
@@@ -5722,14 -5653,14 +5722,14 @@@
  }
  }
  
- private UserVm orchestrateRestoreVirtualMachine(final long vmId, final 
Long newTemplateId) throws ResourceUnavailableException, 
InsufficientCapacityException {
- logger.debug("Restoring vm " + vmId + " with new templateId " + 
newTemplateId);
+ private UserVm orchestrateRestoreVirtualMachine(final long vmId, final 
Long newTemplateId, final Long rootDiskOfferingId, final boolean expunge, final 
Map details) 

Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


codecov-commenter commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2051933838

   ## 
[Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8903?dropdown=coverage=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   Attention: Patch coverage is `87.64045%` with `11 lines` in your changes are 
missing coverage. Please review.
   > Project coverage is 15.20%. Comparing base 
[(`a5508ac`)](https://app.codecov.io/gh/apache/cloudstack/commit/a5508acc54d1638ba469f4d7ce9898b81b5209d0?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 to head 
[(`b1797bf`)](https://app.codecov.io/gh/apache/cloudstack/pull/8903?dropdown=coverage=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   > Report is 558 commits behind head on main.
   
   | 
[Files](https://app.codecov.io/gh/apache/cloudstack/pull/8903?dropdown=coverage=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[.../cloud/configuration/dao/ResourceCountDaoImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8903?src=pr=tree=engine%2Fschema%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fconfiguration%2Fdao%2FResourceCountDaoImpl.java_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-ZW5naW5lL3NjaGVtYS9zcmMvbWFpbi9qYXZhL2NvbS9jbG91ZC9jb25maWd1cmF0aW9uL2Rhby9SZXNvdXJjZUNvdW50RGFvSW1wbC5qYXZh)
 | 80.00% | [5 Missing and 2 partials :warning: 
](https://app.codecov.io/gh/apache/cloudstack/pull/8903?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   | 
[.../cloud/resourcelimit/ResourceLimitManagerImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8903?src=pr=tree=server%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fresourcelimit%2FResourceLimitManagerImpl.java_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL3Jlc291cmNlbGltaXQvUmVzb3VyY2VMaW1pdE1hbmFnZXJJbXBsLmphdmE=)
 | 91.30% | [0 Missing and 4 partials :warning: 
](https://app.codecov.io/gh/apache/cloudstack/pull/8903?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 |
   
   Additional details and impacted files
   
   
   ```diff
   @@ Coverage Diff  @@
   ##   main#8903  +/-   ##
   
   + Coverage 13.17%   15.20%   +2.03% 
   - Complexity 921412936+3722 
   
 Files  2725 4880+2155 
 Lines258235   327065   +68830 
 Branches  4024946220+5971 
   
   + Hits  3401349726   +15713 
   - Misses   219913   270395   +50482 
   - Partials   4309 6944+2635 
   ```
   
   | 
[Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8903/flags?src=pr=flags_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8903/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `15.20% <87.64%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8903?dropdown=coverage=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_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-unsubscr...@cloudstack.apache.org

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



Re: [PR] Fixup 4.19 build issue [cloudstack]

2024-04-12 Thread via GitHub


weizhouapache merged PR #8905:
URL: https://github.com/apache/cloudstack/pull/8905


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

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

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



(cloudstack) branch 4.19 updated: Fixup 4.19 build issue (#8905)

2024-04-12 Thread weizhou
This is an automated email from the ASF dual-hosted git repository.

weizhou pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.19 by this push:
 new 44aa08c02a3 Fixup 4.19 build issue (#8905)
44aa08c02a3 is described below

commit 44aa08c02a32cd7d899df0ffd8785f337ea9affd
Author: Vishesh 
AuthorDate: Fri Apr 12 20:07:25 2024 +0530

Fixup 4.19 build issue (#8905)
---
 .../engine/orchestration/VolumeOrchestrator.java   | 26 --
 1 file changed, 26 deletions(-)

diff --git 
a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
 
b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
index 5c79fb64d8d..e49616d06ca 100644
--- 
a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
+++ 
b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
@@ -880,32 +880,6 @@ public class VolumeOrchestrator extends ManagerBase 
implements VolumeOrchestrati
 return diskProfile;
 }
 
-@Override
-public void saveVolumeDetails(Long diskOfferingId, Long volumeId) {
-List volumeDetailsVO = new ArrayList<>();
-DiskOfferingDetailVO bandwidthLimitDetail = 
_diskOfferingDetailDao.findDetail(diskOfferingId, 
Volume.BANDWIDTH_LIMIT_IN_MBPS);
-if (bandwidthLimitDetail != null) {
-volumeDetailsVO.add(new VolumeDetailVO(volumeId, 
Volume.BANDWIDTH_LIMIT_IN_MBPS, bandwidthLimitDetail.getValue(), false));
-} else {
-VolumeDetailVO bandwidthLimit = _volDetailDao.findDetail(volumeId, 
Volume.BANDWIDTH_LIMIT_IN_MBPS);
-if (bandwidthLimit != null) {
-_volDetailDao.remove(bandwidthLimit.getId());
-}
-}
-DiskOfferingDetailVO iopsLimitDetail = 
_diskOfferingDetailDao.findDetail(diskOfferingId, Volume.IOPS_LIMIT);
-if (iopsLimitDetail != null) {
-volumeDetailsVO.add(new VolumeDetailVO(volumeId, 
Volume.IOPS_LIMIT, iopsLimitDetail.getValue(), false));
-} else {
-VolumeDetailVO iopsLimit = _volDetailDao.findDetail(volumeId, 
Volume.IOPS_LIMIT);
-if (iopsLimit != null) {
-_volDetailDao.remove(iopsLimit.getId());
-}
-}
-if (!volumeDetailsVO.isEmpty()) {
-_volDetailDao.saveDetails(volumeDetailsVO);
-}
-}
-
 private DiskProfile allocateTemplatedVolume(Type type, String name, 
DiskOffering offering, Long rootDisksize, Long minIops, Long maxIops, 
VirtualMachineTemplate template, VirtualMachine vm,
 Account owner, long deviceId, 
String configurationId) {
 assert (template.getFormat() != ImageFormat.ISO) : "ISO is not a 
template.";



Re: [PR] Fixup 4.19 build issue [cloudstack]

2024-04-12 Thread via GitHub


weizhouapache commented on PR #8905:
URL: https://github.com/apache/cloudstack/pull/8905#issuecomment-2051884270

   strange issue caused by same method in #8872  and #8800 


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

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

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



[PR] NSX Integration fixes [cloudstack]

2024-04-12 Thread via GitHub


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

   ### Description
   
   This PR addresses issues identified in 
https://github.com/apache/cloudstack/pull/7919 
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   ### 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)
   - [ ] 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
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   
   
   
    How did you try to break this feature and the system with this change?
   
   
   
   
   
   


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

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

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



(cloudstack) 06/06: NSX: Fix number of physical networks for Guest traffic checks and leftover rules on CKS cluster deletion (#45)

2024-04-12 Thread pearl11594
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch nsx-integration-fixes
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit bcc8ff27a6caa9dba679701c32f3c1b99a1e4aca
Author: Nicolas Vazquez 
AuthorDate: Thu Apr 11 22:19:34 2024 -0300

NSX: Fix number of physical networks for Guest traffic checks and leftover 
rules on CKS cluster deletion (#45)

* Fix pf rules removal on CKS cluster deletion

* Fix check for number of physical networks for guest traffic

* Fix unit test
---
 .../org/apache/cloudstack/service/NsxElement.java   | 21 +++--
 .../apache/cloudstack/service/NsxElementTest.java   |  1 +
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git 
a/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/service/NsxElement.java
 
b/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/service/NsxElement.java
index f3f4b1c135b..3937ba9aba1 100644
--- 
a/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/service/NsxElement.java
+++ 
b/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/service/NsxElement.java
@@ -127,6 +127,7 @@ import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
 import java.util.function.LongFunction;
+import java.util.stream.Collectors;
 
 @Component
 public class NsxElement extends AdapterBase implements  DhcpServiceProvider, 
DnsServiceProvider, VpcProvider,
@@ -403,10 +404,18 @@ public class NsxElement extends AdapterBase implements  
DhcpServiceProvider, Dns
 Account account = null;
 boolean forNsx = false;
 List physicalNetworks = 
physicalNetworkDao.listByZoneAndTrafficType(zone.getId(), 
Networks.TrafficType.Guest);
-if (CollectionUtils.isNullOrEmpty(physicalNetworks) || 
physicalNetworks.size() > 1 ) {
-throw new InvalidConfigurationException(String.format("Desired 
number of physical networks is not present in the zone %s for traffic type %s. 
", zone.getName(), Networks.TrafficType.Guest.name()));
-}
-if (physicalNetworks.get(0).getIsolationMethods().contains("NSX")) {
+if (CollectionUtils.isNullOrEmpty(physicalNetworks)) {
+String err = String.format("Desired physical network is not 
present in the zone %s for traffic type %s. ", zone.getName(), 
Networks.TrafficType.Guest.name());
+LOGGER.error(err);
+throw new InvalidConfigurationException(err);
+}
+List filteredPhysicalNetworks = 
physicalNetworks.stream().filter(x -> 
x.getIsolationMethods().contains("NSX")).collect(Collectors.toList());
+if (CollectionUtils.isNullOrEmpty(filteredPhysicalNetworks)) {
+String err = String.format("No physical network with NSX isolation 
type for traffic type %s is present in the zone %s.", 
Networks.TrafficType.Guest.name(), zone.getName());
+LOGGER.error(err);
+throw new InvalidConfigurationException(err);
+}
+if 
(filteredPhysicalNetworks.get(0).getIsolationMethods().contains("NSX")) {
 account = accountMgr.getAccount(vpc.getAccountId());
 forNsx = true;
 }
@@ -585,9 +594,9 @@ public class NsxElement extends AdapterBase implements  
DhcpServiceProvider, Dns
 result &= pfRuleResult;
 }
 } else if (rule.getState() == FirewallRule.State.Revoke) {
-if (ruleDetail != null && 
ruleDetail.getValue().equalsIgnoreCase("true")) {
+if (ruleDetail == null || (ruleDetail != null && 
ruleDetail.getValue().equalsIgnoreCase("true"))) {
 boolean pfRuleResult = 
nsxService.deletePortForwardRule(networkRule);
-if (pfRuleResult) {
+if (pfRuleResult && ruleDetail != null) {
 LOGGER.debug(String.format("Updating firewall rule 
detail %s for rule %s, set to false", ruleDetail.getId(), rule.getId()));
 ruleDetail.setValue("false");
 firewallRuleDetailsDao.update(ruleDetail.getId(), 
ruleDetail);
diff --git 
a/plugins/network-elements/nsx/src/test/java/org/apache/cloudstack/service/NsxElementTest.java
 
b/plugins/network-elements/nsx/src/test/java/org/apache/cloudstack/service/NsxElementTest.java
index 59930d68d10..7c44a7324fb 100644
--- 
a/plugins/network-elements/nsx/src/test/java/org/apache/cloudstack/service/NsxElementTest.java
+++ 
b/plugins/network-elements/nsx/src/test/java/org/apache/cloudstack/service/NsxElementTest.java
@@ -283,6 +283,7 @@ public class NsxElementTest {
 IPAddressVO ipAddress = new IPAddressVO(new Ip("10.1.13.10"), 1L, 1L, 
1L,false);
 when(ApiDBUtils.findIpAddressById(anyLong())).thenReturn(ipAddress);
 when(nsxElement.canHandle(networkVO, service)).thenReturn(true);
+

(cloudstack) branch nsx-integration-fixes created (now bcc8ff27a6c)

2024-04-12 Thread pearl11594
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a change to branch nsx-integration-fixes
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


  at bcc8ff27a6c NSX: Fix number of physical networks for Guest traffic 
checks and leftover rules on CKS cluster deletion (#45)

This branch includes the following new commits:

 new 523620f6e14 Prevent addition of duplicate PF rules on scale up and no 
rules left behind on scale down (#32)
 new 357980650dc fix missing dependency injection
 new f228c7afe6c NSX: Fix concurrency issues on port forwarding rules 
deletion (#37)
 new a89964854e3 CKS: Externalize control and worker node setup wait time 
and installation attempts (#38)
 new 968235af183 NSX: Add shared network support (#41)
 new bcc8ff27a6c NSX: Fix number of physical networks for Guest traffic 
checks and leftover rules on CKS cluster deletion (#45)

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




(cloudstack) 03/06: NSX: Fix concurrency issues on port forwarding rules deletion (#37)

2024-04-12 Thread pearl11594
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch nsx-integration-fixes
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit f228c7afe6c5ddde4a6a75b31cf3c0c3e0ee324f
Author: Nicolas Vazquez 
AuthorDate: Wed Apr 10 11:05:50 2024 -0300

NSX: Fix concurrency issues on port forwarding rules deletion (#37)

* Fix concurrency issues on port forwarding rules deletion

* Refactor objectExists

* Fix unit test

* Fix test

* Small fixes
---
 .../resourcedetail/FirewallRuleDetailVO.java   |   4 +
 .../main/java/org/apache/cloudstack/NsxAnswer.java |  10 ++
 .../apache/cloudstack/resource/NsxResource.java|  20 ++--
 .../apache/cloudstack/service/NsxApiClient.java|  47 ++---
 .../org/apache/cloudstack/service/NsxElement.java  | 108 ++---
 .../apache/cloudstack/service/NsxServiceImpl.java  |   5 +-
 .../apache/cloudstack/service/NsxElementTest.java  |   5 +-
 7 files changed, 140 insertions(+), 59 deletions(-)

diff --git 
a/engine/schema/src/main/java/org/apache/cloudstack/resourcedetail/FirewallRuleDetailVO.java
 
b/engine/schema/src/main/java/org/apache/cloudstack/resourcedetail/FirewallRuleDetailVO.java
index 636d889fafe..1149d0b13e7 100644
--- 
a/engine/schema/src/main/java/org/apache/cloudstack/resourcedetail/FirewallRuleDetailVO.java
+++ 
b/engine/schema/src/main/java/org/apache/cloudstack/resourcedetail/FirewallRuleDetailVO.java
@@ -79,4 +79,8 @@ public class FirewallRuleDetailVO implements ResourceDetail {
 public boolean isDisplay() {
 return display;
 }
+
+public void setValue(String value) {
+this.value = value;
+}
 }
diff --git 
a/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/NsxAnswer.java
 
b/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/NsxAnswer.java
index 0820465a6b6..a667adda794 100644
--- 
a/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/NsxAnswer.java
+++ 
b/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/NsxAnswer.java
@@ -20,6 +20,9 @@ import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.Command;
 
 public class NsxAnswer extends Answer {
+
+private boolean objectExists;
+
 public NsxAnswer(final Command command, final boolean success, final 
String details) {
 super(command, success, details);
 }
@@ -28,4 +31,11 @@ public class NsxAnswer extends Answer {
 super(command, e);
 }
 
+public boolean isObjectExistent() {
+return objectExists;
+}
+
+public void setObjectExists(boolean objectExisted) {
+this.objectExists = objectExisted;
+}
 }
diff --git 
a/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/resource/NsxResource.java
 
b/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/resource/NsxResource.java
index cd1d481b9f8..42ee24436ea 100644
--- 
a/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/resource/NsxResource.java
+++ 
b/plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/resource/NsxResource.java
@@ -385,16 +385,21 @@ public class NsxResource implements ServerResource {
 cmd.getNetworkResourceId(), cmd.isResourceVpc());
 try {
 String privatePort = cmd.getPrivatePort();
-String service = privatePort.contains("-") ? 
nsxApiClient.getServicePath(ruleName, privatePort, cmd.getProtocol(), null, 
null) :
-nsxApiClient.getNsxInfraServices(ruleName, privatePort, 
cmd.getProtocol(), null, null);
+LOGGER.debug(String.format("Checking if rule %s exists on Tier 1 
Gateway: %s", ruleName, tier1GatewayName));
 if (nsxApiClient.doesPfRuleExist(ruleName, tier1GatewayName)) {
-logger.debug(String.format("Port forward rule for port: %s 
exits on NSX, not adding it again", privatePort));
-return new NsxAnswer(cmd, true, null);
+String msg = String.format("Port forward rule for port: %s 
(%s) exits on NSX, not adding it again", ruleName, privatePort);
+LOGGER.debug(msg);
+NsxAnswer answer = new NsxAnswer(cmd, true, msg);
+answer.setObjectExists(true);
+return answer;
 }
+String service = privatePort.contains("-") ? 
nsxApiClient.getServicePath(ruleName, privatePort, cmd.getProtocol(), null, 
null) :
+nsxApiClient.getNsxInfraServices(ruleName, privatePort, 
cmd.getProtocol(), null, null);
 nsxApiClient.createPortForwardingRule(ruleName, tier1GatewayName, 
cmd.getNetworkResourceName(), cmd.getPublicIp(),
 cmd.getVmIp(), cmd.getPublicPort(), service);
 } catch (Exception e) {
-logger.error(String.format("Failed to add NSX port forward rule %s 
for network: %s", ruleName, cmd.getNetworkResourceName()));
+String msg = 

(cloudstack) 02/06: fix missing dependency injection

2024-04-12 Thread pearl11594
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch nsx-integration-fixes
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 357980650dcbcf8e09f1348367800de215036810
Author: Pearl Dsilva 
AuthorDate: Thu Mar 28 09:09:56 2024 -0400

fix missing dependency injection
---
 .../actionworkers/KubernetesClusterResourceModifierActionWorker.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
index f500677754b..d0f9cf842c5 100644
--- 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
+++ 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
@@ -31,6 +31,7 @@ import java.util.stream.Collectors;
 
 import javax.inject.Inject;
 
+import com.cloud.network.rules.FirewallManager;
 import com.cloud.offering.NetworkOffering;
 import com.cloud.offerings.dao.NetworkOfferingDao;
 import org.apache.cloudstack.api.ApiConstants;
@@ -136,6 +137,8 @@ public class KubernetesClusterResourceModifierActionWorker 
extends KubernetesClu
 @Inject
 protected RulesService rulesService;
 @Inject
+protected FirewallManager firewallManager;
+@Inject
 protected PortForwardingRulesDao portForwardingRulesDao;
 @Inject
 protected ResourceManager resourceManager;
@@ -551,7 +554,7 @@ public class KubernetesClusterResourceModifierActionWorker 
extends KubernetesClu
 for (PortForwardingRuleVO pfRule : pfRules) {
 if (startPort <= pfRule.getSourcePortStart() && 
pfRule.getSourcePortStart() <= endPort) {
 portForwardingRulesDao.remove(pfRule.getId());
-LOGGER.trace("Marking PF rule " + pfRule + " with Revoke 
state");
+logger.trace("Marking PF rule " + pfRule + " with Revoke 
state");
 pfRule.setState(FirewallRule.State.Revoke);
 
 }



(cloudstack) 04/06: CKS: Externalize control and worker node setup wait time and installation attempts (#38)

2024-04-12 Thread pearl11594
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch nsx-integration-fixes
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit a89964854e30d8d703e72d956684e254a77d9d79
Author: Pearl Dsilva 
AuthorDate: Wed Apr 10 10:06:40 2024 -0400

CKS: Externalize control and worker node setup wait time and installation 
attempts (#38)
---
 .../cluster/KubernetesClusterManagerImpl.java  |  6 +-
 .../cluster/KubernetesClusterService.java  | 24 ++
 ...ernetesClusterResourceModifierActionWorker.java |  9 +++-
 .../KubernetesClusterStartWorker.java  | 14 +
 .../main/resources/conf/k8s-control-node-add.yml   | 10 +++--
 .../src/main/resources/conf/k8s-control-node.yml   | 10 +++--
 .../src/main/resources/conf/k8s-node.yml   | 10 +++--
 7 files changed, 75 insertions(+), 8 deletions(-)

diff --git 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
index 834d6d0..6fff17e3428 100644
--- 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
+++ 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
@@ -1984,7 +1984,11 @@ public class KubernetesClusterManagerImpl extends 
ManagerBase implements Kuberne
 KubernetesClusterUpgradeTimeout,
 KubernetesClusterUpgradeRetries,
 KubernetesClusterExperimentalFeaturesEnabled,
-KubernetesMaxClusterSize
+KubernetesMaxClusterSize,
+KubernetesControlNodeInstallAttemptWait,
+KubernetesControlNodeInstallReattempts,
+KubernetesWorkerNodeInstallAttemptWait,
+KubernetesWorkerNodeInstallReattempts
 };
 }
 }
diff --git 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterService.java
 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterService.java
index 39b926537f5..5d5e188fa45 100644
--- 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterService.java
+++ 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterService.java
@@ -91,6 +91,30 @@ public interface KubernetesClusterService extends 
PluggableService, Configurable
 true,
 ConfigKey.Scope.Account,
 KubernetesServiceEnabled.key());
+static final ConfigKey KubernetesControlNodeInstallAttemptWait = new 
ConfigKey("Advanced", Long.class,
+"cloud.kubernetes.control.node.install.attempt.wait.duration",
+"15",
+"Time in seconds for the installation process to wait before it 
re-attempts",
+true,
+KubernetesServiceEnabled.key());
+static final ConfigKey KubernetesControlNodeInstallReattempts = new 
ConfigKey("Advanced", Long.class,
+"cloud.kubernetes.control.node.install.reattempt.count",
+"100",
+"Number of times the offline installation of K8S will be 
re-attempted",
+true,
+KubernetesServiceEnabled.key());
+final ConfigKey KubernetesWorkerNodeInstallAttemptWait = new 
ConfigKey("Advanced", Long.class,
+"cloud.kubernetes.worker.node.install.attempt.wait.duration",
+"30",
+"Time in seconds for the installation process to wait before it 
re-attempts",
+true,
+KubernetesServiceEnabled.key());
+static final ConfigKey KubernetesWorkerNodeInstallReattempts = new 
ConfigKey("Advanced", Long.class,
+"cloud.kubernetes.worker.node.install.reattempt.count",
+"40",
+"Number of times the offline installation of K8S will be 
re-attempted",
+true,
+KubernetesServiceEnabled.key());
 
 KubernetesCluster findById(final Long id);
 
diff --git 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
index d0f9cf842c5..cf4bb07f58b 100644
--- 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
+++ 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
@@ -31,6 +31,7 @@ import java.util.stream.Collectors;
 
 import javax.inject.Inject;
 
+import 

(cloudstack) 05/06: NSX: Add shared network support (#41)

2024-04-12 Thread pearl11594
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch nsx-integration-fixes
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 968235af18344fd12332b3743176ce22351bfaf7
Author: Pearl Dsilva 
AuthorDate: Wed Apr 10 10:10:00 2024 -0400

NSX: Add shared network support (#41)
---
 .../src/main/java/com/cloud/network/NetworkServiceImpl.java   |  2 +-
 ui/src/views/network/CreateSharedNetworkForm.vue  | 11 ++-
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java 
b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
index 6168de1ef63..2afa16a06d3 100644
--- a/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/main/java/com/cloud/network/NetworkServiceImpl.java
@@ -1749,7 +1749,7 @@ public class NetworkServiceImpl extends ManagerBase 
implements NetworkService, C
 
 private void validateNetworkCreationSupported(long zoneId, String 
zoneName, GuestType guestType) {
 NsxProviderVO nsxProviderVO = nsxProviderDao.findByZoneId(zoneId);
-if (Objects.nonNull(nsxProviderVO) && List.of(GuestType.L2, 
GuestType.Shared).contains(guestType)) {
+if (Objects.nonNull(nsxProviderVO) && 
List.of(GuestType.L2).contains(guestType)) {
 throw new InvalidParameterValueException(
 String.format("Creation of %s networks is not supported in 
NSX enabled zone %s", guestType.name(), zoneName)
 );
diff --git a/ui/src/views/network/CreateSharedNetworkForm.vue 
b/ui/src/views/network/CreateSharedNetworkForm.vue
index 4fd42370946..b0c7203f833 100644
--- a/ui/src/views/network/CreateSharedNetworkForm.vue
+++ b/ui/src/views/network/CreateSharedNetworkForm.vue
@@ -18,14 +18,7 @@
 
   
 
-  
-
-  
-
-  
-
-  
-  
+  
 

(cloudstack) 01/06: Prevent addition of duplicate PF rules on scale up and no rules left behind on scale down (#32)

2024-04-12 Thread pearl11594
This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch nsx-integration-fixes
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 523620f6e14f40439a649afb66568a9c513bdf86
Author: Pearl Dsilva 
AuthorDate: Mon Mar 11 11:59:11 2024 -0400

Prevent addition of duplicate PF rules on scale up and no rules left behind 
on scale down (#32)
---
 .../actionworkers/KubernetesClusterResourceModifierActionWorker.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
index e8bc8e2851e..f500677754b 100644
--- 
a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
+++ 
b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
@@ -551,9 +551,12 @@ public class KubernetesClusterResourceModifierActionWorker 
extends KubernetesClu
 for (PortForwardingRuleVO pfRule : pfRules) {
 if (startPort <= pfRule.getSourcePortStart() && 
pfRule.getSourcePortStart() <= endPort) {
 portForwardingRulesDao.remove(pfRule.getId());
+LOGGER.trace("Marking PF rule " + pfRule + " with Revoke 
state");
+pfRule.setState(FirewallRule.State.Revoke);
+
 }
 }
-rulesService.applyPortForwardingRules(publicIp.getId(), account);
+firewallManager.applyRules(pfRules, false, true);
 }
 
 protected void removeLoadBalancingRule(final IpAddress publicIp, final 
Network network,



Re: [PR] log sanitation on output of jobs [cloudstack]

2024-04-12 Thread via GitHub


DaanHoogland commented on code in PR #8890:
URL: https://github.com/apache/cloudstack/pull/8890#discussion_r1562604671


##
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java:
##
@@ -3106,17 +3106,16 @@ protected String parseCifsMountOptions(URI uri) {
 extraOpts.append(name + "=" + nvp.getValue() + ",");
 }
 
-if (logger.isDebugEnabled()) {
-logger.error("extraOpts now " + extraOpts);
-}
+String extraOptions = extraOpts.toString();
+logger.error("extraOpts now ", 
()->StringUtils.cleanString(extraOptions));

Review Comment:
   hm, decisions, decisions, decisions, ... ;)
   
   maybe even trace, I just copied the original call.



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

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

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



Re: [PR] prevent an NPE on an uninitialised TemplateObject [cloudstack]

2024-04-12 Thread via GitHub


DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1562601496


##
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##
@@ -93,10 +95,15 @@ public static TemplateObject getTemplate(VMTemplateVO vo, 
DataStore store, Strin
 }
 
 public void setSize(Long size) {
-imageVO.setSize(size);
+getImage().setSize(size);
 }
 
 public VMTemplateVO getImage() {
+if (imageVO == null) {

Review Comment:
   That is not how it is used in the code I'm afraid. The constructor is called 
and next configure is called with the undelying template object. I can move the 
exception to the configure call, if we think that makes ore sense.. We'd still 
have to guard during the get in case configure was never called.



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

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

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



Re: [PR] Fixup 4.19 build issue [cloudstack]

2024-04-12 Thread via GitHub


codecov-commenter commented on PR #8905:
URL: https://github.com/apache/cloudstack/pull/8905#issuecomment-2051822213

   ## 
[Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8905?dropdown=coverage=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 16.24%. Comparing base 
[(`c7626eb`)](https://app.codecov.io/gh/apache/cloudstack/commit/c7626ebfd6323b7bb656dbe5bf221a8c811769fd?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 to head 
[(`30bb2ee`)](https://app.codecov.io/gh/apache/cloudstack/pull/8905?dropdown=coverage=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   > Report is 4 commits behind head on 4.19.
   
   
   Additional details and impacted files
   
   
   ```diff
   @@ Coverage Diff  @@
   ##   4.19#8905  +/-   ##
   
   + Coverage 15.36%   16.24%   +0.88% 
   - Complexity1362014544 +924 
   
 Files  4862 4863   +1 
 Lines325934   326034 +100 
 Branches  4581445840  +26 
   
   + Hits  5007452960+2886 
   + Misses   268857   265597-3260 
   - Partials   7003 7477 +474 
   ```
   
   | 
[Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8905/flags?src=pr=flags_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8905/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `16.24% <ø> (+0.88%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8905?dropdown=coverage=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_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-unsubscr...@cloudstack.apache.org

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



Re: [PR] Update volume's passphrase to null if diskOffering doesn't support encryption [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8904:
URL: https://github.com/apache/cloudstack/pull/8904#issuecomment-2051787649

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9236


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

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

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



Re: [PR] Fix spelling in code comments [cloudstack]

2024-04-12 Thread via GitHub


codecov-commenter commented on PR #8866:
URL: https://github.com/apache/cloudstack/pull/8866#issuecomment-2051761901

   ## 
[Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8866?dropdown=coverage=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 31.16%. Comparing base 
[(`a0b642c`)](https://app.codecov.io/gh/apache/cloudstack/commit/a0b642cdb851ffd19acb21bac70149cb75045cb5?dropdown=coverage=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 to head 
[(`ccfa619`)](https://app.codecov.io/gh/apache/cloudstack/pull/8866?dropdown=coverage=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   > Report is 34 commits behind head on main.
   
   
   Additional details and impacted files
   
   
   ```diff
   @@ Coverage Diff  @@
   ##   main#8866  +/-   ##
   
   + Coverage 30.91%   31.16%   +0.25% 
   - Complexity3373434040 +306 
   
 Files  5404 5404  
 Lines380289   380289  
 Branches  5548955489  
   
   + Hits 117550   118505 +955 
   + Misses   247104   246085-1019 
   - Partials  1563515699  +64 
   ```
   
   | 
[Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8866/flags?src=pr=flags_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8866/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `24.92% <ø> (+0.39%)` | :arrow_up: |
   | 
[uitests](https://app.codecov.io/gh/apache/cloudstack/pull/8866/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `4.34% <ø> (ø)` | |
   | 
[unit-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8866/flags?src=pr=flag_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache)
 | `16.88% <ø> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   
   
   
   [:umbrella: View full report in Codecov by 
Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8866?dropdown=coverage=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral_source=github_content=comment_campaign=pr+comments_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-unsubscr...@cloudstack.apache.org

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



Re: [PR] Fix spelling in code comments [cloudstack]

2024-04-12 Thread via GitHub


github-actions[bot] commented on PR #8866:
URL: https://github.com/apache/cloudstack/pull/8866#issuecomment-2051756519

   This pull request has merge conflicts. Dear author, please fix the conflicts 
and sync your branch with the base branch.


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

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

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



Re: [PR] Added support for storpool_qos service [cloudstack]

2024-04-12 Thread via GitHub


github-actions[bot] commented on PR #8755:
URL: https://github.com/apache/cloudstack/pull/8755#issuecomment-2051756420

   This pull request has merge conflicts. Dear author, please fix the conflicts 
and sync your branch with the base branch.


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

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

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



Re: [PR] linstor: cleanup diskless nodes on disconnect [cloudstack]

2024-04-12 Thread via GitHub


github-actions[bot] commented on PR #8790:
URL: https://github.com/apache/cloudstack/pull/8790#issuecomment-2051756466

   This pull request has merge conflicts. Dear author, please fix the conflicts 
and sync your branch with the base branch.


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

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

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



[PR] Fixup main build issue [cloudstack]

2024-04-12 Thread via GitHub


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

   ### Description
   
   This PR fixes the build issue on 4.19
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   ### 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)
   - [ ] 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
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   
   
   
    How did you try to break this feature and the system with this change?
   
   
   
   
   
   


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

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

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



Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


DaanHoogland commented on code in PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#discussion_r1562504691


##
engine/schema/src/main/java/com/cloud/configuration/dao/ResourceCountDaoImpl.java:
##
@@ -154,6 +175,28 @@ public boolean updateById(long id, boolean increment, long 
delta) {
 return update(resourceCountVO.getId(), resourceCountVO);
 }
 
+@Override
+public boolean updateCountByDeltaForIds(List ids, boolean increment, 
long delta) {

Review Comment:
   would it make sense to remove increment and check for positive/negative 
numbers?
   
   the higher level call to `updateResourceCountForAccount` is only done in two 
places so it wouldn't be a big refactor.



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

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

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



Re: [PR] Update volume's passphrase to null if diskOffering doesn't support encryption [cloudstack]

2024-04-12 Thread via GitHub


sureshanaparti commented on code in PR #8904:
URL: https://github.com/apache/cloudstack/pull/8904#discussion_r1562494245


##
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##
@@ -1720,6 +1720,9 @@ private Pair recreateVolume(VolumeVO 
vol, VirtualMachinePro
 DiskOffering diskOffering = 
_entityMgr.findById(DiskOffering.class, vol.getDiskOfferingId());
 if (diskOffering.getEncrypt()) {
 vol = setPassphraseForVolumeEncryption(vol);
+} else if (vol.getPassphraseId() != null) {

Review Comment:
   @vishesh92 I think, better to not allow offering change for encrypted 
volumes if disk offering doesn't support encryption. during recreate, new 
volume shouldn't set the passphrase if encryption is not enabled in the 
offering. check/fix when passphrase is set for the volume.



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

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

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



Re: [PR] Update volume's passphrase to null if diskOffering doesn't support encryption [cloudstack]

2024-04-12 Thread via GitHub


sureshanaparti commented on code in PR #8904:
URL: https://github.com/apache/cloudstack/pull/8904#discussion_r1562494245


##
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##
@@ -1720,6 +1720,9 @@ private Pair recreateVolume(VolumeVO 
vol, VirtualMachinePro
 DiskOffering diskOffering = 
_entityMgr.findById(DiskOffering.class, vol.getDiskOfferingId());
 if (diskOffering.getEncrypt()) {
 vol = setPassphraseForVolumeEncryption(vol);
+} else if (vol.getPassphraseId() != null) {

Review Comment:
   @vishesh92 I think, better to not allow offering change for encrypted 
volumes if disk offering doesn't support encryption. during recreate, new 
volume shouldn't set the passphrase if encryption is not enabled in the 
offering. 



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

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

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



Re: [PR] Update volume's passphrase to null if diskOffering doesn't support encryption [cloudstack]

2024-04-12 Thread via GitHub


sureshanaparti commented on code in PR #8904:
URL: https://github.com/apache/cloudstack/pull/8904#discussion_r1562494245


##
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##
@@ -1720,6 +1720,9 @@ private Pair recreateVolume(VolumeVO 
vol, VirtualMachinePro
 DiskOffering diskOffering = 
_entityMgr.findById(DiskOffering.class, vol.getDiskOfferingId());
 if (diskOffering.getEncrypt()) {
 vol = setPassphraseForVolumeEncryption(vol);
+} else if (vol.getPassphraseId() != null) {

Review Comment:
   @vishesh92 I think, better to not allow offering change for encrypted 
volumes if disk offering doesn't support encryption.



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

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

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



(cloudstack) 01/01: Merge branch '4.19'

2024-04-12 Thread vishesh
This is an automated email from the ASF dual-hosted git repository.

vishesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 19f79b1d94f986d012cc1e6ee42bfc2e21319bfe
Merge: a44f28bb312 d3e020a5452
Author: Vishesh 
AuthorDate: Fri Apr 12 16:31:40 2024 +0530

Merge branch '4.19'

 agent/conf/agent.properties|   4 +
 .../cloud/agent/properties/AgentProperties.java|   7 ++
 .../service/VolumeOrchestrationService.java|   2 +
 .../engine/orchestration/VolumeOrchestrator.java   |  39 ---
 .../java/com/cloud/storage/VolumeDetailVO.java |   3 +
 .../kvm/resource/LibvirtComputingResource.java |  69 -
 .../hypervisor/kvm/resource/LibvirtConnection.java |   7 +-
 .../kvm/resource/LibvirtDomainListener.java|  65 
 .../wrapper/LibvirtScaleVmCommandWrapper.java  |   8 --
 .../apache/cloudstack/utils/linux/KVMHostInfo.java |   1 -
 .../cloudstack/utils/linux/KVMHostInfoTest.java|   3 -
 .../driver/ScaleIOPrimaryDataStoreDriver.java  | 112 ++---
 .../com/cloud/storage/ResizeVolumePayload.java |   8 ++
 .../com/cloud/storage/VolumeApiServiceImpl.java|  12 ++-
 14 files changed, 233 insertions(+), 107 deletions(-)

diff --cc 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 7ba75d65466,37aba35bb9c..b30f2b6a6f0
--- 
a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ 
b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@@ -503,8 -499,23 +500,23 @@@ public class LibvirtComputingResource e
  }
  
  @Override
- public void registerStatusUpdater(AgentStatusUpdater updater) {
- _agentStatusUpdater = updater;
+ public synchronized void registerStatusUpdater(AgentStatusUpdater 
updater) {
+ if 
(AgentPropertiesFileHandler.getPropertyValue(AgentProperties.LIBVIRT_EVENTS_ENABLED))
 {
+ try {
+ Connect conn = LibvirtConnection.getConnection();
+ if (libvirtDomainListener != null) {
 -s_logger.debug("Clearing old domain listener");
++LOGGER.debug("Clearing old domain listener");
+ conn.removeLifecycleListener(libvirtDomainListener);
+ }
+ libvirtDomainListener = new LibvirtDomainListener(updater);
+ conn.addLifecycleListener(libvirtDomainListener);
 -s_logger.debug("Set up the libvirt domain event lifecycle 
listener");
++LOGGER.debug("Set up the libvirt domain event lifecycle 
listener");
+ } catch (LibvirtException e) {
 -s_logger.error("Failed to get libvirt connection for domain 
event lifecycle", e);
++LOGGER.error("Failed to get libvirt connection for domain 
event lifecycle", e);
+ }
+ } else {
 -s_logger.debug("Libvirt event listening is disabled, not 
registering status updater");
++LOGGER.debug("Libvirt event listening is disabled, not 
registering status updater");
+ }
  }
  
  @Override
@@@ -1879,9 -1890,13 +1891,13 @@@
  public boolean stop() {
  try {
  final Connect conn = LibvirtConnection.getConnection();
+ if 
(AgentPropertiesFileHandler.getPropertyValue(AgentProperties.LIBVIRT_EVENTS_ENABLED)
 && libvirtDomainListener != null) {
 -s_logger.debug("Clearing old domain listener");
++LOGGER.debug("Clearing old domain listener");
+ conn.removeLifecycleListener(libvirtDomainListener);
+ }
  conn.close();
  } catch (final LibvirtException e) {
 -s_logger.trace("Ignoring libvirt error.", e);
 +LOGGER.trace("Ignoring libvirt error.", e);
  }
  
  return true;
@@@ -3697,9 -3702,8 +3713,8 @@@
  sscmd.setDataCenter(dcId);
  sscmd.setResourceType(Storage.StorageResourceType.STORAGE_POOL);
  } catch (final CloudRuntimeException e) {
 -s_logger.debug("Unable to initialize local storage pool: " + e);
 +LOGGER.debug("Unable to initialize local storage pool: " + e);
  }
- setupLibvirtEventListener();
  return sscmd;
  }
  
diff --cc 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
index 2b0e088f5c7,0fa012b2c90..cbb5d85b712
--- 
a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
+++ 
b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
@@@ -42,8 -41,8 +42,8 @@@ public class LibvirtConnection 
  return getConnection(s_hypervisorURI);
  }
  
- static public Connect getConnection(String hypervisorURI) 

(cloudstack) branch main updated (a44f28bb312 -> 19f79b1d94f)

2024-04-12 Thread vishesh
This is an automated email from the ASF dual-hosted git repository.

vishesh pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


from a44f28bb312 Merge branch '4.19'
 add 730cc5d5b8f Change iops on offering change (#8872)
 add d3e020a5452 Mark libvirt events experimental, add properties flag 
(#8825)
 new 19f79b1d94f Merge branch '4.19'

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 agent/conf/agent.properties|   4 +
 .../cloud/agent/properties/AgentProperties.java|   7 ++
 .../service/VolumeOrchestrationService.java|   2 +
 .../engine/orchestration/VolumeOrchestrator.java   |  39 ---
 .../java/com/cloud/storage/VolumeDetailVO.java |   3 +
 .../kvm/resource/LibvirtComputingResource.java |  69 -
 .../hypervisor/kvm/resource/LibvirtConnection.java |   7 +-
 .../kvm/resource/LibvirtDomainListener.java|  65 
 .../wrapper/LibvirtScaleVmCommandWrapper.java  |   8 --
 .../apache/cloudstack/utils/linux/KVMHostInfo.java |   1 -
 .../cloudstack/utils/linux/KVMHostInfoTest.java|   3 -
 .../driver/ScaleIOPrimaryDataStoreDriver.java  | 112 ++---
 .../com/cloud/storage/ResizeVolumePayload.java |   8 ++
 .../com/cloud/storage/VolumeApiServiceImpl.java|  12 ++-
 14 files changed, 233 insertions(+), 107 deletions(-)
 create mode 100644 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtDomainListener.java



Re: [PR] Update volume's passphrase to null if diskOffering doesn't support encryption [cloudstack]

2024-04-12 Thread via GitHub


weizhouapache commented on code in PR #8904:
URL: https://github.com/apache/cloudstack/pull/8904#discussion_r1562487992


##
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##
@@ -1720,6 +1720,9 @@ private Pair recreateVolume(VolumeVO 
vol, VirtualMachinePro
 DiskOffering diskOffering = 
_entityMgr.findById(DiskOffering.class, vol.getDiskOfferingId());
 if (diskOffering.getEncrypt()) {
 vol = setPassphraseForVolumeEncryption(vol);
+} else if (vol.getPassphraseId() != null) {
+vol.setPassphraseId(null);
+_volsDao.persist(vol);

Review Comment:
   @vishesh92 
   code lgtm
   
   but, what has happened to the volume ?



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

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

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



Re: [PR] Update volume's passphrase to null if diskOffering doesn't support encryption [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8904:
URL: https://github.com/apache/cloudstack/pull/8904#issuecomment-2051673408

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

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



Re: [PR] Update volume's passphrase to null if diskOffering doesn't support encryption [cloudstack]

2024-04-12 Thread via GitHub


vishesh92 commented on PR #8904:
URL: https://github.com/apache/cloudstack/pull/8904#issuecomment-2051672666

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

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



[PR] Update volume's passphrase to null if diskOffering doesn't support encryption [cloudstack]

2024-04-12 Thread via GitHub


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

   ### Description
   
   This PR updates the volume's passphrase to null if diskOffering doesn't 
support encryption
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   ### 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
   - [x] Minor
   
    Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   
   
   
    How did you try to break this feature and the system with this change?
   
   
   
   
   
   


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

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

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



Re: [PR] Update `vpc.max.networks` setting & settings to limit the number of NICs for each hypervisor [cloudstack]

2024-04-12 Thread via GitHub


weizhouapache commented on PR #8654:
URL: https://github.com/apache/cloudstack/pull/8654#issuecomment-2051664956

   overall code lgtm
   
   @hsato03 
   could you add a integration test for it ?
   the component test `test_vpc_vms_deployment.py` contains the tests on 
'vpc.max.networks' but it looks not run in simulator CI and smoke 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-unsubscr...@cloudstack.apache.org

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



Re: [PR] log sanitation on output of jobs [cloudstack]

2024-04-12 Thread via GitHub


sureshanaparti commented on code in PR #8890:
URL: https://github.com/apache/cloudstack/pull/8890#discussion_r1562475787


##
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java:
##
@@ -3106,17 +3106,16 @@ protected String parseCifsMountOptions(URI uri) {
 extraOpts.append(name + "=" + nvp.getValue() + ",");
 }
 
-if (logger.isDebugEnabled()) {
-logger.error("extraOpts now " + extraOpts);
-}
+String extraOptions = extraOpts.toString();
+logger.error("extraOpts now ", 
()->StringUtils.cleanString(extraOptions));

Review Comment:
   debug log?



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

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

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



Re: [PR] Allow overriding root disk offering & size, and expunge old root disk while restoring a VM [cloudstack]

2024-04-12 Thread via GitHub


rohityadavcloud merged PR #8800:
URL: https://github.com/apache/cloudstack/pull/8800


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

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

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



(cloudstack) branch 4.19 updated: Allow overriding root disk offering & size, and expunge old root disk while restoring a VM (#8800)

2024-04-12 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.19 by this push:
 new b998e7dbb63 Allow overriding root disk offering & size, and expunge 
old root disk while restoring a VM (#8800)
b998e7dbb63 is described below

commit b998e7dbb6355c4165b00a2792062f2d446713dd
Author: Vishesh 
AuthorDate: Fri Apr 12 17:47:52 2024 +0530

Allow overriding root disk offering & size, and expunge old root disk while 
restoring a VM (#8800)

* Allow overriding root diskoffering id & size while restoring VM

* UI changes

* Allow expunging of old disk while restoring a VM

* Resolve comments

* Address comments

* Duplicate volume's details while duplicating volume

* Allow setting IOPS for the new volume

* minor cleanup

* fixup

* Add checks for template size

* Replace strings for IOPS with constants

* Fix saveVolumeDetails method

* Fixup

* Fixup UI styling
---
 .../java/com/cloud/storage/VolumeApiService.java   |   2 +
 api/src/main/java/com/cloud/vm/UserVmService.java  |   2 +-
 .../api/command/user/vm/RestoreVMCmd.java  |  42 +++
 .../java/com/cloud/vm/VirtualMachineManager.java   |   2 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java|  18 +-
 .../src/main/java/com/cloud/vm/VmWorkRestore.java  |  27 +-
 .../engine/orchestration/CloudOrchestrator.java|   7 +-
 .../engine/orchestration/VolumeOrchestrator.java   |  39 ++-
 .../com/cloud/storage/VolumeApiServiceImpl.java|  14 +-
 .../main/java/com/cloud/vm/UserVmManagerImpl.java  | 124 +++--
 .../cloudstack/vm/UnmanagedVMsManagerImpl.java |  11 +-
 .../java/com/cloud/vm/UserVmManagerImplTest.java   |  26 +-
 ui/src/config/section/compute.js   |  27 +-
 ui/src/views/compute/ReinstallVm.vue   | 307 +
 14 files changed, 541 insertions(+), 107 deletions(-)

diff --git a/api/src/main/java/com/cloud/storage/VolumeApiService.java 
b/api/src/main/java/com/cloud/storage/VolumeApiService.java
index a673df12d0f..4f09702b7db 100644
--- a/api/src/main/java/com/cloud/storage/VolumeApiService.java
+++ b/api/src/main/java/com/cloud/storage/VolumeApiService.java
@@ -175,6 +175,8 @@ public interface VolumeApiService {
 
 boolean validateVolumeSizeInBytes(long size);
 
+void validateDestroyVolume(Volume volume, Account caller, boolean expunge, 
boolean forceExpunge);
+
 Volume changeDiskOfferingForVolume(ChangeOfferingForVolumeCmd cmd) throws 
ResourceAllocationException;
 
 void publishVolumeCreationUsageEvent(Volume volume);
diff --git a/api/src/main/java/com/cloud/vm/UserVmService.java 
b/api/src/main/java/com/cloud/vm/UserVmService.java
index c32c099ed3a..787ed7bde37 100644
--- a/api/src/main/java/com/cloud/vm/UserVmService.java
+++ b/api/src/main/java/com/cloud/vm/UserVmService.java
@@ -492,7 +492,7 @@ public interface UserVmService {
 
 UserVm restoreVM(RestoreVMCmd cmd) throws InsufficientCapacityException, 
ResourceUnavailableException;
 
-UserVm restoreVirtualMachine(Account caller, long vmId, Long 
newTemplateId) throws InsufficientCapacityException, 
ResourceUnavailableException;
+UserVm restoreVirtualMachine(Account caller, long vmId, Long 
newTemplateId, Long rootDiskOfferingId, boolean expunge, Map 
details) throws InsufficientCapacityException, ResourceUnavailableException;
 
 UserVm upgradeVirtualMachine(ScaleVMCmd cmd) throws 
ResourceUnavailableException, ConcurrentOperationException, 
ManagementServerException,
 VirtualMachineMigrationException;
diff --git 
a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java 
b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
index 4b59bf560cb..17c4e97eb3b 100644
--- 
a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
+++ 
b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java
@@ -16,7 +16,9 @@
 // under the License.
 package org.apache.cloudstack.api.command.user.vm;
 
+import com.cloud.vm.VmDetailConstants;
 import org.apache.cloudstack.api.ApiCommandResourceType;
+import org.apache.cloudstack.api.response.DiskOfferingResponse;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.acl.SecurityChecker.AccessType;
@@ -42,6 +44,8 @@ import com.cloud.user.Account;
 import com.cloud.uservm.UserVm;
 import com.cloud.vm.VirtualMachine;
 
+import java.util.Map;
+
 @APICommand(name = "restoreVirtualMachine", description = "Restore a VM to 
original template/ISO or new template/ISO", responseObject = 
UserVmResponse.class, since = "3.0.0", responseView = ResponseView.Restricted, 
entityType = {VirtualMachine.class},
 requestHasSensitiveInfo = false,
 responseHasSensitiveInfo = true)
@@ -60,6 

Re: [I] com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore on the KVM host: [cloudstack]

2024-04-12 Thread via GitHub


weizhouapache commented on issue #6716:
URL: https://github.com/apache/cloudstack/issues/6716#issuecomment-2051629390

   > @weizhouapache Below given full log of management server while adding an 
host..
   > 
   > tail -f /var/log/cloudstack/management/management-server.log
   > 
   > ```
   > 2024-04-12 11:48:39,663 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   > SSH command output:Failed to generate CSR file, retrying after removing 
existing settings
   > Reverting libvirtd to not listen on TLS
   > Removing cloud.* files in /etc/cloudstack/agent
   > Retrying to generate CSR file
   > Failed to generate CSR file while retrying
   > 
   > 
   > 2024-04-12 11:48:39,663 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) Executing cmd: 
sudo /usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   > 2024-04-12 11:48:41,860 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   > SSH command output:
   > chmod: cannot access '/etc/cloudstack/agent/agent.properties': No such 
file or directory
   > 
   > 2024-04-12 11:48:41,886 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) Executing cmd: 
sudo /usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties y5F5wnMdvsJSAFOw /etc/cloudstack/agent/
   > 2024-04-12 11:48:42,774 DEBUG [o.a.c.h.HAManagerImpl] 
(BackgroundTaskPollManager-1:ctx-2784ff02) (logid:0eda3e49) HA health check 
task is running...
   > 2024-04-12 11:48:42,788 DEBUG [c.c.a.ApiServlet] 
(qtp239372207-307:ctx-2d97f1c5) (logid:95a2f6aa) ===START===  192.168.10.111 -- 
GET  command=readyForShutdown=json
   > 2024-04-12 11:48:42,788 DEBUG [c.c.a.ApiServlet] 
(qtp239372207-307:ctx-2d97f1c5) (logid:95a2f6aa) Two factor authentication is 
already verified for the user 2, so skipping
   > 2024-04-12 11:48:42,794 DEBUG [c.c.a.ApiServer] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) CIDRs from which 
account 'Account 
[{"accountName":"admin","id":2,"uuid":"8b9bbc51-f746-11ee-9e73-000c29962f22"}]' 
is allowed to perform API calls: 0.0.0.0/0,::/0
   > 2024-04-12 11:48:42,797 INFO  [o.a.c.a.DynamicRoleBasedAPIAccessChecker] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) Account [Account 
[{"accountName":"admin","id":2,"uuid":"8b9bbc51-f746-11ee-9e73-000c29962f22"}]] 
is Root Admin or Domain Admin, all APIs are allowed.
   > 2024-04-12 11:48:42,798 WARN  [o.a.c.a.ProjectRoleBasedApiAccessChecker] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) Project is null, 
ProjectRoleBasedApiAccessChecker only applies to projects, returning API 
[readyForShutdown] for user [User 
{"username":"admin","uuid":"8b9cdbeb-f746-11ee-9e73-000c29962f22"}.] as allowed.
   > 2024-04-12 11:48:42,799 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) RoleService is 
enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
   > 2024-04-12 11:48:42,800 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) API rate limiting 
is disabled. We will not use ApiRateLimitService.
   > 2024-04-12 11:48:42,802 DEBUG [c.c.a.ApiServlet] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) ===END===  
192.168.10.111 -- GET  command=readyForShutdown=json
   > 2024-04-12 11:48:42,929 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties y5F5wnMdvsJSAFOw /etc/cloudstack/agent/
   > SSH command output:Failed to find keystore passphrase from file: 
/etc/cloudstack/agent/agent.properties, quitting!
   > 
   > 
   > 2024-04-12 11:48:42,929 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) Executing cmd: 
sudo /usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties y5F5wnMdvsJSAFOw /etc/cloudstack/agent/
   > 2024-04-12 11:48:43,414 DEBUG [c.c.v.VirtualMachineManagerImpl] 
(Vm-Operations-Cleanup-1:ctx-e1dfc0f1) (logid:c70e7745) VM Operation Thread 
Running
   > 2024-04-12 11:48:43,420 DEBUG [o.a.c.c.ClusterDrsServiceImpl] 
(VMSchedulerPollTask:ctx-6086b31e) (logid:e94208a8) ClusterDRS.poll is being 
called at 2024-04-12 11:49:00 GMT
   > 2024-04-12 11:48:43,425 DEBUG [o.a.c.c.ClusterDrsServiceImpl] 
(VMSchedulerPollTask:ctx-6086b31e) (logid:e94208a8) Removed 0 old drs migration 

Re: [PR] prevent an NPE on an uninitialised TemplateObject [cloudstack]

2024-04-12 Thread via GitHub


sureshanaparti commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1562454981


##
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##
@@ -93,10 +95,15 @@ public static TemplateObject getTemplate(VMTemplateVO vo, 
DataStore store, Strin
 }
 
 public void setSize(Long size) {
-imageVO.setSize(size);
+getImage().setSize(size);
 }
 
 public VMTemplateVO getImage() {
+if (imageVO == null) {

Review Comment:
   @DaanHoogland if `imageVO` shouldn't be null for all these get calls, better 
get that initialized during the object creation itself (in constructor), 
instead of throwing errors on get calls.



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

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

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



Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2051621103

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

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



Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


sureshanaparti commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2051618150

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

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



Re: [I] com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore on the KVM host: [cloudstack]

2024-04-12 Thread via GitHub


vishnuvs369 commented on issue #6716:
URL: https://github.com/apache/cloudstack/issues/6716#issuecomment-2051616413

   @weizhouapache 
   Below given full log of management server while adding an host..
   
   tail -f /var/log/cloudstack/management/management-server.log
   
   ```
   2024-04-12 11:48:39,663 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   SSH command output:Failed to generate CSR file, retrying after removing 
existing settings
   Reverting libvirtd to not listen on TLS
   Removing cloud.* files in /etc/cloudstack/agent
   Retrying to generate CSR file
   Failed to generate CSR file while retrying
   
   
   2024-04-12 11:48:39,663 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) Executing cmd: 
sudo /usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   2024-04-12 11:48:41,860 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   SSH command output:
   chmod: cannot access '/etc/cloudstack/agent/agent.properties': No such file 
or directory
   
   2024-04-12 11:48:41,886 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) Executing cmd: 
sudo /usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties y5F5wnMdvsJSAFOw /etc/cloudstack/agent/
   2024-04-12 11:48:42,774 DEBUG [o.a.c.h.HAManagerImpl] 
(BackgroundTaskPollManager-1:ctx-2784ff02) (logid:0eda3e49) HA health check 
task is running...
   2024-04-12 11:48:42,788 DEBUG [c.c.a.ApiServlet] 
(qtp239372207-307:ctx-2d97f1c5) (logid:95a2f6aa) ===START===  192.168.10.111 -- 
GET  command=readyForShutdown=json
   2024-04-12 11:48:42,788 DEBUG [c.c.a.ApiServlet] 
(qtp239372207-307:ctx-2d97f1c5) (logid:95a2f6aa) Two factor authentication is 
already verified for the user 2, so skipping
   2024-04-12 11:48:42,794 DEBUG [c.c.a.ApiServer] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) CIDRs from which 
account 'Account 
[{"accountName":"admin","id":2,"uuid":"8b9bbc51-f746-11ee-9e73-000c29962f22"}]' 
is allowed to perform API calls: 0.0.0.0/0,::/0
   2024-04-12 11:48:42,797 INFO  [o.a.c.a.DynamicRoleBasedAPIAccessChecker] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) Account [Account 
[{"accountName":"admin","id":2,"uuid":"8b9bbc51-f746-11ee-9e73-000c29962f22"}]] 
is Root Admin or Domain Admin, all APIs are allowed.
   2024-04-12 11:48:42,798 WARN  [o.a.c.a.ProjectRoleBasedApiAccessChecker] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) Project is null, 
ProjectRoleBasedApiAccessChecker only applies to projects, returning API 
[readyForShutdown] for user [User 
{"username":"admin","uuid":"8b9cdbeb-f746-11ee-9e73-000c29962f22"}.] as allowed.
   2024-04-12 11:48:42,799 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) RoleService is 
enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
   2024-04-12 11:48:42,800 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) API rate limiting 
is disabled. We will not use ApiRateLimitService.
   2024-04-12 11:48:42,802 DEBUG [c.c.a.ApiServlet] 
(qtp239372207-307:ctx-2d97f1c5 ctx-bd572d21) (logid:95a2f6aa) ===END===  
192.168.10.111 -- GET  command=readyForShutdown=json
   2024-04-12 11:48:42,929 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties y5F5wnMdvsJSAFOw /etc/cloudstack/agent/
   SSH command output:Failed to find keystore passphrase from file: 
/etc/cloudstack/agent/agent.properties, quitting!
   
   
   2024-04-12 11:48:42,929 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-304:ctx-e8455b79 ctx-8e6fb9a4) (logid:c5b46620) Executing cmd: 
sudo /usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties y5F5wnMdvsJSAFOw /etc/cloudstack/agent/
   2024-04-12 11:48:43,414 DEBUG [c.c.v.VirtualMachineManagerImpl] 
(Vm-Operations-Cleanup-1:ctx-e1dfc0f1) (logid:c70e7745) VM Operation Thread 
Running
   2024-04-12 11:48:43,420 DEBUG [o.a.c.c.ClusterDrsServiceImpl] 
(VMSchedulerPollTask:ctx-6086b31e) (logid:e94208a8) ClusterDRS.poll is being 
called at 2024-04-12 11:49:00 GMT
   2024-04-12 11:48:43,425 DEBUG [o.a.c.c.ClusterDrsServiceImpl] 
(VMSchedulerPollTask:ctx-6086b31e) (logid:e94208a8) Removed 0 old drs migration 
plans
   2024-04-12 11:48:43,431 DEBUG [o.a.c.v.s.VMSchedulerImpl] 

(cloudstack) 01/01: Updating pom.xml version numbers for release 4.18.2.0

2024-04-12 Thread joao
This is an automated email from the ASF dual-hosted git repository.

joao pushed a commit to branch 4.18.2.0-RC20240412T0825
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 154566f914c778d448d4ab07b47b2db874bbf982
Author: João Jandre <48719461+joaojan...@users.noreply.github.com>
AuthorDate: Fri Apr 12 08:25:04 2024 -0300

Updating pom.xml version numbers for release 4.18.2.0

Signed-off-by: João Jandre <48719461+joaojan...@users.noreply.github.com>
---
 agent/pom.xml   | 2 +-
 api/pom.xml | 2 +-
 client/pom.xml  | 2 +-
 core/pom.xml| 2 +-
 debian/changelog| 6 ++
 developer/pom.xml   | 2 +-
 engine/api/pom.xml  | 2 +-
 engine/components-api/pom.xml   | 2 +-
 engine/orchestration/pom.xml| 2 +-
 engine/pom.xml  | 2 +-
 engine/schema/pom.xml   | 2 +-
 engine/service/pom.xml  | 2 +-
 engine/storage/cache/pom.xml| 2 +-
 engine/storage/configdrive/pom.xml  | 2 +-
 engine/storage/datamotion/pom.xml   | 2 +-
 engine/storage/image/pom.xml| 2 +-
 engine/storage/integration-test/pom.xml | 2 +-
 engine/storage/pom.xml  | 2 +-
 engine/storage/snapshot/pom.xml | 2 +-
 engine/storage/volume/pom.xml   | 2 +-
 framework/agent-lb/pom.xml  | 2 +-
 framework/ca/pom.xml| 2 +-
 framework/cluster/pom.xml   | 2 +-
 framework/config/pom.xml| 2 +-
 framework/db/pom.xml| 2 +-
 framework/direct-download/pom.xml   | 4 ++--
 framework/events/pom.xml| 2 +-
 framework/ipc/pom.xml   | 2 +-
 framework/jobs/pom.xml  | 2 +-
 framework/managed-context/pom.xml   | 2 +-
 framework/pom.xml   | 2 +-
 framework/quota/pom.xml | 2 +-
 framework/rest/pom.xml  | 2 +-
 framework/security/pom.xml  | 2 +-
 framework/spring/lifecycle/pom.xml  | 2 +-
 framework/spring/module/pom.xml | 2 +-
 plugins/acl/dynamic-role-based/pom.xml  | 2 +-
 plugins/acl/project-role-based/pom.xml  | 2 +-
 plugins/acl/static-role-based/pom.xml   | 2 +-
 plugins/affinity-group-processors/explicit-dedication/pom.xml   | 2 +-
 plugins/affinity-group-processors/host-affinity/pom.xml | 2 +-
 plugins/affinity-group-processors/host-anti-affinity/pom.xml| 2 +-
 plugins/affinity-group-processors/non-strict-host-affinity/pom.xml  | 2 +-
 .../affinity-group-processors/non-strict-host-anti-affinity/pom.xml | 4 ++--
 plugins/alert-handlers/snmp-alerts/pom.xml  | 2 +-
 plugins/alert-handlers/syslog-alerts/pom.xml| 2 +-
 plugins/api/discovery/pom.xml   | 2 +-
 plugins/api/rate-limit/pom.xml  | 2 +-
 plugins/api/solidfire-intg-test/pom.xml | 2 +-
 plugins/api/vmware-sioc/pom.xml | 2 +-
 plugins/backup/dummy/pom.xml| 2 +-
 plugins/backup/networker/pom.xml| 2 +-
 plugins/backup/veeam/pom.xml| 2 +-
 plugins/ca/root-ca/pom.xml  | 2 +-
 plugins/database/mysql-ha/pom.xml   | 2 +-
 plugins/database/quota/pom.xml  | 2 +-
 plugins/dedicated-resources/pom.xml | 2 +-
 plugins/deployment-planners/implicit-dedication/pom.xml | 2 +-
 plugins/deployment-planners/user-concentrated-pod/pom.xml   | 2 +-
 

(cloudstack) branch 4.18.2.0-RC20240412T0825 created (now 154566f914c)

2024-04-12 Thread joao
This is an automated email from the ASF dual-hosted git repository.

joao pushed a change to branch 4.18.2.0-RC20240412T0825
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


  at 154566f914c Updating pom.xml version numbers for release 4.18.2.0

This branch includes the following new commits:

 new 154566f914c Updating pom.xml version numbers for release 4.18.2.0

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




svn commit: r68452 - in /dev/cloudstack/4.18.2.0: apache-cloudstack-4.18.2.0-src.tar.bz2 apache-cloudstack-4.18.2.0-src.tar.bz2.asc apache-cloudstack-4.18.2.0-src.tar.bz2.sha512

2024-04-12 Thread joao
Author: joao
Date: Fri Apr 12 11:26:04 2024
New Revision: 68452

Log:
Committing release candidate artifacts for 4.18.2.0 to dist/dev/cloudstack in 
preparation for release vote

Added:
dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2   (with 
props)
dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2.asc
dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2.sha512

Added: dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2
==
Binary file - no diff available.

Propchange: dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2
--
svn:mime-type = application/octet-stream

Added: dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2.asc
==
--- dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2.asc (added)
+++ dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2.asc Fri Apr 
12 11:26:04 2024
@@ -0,0 +1,14 @@
+-BEGIN PGP SIGNATURE-
+
+iQGzBAABCgAdFiEESI2Q2hB0ReMkPRYmBvPOxlszV5AFAmYZGhYACgkQBvPOxlsz
+V5A3QgwArxTum3HK+f4TZ3UetDtvPWvFntNQbrHBaHMKBbpJfNV3bK0KkHjtGUVv
+ln6zLyfJKgfJN/q7IfCkCFkrDQ2XcwLZciST1ylh6w/uj2osF/E3Y00CMnRZRAjC
+xYy4oouLdxLZ9hExWe6j6MKlGS1Dcg6qwzLiCgVnWWcqZCNo8Lc/RK598lEX9FUy
+A/lzl6CEIEFHXqh4c0XLUG7vmF5vfyFt03jw5F8XsoW579/Cma8cCuFFCWU6nMKQ
+eqx13hFQW7f1TM1m2Kuy4Ob8XDnaprLvldcIHBHCAVaOv6mFSps3sBmMYSzSj0QJ
+A/qOIlPCOpJPBgyjpp4hJUkt5UX3JpMkSZKeyL2R5pSPR44h/VyMjLMdRuGna+ep
+yaWsvbwKhbW49r7Y5SQxyxicp8dfOjex4U7y34UDgjoQJ8CqVkFsz/ZjfT8SAP4d
+JpsN5PiYziOBDXWKTKxEw0Y22MOs9fRtymBulURMS+nlrbr9Fpx4+RlghpgQIWrD
+J4Fyv6qN
+=LOU/
+-END PGP SIGNATURE-

Added: dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2.sha512
==
--- dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2.sha512 
(added)
+++ dev/cloudstack/4.18.2.0/apache-cloudstack-4.18.2.0-src.tar.bz2.sha512 Fri 
Apr 12 11:26:04 2024
@@ -0,0 +1 @@
+d82e387e67523072d25531c28f63dfc2ed28765b672022ae87568c5e7e1eafc091220f47ab0a58b484dedb475e5c4e13b5556b50d3b13a14c83b9b29591c80bc
  apache-cloudstack-4.18.2.0-src.tar.bz2




Re: [PR] linstor: Do not pretend handling disconnect paths that are non Linstor [cloudstack]

2024-04-12 Thread via GitHub


JoaoJandre merged PR #8897:
URL: https://github.com/apache/cloudstack/pull/8897


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

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

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



Re: [PR] linstor: Do not pretend handling disconnect paths that are non Linstor [cloudstack]

2024-04-12 Thread via GitHub


JoaoJandre commented on PR #8897:
URL: https://github.com/apache/cloudstack/pull/8897#issuecomment-2051571855

   Merging based on reviews, CI result and manual 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-unsubscr...@cloudstack.apache.org

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



(cloudstack) branch 4.18 updated: linstor: Do not pretend handling disconnect paths that are non Linstor (#8897)

2024-04-12 Thread joao
This is an automated email from the ASF dual-hosted git repository.

joao pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.18 by this push:
 new 6cd5c6a1d01 linstor: Do not pretend handling disconnect paths that are 
non Linstor (#8897)
6cd5c6a1d01 is described below

commit 6cd5c6a1d01966e6da2750db8e23093d1408b910
Author: Rene Peinthor 
AuthorDate: Fri Apr 12 13:23:15 2024 +0200

linstor: Do not pretend handling disconnect paths that are non Linstor 
(#8897)
---
 .../kvm/storage/LinstorStorageAdaptor.java | 53 --
 1 file changed, 29 insertions(+), 24 deletions(-)

diff --git 
a/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java
 
b/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java
index 87746447188..9ad8332d0e1 100644
--- 
a/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java
+++ 
b/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java
@@ -45,6 +45,7 @@ import com.linbit.linstor.api.model.ApiCallRc;
 import com.linbit.linstor.api.model.ApiCallRcList;
 import com.linbit.linstor.api.model.Properties;
 import com.linbit.linstor.api.model.ProviderKind;
+import com.linbit.linstor.api.model.Resource;
 import com.linbit.linstor.api.model.ResourceDefinition;
 import com.linbit.linstor.api.model.ResourceDefinitionModify;
 import com.linbit.linstor.api.model.ResourceGroup;
@@ -306,7 +307,7 @@ public class LinstorStorageAdaptor implements 
StorageAdaptor {
 public boolean disconnectPhysicalDisk(String volumePath, KVMStoragePool 
pool)
 {
 s_logger.debug("Linstor: disconnectPhysicalDisk " + pool.getUuid() + 
":" + volumePath);
-return true;
+return false;
 }
 
 @Override
@@ -342,40 +343,44 @@ public class LinstorStorageAdaptor implements 
StorageAdaptor {
 s_logger.debug("Linstor: Using storpool: " + pool.getUuid());
 final DevelopersApi api = getLinstorAPI(pool);
 
-try
-{
+Optional optRsc;
+try {
 List resources = api.viewResources(
-Collections.singletonList(localNodeName),
-null,
-null,
-null,
-null,
-null);
-
-Optional rsc = 
getResourceByPath(resources, localPath);
+Collections.singletonList(localNodeName),
+null,
+null,
+null,
+null,
+null);
+
+optRsc = getResourceByPath(resources, localPath);
+} catch (ApiException apiEx) {
+// couldn't query linstor controller
+s_logger.error(apiEx.getBestMessage());
+return false;
+}
 
-if (rsc.isPresent())
-{
+if (optRsc.isPresent()) {
+try {
+Resource rsc = optRsc.get();
 ResourceDefinitionModify rdm = new 
ResourceDefinitionModify();
 
rdm.deleteProps(Collections.singletonList("DrbdOptions/Net/allow-two-primaries"));
-ApiCallRcList answers = 
api.resourceDefinitionModify(rsc.get().getName(), rdm);
-if (answers.hasError())
-{
+ApiCallRcList answers = 
api.resourceDefinitionModify(rsc.getName(), rdm);
+if (answers.hasError()) {
 s_logger.error(
 String.format("Failed to remove 
'allow-two-primaries' on %s: %s",
-rsc.get().getName(), 
LinstorUtil.getBestErrorMessage(answers)));
+rsc.getName(), 
LinstorUtil.getBestErrorMessage(answers)));
 // do not fail here as removing allow-two-primaries 
property isn't fatal
 }
-
-return true;
+} catch(ApiException apiEx){
+s_logger.error(apiEx.getBestMessage());
+// do not fail here as removing allow-two-primaries 
property isn't fatal
 }
-s_logger.warn("Linstor: Couldn't find resource for this path: 
" + localPath);
-} catch (ApiException apiEx) {
-s_logger.error(apiEx.getBestMessage());
-// do not fail here as removing allow-two-primaries property 
isn't fatal
+return true;
 }
 }
-return true;
+s_logger.info("Linstor: Couldn't find resource for this path: " + 
localPath);
+return false;
 }
 
 

Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2051543823

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9234


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

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

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



(cloudstack-www) branch main updated (64f429bd -> 238f412c)

2024-04-12 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git


from 64f429bd blog: announcement for terraform provider release
 add 238f412c update banner

No new revisions were added by this update.

Summary of changes:
 .../banner.jpg  | Bin 57514 -> 79505 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)



(cloudstack-www) branch staging-site updated: update banner

2024-04-12 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch staging-site
in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git


The following commit(s) were added to refs/heads/staging-site by this push:
 new 238f412c update banner
238f412c is described below

commit 238f412c225c95084b529434f50a7380ab266eff
Author: Rohit Yadav 
AuthorDate: Fri Apr 12 16:20:03 2024 +0530

update banner

Signed-off-by: Rohit Yadav 
---
 .../banner.jpg  | Bin 57514 -> 79505 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git 
a/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/banner.jpg 
b/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/banner.jpg
index a53aa533..13a4c102 100644
Binary files 
a/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/banner.jpg and 
b/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/banner.jpg differ



Re: [I] com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore on the KVM host: [cloudstack]

2024-04-12 Thread via GitHub


weizhouapache commented on issue #6716:
URL: https://github.com/apache/cloudstack/issues/6716#issuecomment-2051484278

   > 2024-04-12 09:34:01,056 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-305:ctx-ee051bc3 ctx-b69a7b97) (logid:3616be44) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   > SSH command output:Failed to generate CSR file, retrying after removing 
existing settings
   > Reverting libvirtd to not listen on TLS
   > Removing cloud.* files in /etc/cloudstack/agent
   > Retrying to generate CSR file
   > Failed to generate CSR file while retrying
   
   @vishnuvs369 
   these certicicate errors are misleading
   please share the whole log on mgmt server and agent (agent.log, setup.log) 
when adding the host


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

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

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



Re: [I] Option to set ACL Rule to be the very bottom by default [cloudstack]

2024-04-12 Thread via GitHub


DaanHoogland commented on issue #8865:
URL: https://github.com/apache/cloudstack/issues/8865#issuecomment-2051458319

   ok, makes sense. This could also be a UI implementation or as alternative an 
extra API `reorderAclList` or the likes. I would expect it to get the id of the 
list and an `interval` option, in order to specify that instead of 
1,2,3,4,5,6,7,8,9,10 I want 1,3,5,7,9,11,13,15,17,19 as a result, or 
10,20,30,40,50,60,70,80,90,100.


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

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

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



Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2051446720

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

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



Re: [PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


vishesh92 commented on PR #8903:
URL: https://github.com/apache/cloudstack/pull/8903#issuecomment-2051443545

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

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



[PR] Speedup resource count calculation [cloudstack]

2024-04-12 Thread via GitHub


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

   ### Description
   
   This PR fixes the issues which occur when increment/decrement methods are 
waiting for a lock on domain tables and `ResourceCountCheckTask` is running at 
the same time. This issue appears when innodb_lock_wait_timeout is many times 
less than the time it takes for `recalculateDomainResourceCount` to complete. 
(Check steps below on how to reproduce the error).
   ```java
   com.cloud.utils.exception.CloudRuntimeException: DB Exception on: 
com.mysql.cj.jdbc.ClientPreparedStatement: SELECT resource_count.id, 
resource_count.type, resource_count.account_i
   d, resource_count.domain_id, resource_count.count, resource_count.tag FROM 
resource_count WHERE resource_count.id IN (33,4785,3513,4845)  FOR UPDATE 
   at 
com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:438)
   at 
com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:366)
   at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:355)
   at 
com.cloud.utils.db.GenericDaoBase.lockRows(GenericDaoBase.java:341)
   .
   
   ```
   
   We do this by removing unnecessary locks and simplifying count updates.
   
   As of now, to calculate the resource count for root domain, we are taking 
the lock on the entire table.
   This PR also splits the domain count calculation transaction into multiple 
transactions locks. This is done by breaking up the domain count calculation 
process by:
   1. Calculate resource count for all accounts in a domain
   2. Calculate resource count for all child domains in a domain
   3. In a transaction, fetch the child domain & accounts count and update the 
count if required
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   ### 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)
   - [ ] 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
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   
   
   
   1. Setup multiple domains & networks. And update their limits. I used the 
below command.
   ```bash
   csbench -create -domain -network -limits
   ```
   ```
   # csbench-config
   numdomains = 10
   numnetworks = 1
   numvms = 100
   startvm = false  # For faster creation of VMs
   ```
   2. Check the time it takes for resource count calculation to run. To 
manually trigger resource count calculation, run this command:
   ```bash
   time cmk update resourcecount domainid=1
   ```
   3. Update `innodb_lock_wait_timeout` to a value less than by a few seconds 
it took for the above request to complete.
   ```sql
   SET GLOBAL innodb_lock_wait_timeout=3;
   ```
   4. Restart the management server for `innodb_lock_wait_timeout` change to 
take effect.
   5. Run the below commands.
   ```
   csbench -create -vm -workers=50
   csbench -teardown -vm -workers=50
   ```
   In parallel to above requests, execute `cmk update resourcecount domainid=1` 
to trigger resource count recalculation while VMs are getting created or 
destroyed.
   
   6. Check logs for `ClientPreparedStatement`.
   ```bash
   grep "ClientPreparedStatement" vmops.log
   ```
   
    Results
   
   # With patch - creation of VM in stopped state
   
   ```
   
+--+---+---++---++-+-+-+
   | TYPE | COUNT |   MIN |MAX |   AVG | MEDIAN | 90TH PERCENTILE | 
95TH PERCENTILE | 99TH PERCENTILE |
   
+--+---+---++---++-+-+-+
   | vm - All |  1000 | 1.708 | 12.123 | 3.874 |   3.46 |   5.428 | 
  6.662 |   8.614 |
   
+--+---+---++---++-+-+-+
   ```
   ```
   
+--+---++---+++-+-+-+
   | TYPE | COUNT |MIN |   MAX |AVG | MEDIAN | 90TH 
PERCENTILE | 95TH PERCENTILE | 99TH PERCENTILE |
   
+--+---++---+++-+-+-+
   | vm-destroy - All |  1000 | 10.286 | 21.86 | 17.987 | 15.467 |  
21.518 |  21.589 |  21.779 |
   

Re: [I] com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore on the KVM host: [cloudstack]

2024-04-12 Thread via GitHub


vishnuvs369 commented on issue #6716:
URL: https://github.com/apache/cloudstack/issues/6716#issuecomment-2051407572

   @weizhouapache 
   i have provided root as username and root user password for adding kvm 
host...now that error gonenow i'm getting different error.
   
   ```
   2024-04-12 09:34:01,056 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-305:ctx-ee051bc3 ctx-b69a7b97) (logid:3616be44) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   SSH command output:Failed to generate CSR file, retrying after removing 
existing settings
   Reverting libvirtd to not listen on TLS
   Removing cloud.* files in /etc/cloudstack/agent
   Retrying to generate CSR file
   Failed to generate CSR file while retrying
   
   
   2024-04-12 09:34:01,056 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-305:ctx-ee051bc3 ctx-b69a7b97) (logid:3616be44) Executing cmd: 
sudo /usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   2024-04-12 09:34:02,255 DEBUG [o.a.c.h.HAManagerImpl] 
(BackgroundTaskPollManager-4:ctx-3f3b6330) (logid:f119a186) HA health check 
task is running...
   2024-04-12 09:34:02,885 DEBUG [c.c.s.StatsCollector] 
(StatsCollector-4:ctx-23a200d4) (logid:6cdcc245) AutoScaling Monitor is 
running...
   2024-04-12 09:34:03,361 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-305:ctx-ee051bc3 ctx-b69a7b97) (logid:3616be44) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-setup 
/etc/cloudstack/agent/agent.properties /etc/cloudstack/agent/
   SSH command output:
   chmod: cannot access '/etc/cloudstack/agent/agent.properties': No such file 
or directory
   
   2024-04-12 09:34:03,388 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-305:ctx-ee051bc3 ctx-b69a7b97) (logid:3616be44) Executing cmd: 
sudo /usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties 9YXfhdTjZTpXOcSZ /etc/cloudstack/agent/
   2024-04-12 09:34:04,431 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-305:ctx-ee051bc3 ctx-b69a7b97) (logid:3616be44) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties 9YXfhdTjZTpXOcSZ /etc/cloudstack/agent/
   SSH command output:Failed to find keystore passphrase from file: 
/etc/cloudstack/agent/agent.properties, quitting!
   
   
   2024-04-12 09:34:04,431 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-305:ctx-ee051bc3 ctx-b69a7b97) (logid:3616be44) Executing cmd: 
sudo /usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties 9YXfhdTjZTpXOcSZ /etc/cloudstack/agent/
   2024-04-12 09:34:05,254 DEBUG [c.c.a.ApiServlet] 
(qtp239372207-359:ctx-d1046213) (logid:b74dfb77) ===START===  192.168.10.111 -- 
GET  command=readyForShutdown=json
   2024-04-12 09:34:05,254 DEBUG [c.c.a.ApiServlet] 
(qtp239372207-359:ctx-d1046213) (logid:b74dfb77) Two factor authentication is 
already verified for the user 2, so skipping
   2024-04-12 09:34:05,261 DEBUG [c.c.a.ApiServer] 
(qtp239372207-359:ctx-d1046213 ctx-85baecad) (logid:b74dfb77) CIDRs from which 
account 'Account 
[{"accountName":"admin","id":2,"uuid":"8b9bbc51-f746-11ee-9e73-000c29962f22"}]' 
is allowed to perform API calls: 0.0.0.0/0,::/0
   2024-04-12 09:34:05,263 INFO  [o.a.c.a.DynamicRoleBasedAPIAccessChecker] 
(qtp239372207-359:ctx-d1046213 ctx-85baecad) (logid:b74dfb77) Account [Account 
[{"accountName":"admin","id":2,"uuid":"8b9bbc51-f746-11ee-9e73-000c29962f22"}]] 
is Root Admin or Domain Admin, all APIs are allowed.
   2024-04-12 09:34:05,265 WARN  [o.a.c.a.ProjectRoleBasedApiAccessChecker] 
(qtp239372207-359:ctx-d1046213 ctx-85baecad) (logid:b74dfb77) Project is null, 
ProjectRoleBasedApiAccessChecker only applies to projects, returning API 
[readyForShutdown] for user [User 
{"username":"admin","uuid":"8b9cdbeb-f746-11ee-9e73-000c29962f22"}.] as allowed.
   2024-04-12 09:34:05,266 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] 
(qtp239372207-359:ctx-d1046213 ctx-85baecad) (logid:b74dfb77) RoleService is 
enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
   2024-04-12 09:34:05,267 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] 
(qtp239372207-359:ctx-d1046213 ctx-85baecad) (logid:b74dfb77) API rate limiting 
is disabled. We will not use ApiRateLimitService.
   2024-04-12 09:34:05,269 DEBUG [c.c.a.ApiServlet] 
(qtp239372207-359:ctx-d1046213 ctx-85baecad) (logid:b74dfb77) ===END===  
192.168.10.111 -- GET  command=readyForShutdown=json
   2024-04-12 09:34:05,497 DEBUG [c.c.u.s.SSHCmdHelper] 
(qtp239372207-305:ctx-ee051bc3 ctx-b69a7b97) (logid:3616be44) SSH command: sudo 
/usr/share/cloudstack-common/scripts/util/keystore-cert-import 
/etc/cloudstack/agent/agent.properties 9YXfhdTjZTpXOcSZ /etc/cloudstack/agent/
   SSH command output:Failed to find keystore passphrase from file: 
/etc/cloudstack/agent/agent.properties, quitting!
   
   

(cloudstack-www) branch staging-site updated: blog: announcement for terraform provider release

2024-04-12 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch staging-site
in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git


The following commit(s) were added to refs/heads/staging-site by this push:
 new 64f429bd blog: announcement for terraform provider release
64f429bd is described below

commit 64f429bdf68aad10656fd3d8a5d42bb2c5cc89b2
Author: Rohit Yadav 
AuthorDate: Fri Apr 12 14:58:55 2024 +0530

blog: announcement for terraform provider release

Signed-off-by: Rohit Yadav 
---
 .../banner.jpg | Bin 0 -> 57514 bytes
 .../index.md   |  57 +
 2 files changed, 57 insertions(+)

diff --git 
a/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/banner.jpg 
b/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/banner.jpg
new file mode 100644
index ..a53aa533
Binary files /dev/null and 
b/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/banner.jpg differ
diff --git 
a/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/index.md 
b/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/index.md
new file mode 100644
index ..ee085ed6
--- /dev/null
+++ b/blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/index.md
@@ -0,0 +1,57 @@
+---
+layout: post
+title: Apache CloudStack Terraform 0.5.0 Release
+tags: [announcement]
+authors: [rohit]
+slug: cloudstack-terraform-provider-0.5.0-release
+---
+
+[![](banner.jpg "CloudStack Terraform 
Provider")](/blog/cloudstack-terraform-provider-0.5.0-release)
+
+We are pleased to announce the release of Apache CloudStack Terraform
+provider v0.5.0. Terraform is an open-source infrastructure as code software
+tool that provides a consistent CLI workflow to manage resources in many
+public/private clouds.
+
+
+
+Terraform v0.5.0 comes packed with several new features, enhancements,
+and bug fixes to make it even more robust and reliable.
+
+Some of the key highlights of this release include:
+
+- Added support for Kubernetes Cluster creation
+- Added support for Kubernetes iso registration
+- Added support for new data sources in Cloudstack
+- Added UEFI Support to the Cloudstack instance resource
+- Added vApp properties support to the Cloudstack Instance resource
+- Added parameters (host_id , cluster_id support to the Cloudstack instance 
resource
+- Added source_nat_ip_address support to the Cloudstack network
+- Added  new resource attach_volume
+- Improved service offering creation by adding more parameters
+- Added documentation for new resources
+- Various Bug fixes
+- Validated and fixed all existing resource creations to work as expected
+
+Apache CloudStack Terraform provider v0.5.0 is available for
+download now from the [Apache CloudStack
+website](https://cloudstack.apache.org/downloads/#cloudstack-terraform-provider-release).
+
+Downloads and Documentation
+
+The official source code for Apache CloudStack Terraform provider can
+be downloaded from:
+
+https://cloudstack.apache.org/downloads
+
+The installation and usage documentation for Apache CloudStack Terraform 
provider is available at:
+
+- https://github.com/apache/cloudstack-terraform-provider/wiki
+- 
https://github.com/apache/cloudstack-terraform-provider/wiki#installing-from-github-release
+
+The documentation for the usage of resources to create and interact
+with CloudStack is available at
+https://registry.terraform.io/providers/cloudstack/cloudstack/0.5.0/docs
+
+Users can also get the provider from the Terraform registry published at:
+https://registry.terraform.io/providers/cloudstack/cloudstack/0.5.0



(cloudstack-www) branch main updated (6eb7d94e -> 64f429bd)

2024-04-12 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git


from 6eb7d94e captial to lower case p
 add 64f429bd blog: announcement for terraform provider release

No new revisions were added by this update.

Summary of changes:
 .../banner.jpg | Bin
 .../index.md   |  57 +
 2 files changed, 57 insertions(+)
 copy static/img/imported/02633cc4-0d22-4bde-966e-4e3efec8f357 => 
blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/banner.jpg (100%)
 create mode 100644 
blog/2024-04-12-cloudstack-terraform-provider-0.5.0-release/index.md



Re: [PR] Temporarily backup StorPool volume before expunge [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8843:
URL: https://github.com/apache/cloudstack/pull/8843#issuecomment-2051370769

   [SF] Trillian Build Failed (tid-9807)


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

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

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



Re: [I] com.cloud.utils.exception.CloudRuntimeException: Failed to setup keystore on the KVM host: [cloudstack]

2024-04-12 Thread via GitHub


weizhouapache commented on issue #6716:
URL: https://github.com/apache/cloudstack/issues/6716#issuecomment-2051370661

   > sudo: a terminal is required to read the password; either use the -S 
option to read from standard input or configure an askpass helper
   > sudo: a password is required
   
   @vishnuvs369 
   the error indicates that the user needs to be added to `wheel` group


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

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

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



Re: [I] Option to set ACL Rule to be the very bottom by default [cloudstack]

2024-04-12 Thread via GitHub


btzq commented on issue #8865:
URL: https://github.com/apache/cloudstack/issues/8865#issuecomment-2051353905

   @DaanHoogland i just retested and i think i know the confusion:
   
   - Lets say i have 10 ACL Rules in the List. All numbered from 1-10.
   - If i change Rule 2 manually to be 'Rule Number = 200', then i can see the 
rule being sorted automatically to the bottom. 
   - But now, if i look back at the top of the rule list, i see now the rules 
in the order of (1,3,4,5,6,7,8,9,10,200)
   
   And if you were to try to rearange things later on, it becomes super 
complicated because it doesnt re-initiliase the rule numbers. For example:
   
   - Lets say we have (1,3,4,5,6,7,8,9,10,200)
   - If you try to drag 4 to the position of 2 (in between 1 and 3), the result 
you get is the rule number 3 (when it should be 2)
   
   So maybe what we need instead to make it less confusing is to re-initailise 
the rule numbers?


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

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

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



Re: [PR] Fix volume snapshot of encrypted NFS/StorPool volume [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8873:
URL: https://github.com/apache/cloudstack/pull/8873#issuecomment-2051324928

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

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



Re: [PR] Temporarily backup StorPool volume before expunge [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8843:
URL: https://github.com/apache/cloudstack/pull/8843#issuecomment-2051324878

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

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



Re: [PR] Fix volume snapshot of encrypted NFS/StorPool volume [cloudstack]

2024-04-12 Thread via GitHub


DaanHoogland commented on PR #8873:
URL: https://github.com/apache/cloudstack/pull/8873#issuecomment-2051321825

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

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



Re: [PR] Temporarily backup StorPool volume before expunge [cloudstack]

2024-04-12 Thread via GitHub


DaanHoogland commented on PR #8843:
URL: https://github.com/apache/cloudstack/pull/8843#issuecomment-2051322433

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

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



Re: [PR] Fix volume snapshot of encrypted NFS/StorPool volume [cloudstack]

2024-04-12 Thread via GitHub


blueorangutan commented on PR #8873:
URL: https://github.com/apache/cloudstack/pull/8873#issuecomment-2051305698

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9232


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

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

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



  1   2   >