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

[GitHub] [cloudstack] SadiJr opened a new pull request #5774: [Veeam] Force ACS to use the template repository to clone job

SadiJr opened a new pull request #5774:
URL: https://github.com/apache/cloudstack/pull/5774


   ### Description
   
   Using the VMWare hypervisor, and with Veeam integration enabled, when a VM is assigned to a Backup Offering, ACS executes an operation to clone the Veeam job of that Backup Offering. However, instead of using the Backup Offering specific repository, currently ACS uses the first repository found on Veeam, which can cause problems for users who have more than one repository.
   
   This PR intends to fix this behavior.
   
   ### 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)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   ### How Has This Been Tested?
   It was tested in a local laboratory, with 2 Veeam repositories:
   
   - I assigned two VMs to two Backup Offerings, one for each repository;
   - The two jobs were created in the same repository, and it should be one for each. This happened because ACS is using the first repository it finds;
   - With this changes, I repeated the test in the same environment;
   - Now the jobs are being cloned in the correctly repositories.


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

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

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



[GitHub] [cloudstack] sureshanaparti removed a comment on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   <b>Trillian test result (tid-2709)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 35507 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5774-t2709-vmware-67u3.zip
   Smoke tests completed. 91 look OK, 0 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 2098


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

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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package


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

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

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan test centos7 vmware-67u3


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

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

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



[GitHub] [cloudstack] sureshanaparti removed a comment on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   <b>Trillian test result (tid-2795)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 20082 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5774-t2795-vmware-67u3.zip
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_root_resize.py
   Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   Hi @SadiJr Can you address the outstanding comments. Thanks.


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

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

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



[GitHub] [cloudstack] GabrielBrascher commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] SadiJr commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @GabrielBrascher @sureshanaparti Sorry for the delay in answer. 
   
   Regarding @GabrielBrascher's suggestions: thank you for them, I will apply them soon.


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

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

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



[GitHub] [cloudstack] GabrielBrascher commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package


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

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

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



[GitHub] [cloudstack] rohityadavcloud commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package
   
   


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

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

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package


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

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

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



[GitHub] [cloudstack] SadiJr commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @DaanHoogland For me, it is fine to go into main only.


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

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

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   Merging based on approvals, smoke test results and author's tests.


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   <b>Trillian test result (tid-2801)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 40384 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5774-t2801-vmware-67u3.zip
   Smoke tests completed. 92 look OK, 0 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


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

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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan test centos7 vmware-67u3 keepEnv


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package


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

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

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



[GitHub] [cloudstack] GabrielBrascher commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package


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

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

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



[GitHub] [cloudstack] GabrielBrascher commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @DaanHoogland I think that there are no smoke tests covering it indeed.
   The code looks good but I have no VMware staging environment so I would not be able to test it. I am trusting in the author's testing it.
   
   To mitigate issues or future changes in the code that could affect this behavior I`ve suggested extracting a few parts of the added method and creating unit tests to cover a few of the String parsing logic.


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan test centos7 vmware-67u3


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 2040


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

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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   not sure if any smoke tests are available that would be touched by this chance. (i don't think there are) I think we must trust the authors testing, @rohityadavcloud @GabrielBrascher @sureshanaparti ? (cc @SadiJr )


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] sureshanaparti merged pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] sureshanaparti commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @blueorangutan package


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @SadiJr do you want this on 4.16.1? (if so please rebase on the 4.16 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-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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



##########
File path: plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
##########
@@ -439,7 +461,12 @@ public boolean startBackupJob(final String jobId) {
     public boolean cloneVeeamJob(final Job parentJob, final String clonedJobName) {
         LOG.debug("Trying to clone veeam job: " + parentJob.getUid() + " with backup uuid: " + clonedJobName);
         try {
-            final Ref repositoryRef =  listBackupRepository(parentJob.getBackupServerId());
+            final Ref repositoryRef = listBackupRepository(parentJob.getBackupServerId(), parentJob.getName());
+            if (repositoryRef == null) {
+                throw new CloudRuntimeException(String.format("Failed to clone backup job because couldn't find any "
+                        + "repository associated with backup job [id: %s, uid: %s, backupServerId: %s, name: %s].",
+                        parentJob.getId(), parentJob.getBackupServerId(), parentJob.getUid(), parentJob.getName()));

Review comment:
       @SadiJr correct the order of parameters in the error message.
   
   ```suggestion
                           parentJob.getId(), parentJob.getUid(), parentJob.getBackupServerId(), parentJob.getName()));
   ```




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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 1929


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

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

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



[GitHub] [cloudstack] blueorangutan removed a comment on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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






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

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

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



[GitHub] [cloudstack] blueorangutan removed a comment on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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






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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] SadiJr commented on a change in pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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



##########
File path: plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
##########
@@ -337,25 +337,47 @@ private boolean checkTaskStatus(final HttpResponse response) throws IOException
     //////////////// Public Veeam APIs /////////////////////
     ////////////////////////////////////////////////////////
 
-    public Ref listBackupRepository(final String backupServerId) {
-        LOG.debug("Trying to list backup repository for backup server id: " + backupServerId);
+    public Ref listBackupRepository(final String backupServerId, final String backupName) {
+        LOG.debug(String.format("Trying to list backup repository for backup job [name: %s] in server [id: %s].", backupName, backupServerId));
         try {
+            String repositoryName = getRepositoryNameFromJob(backupName);
+            if (StringUtils.isEmpty(repositoryName)) {
+                throw new CloudRuntimeException(String.format("Can't find any repository name for Job [name: %s].", backupName));
+            }
             final HttpResponse response = get(String.format("/backupServers/%s/repositories", backupServerId));
             checkResponseOK(response);
             final ObjectMapper objectMapper = new XmlMapper();
             final EntityReferences references = objectMapper.readValue(response.getEntity().getContent(), EntityReferences.class);
             for (final Ref ref : references.getRefs()) {
-                if (ref.getType().equals("RepositoryReference")) {
+                if (ref.getType().equals("RepositoryReference") && ref.getName().equals(repositoryName)) {
                     return ref;
                 }
             }
         } catch (final IOException e) {
-            LOG.error("Failed to list Veeam jobs due to:", e);
+            LOG.error(String.format("Failed to list Veeam backup repository used by backup job [name: %s] due to: [%s].", backupName, e.getMessage()), e);
             checkResponseTimeOut(e);
         }
         return null;
     }
 
+    private String getRepositoryNameFromJob(String backupName) {
+        final List<String> cmds = Arrays.asList(
+                String.format("$Job = Get-VBRJob -name \"%s\"", backupName),
+                "$Job.GetBackupTargetRepository() ^| select Name | Format-List"
+        );
+        Pair<Boolean, String> result = executePowerShellCommands(cmds);
+        if (result == null || !result.first()) {
+            throw new CloudRuntimeException(String.format("Failed to get Repository Name from Job [name: %s].", backupName));
+        }
+
+        for (String block : result.second().split("\n\n")) {
+           if (block.matches("Name(\\s)+:(.)*")) {
+               return block.split(":")[1].trim();
+           }
+        }
+        return null;

Review comment:
       Done.




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

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

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



[GitHub] [cloudstack] SadiJr commented on a change in pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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



##########
File path: plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
##########
@@ -337,25 +337,47 @@ private boolean checkTaskStatus(final HttpResponse response) throws IOException
     //////////////// Public Veeam APIs /////////////////////
     ////////////////////////////////////////////////////////
 
-    public Ref listBackupRepository(final String backupServerId) {
-        LOG.debug("Trying to list backup repository for backup server id: " + backupServerId);
+    public Ref listBackupRepository(final String backupServerId, final String backupName) {
+        LOG.debug(String.format("Trying to list backup repository for backup job [name: %s] in server [id: %s].", backupName, backupServerId));
         try {
+            String repositoryName = getRepositoryNameFromJob(backupName);
+            if (StringUtils.isEmpty(repositoryName)) {
+                throw new CloudRuntimeException(String.format("Can't find any repository name for Job [name: %s].", backupName));
+            }
             final HttpResponse response = get(String.format("/backupServers/%s/repositories", backupServerId));
             checkResponseOK(response);
             final ObjectMapper objectMapper = new XmlMapper();
             final EntityReferences references = objectMapper.readValue(response.getEntity().getContent(), EntityReferences.class);
             for (final Ref ref : references.getRefs()) {
-                if (ref.getType().equals("RepositoryReference")) {
+                if (ref.getType().equals("RepositoryReference") && ref.getName().equals(repositoryName)) {
                     return ref;
                 }
             }
         } catch (final IOException e) {
-            LOG.error("Failed to list Veeam jobs due to:", e);
+            LOG.error(String.format("Failed to list Veeam backup repository used by backup job [name: %s] due to: [%s].", backupName, e.getMessage()), e);
             checkResponseTimeOut(e);
         }
         return null;
     }
 
+    private String getRepositoryNameFromJob(String backupName) {
+        final List<String> cmds = Arrays.asList(
+                String.format("$Job = Get-VBRJob -name \"%s\"", backupName),
+                "$Job.GetBackupTargetRepository() ^| select Name | Format-List"
+        );
+        Pair<Boolean, String> result = executePowerShellCommands(cmds);
+        if (result == null || !result.first()) {
+            throw new CloudRuntimeException(String.format("Failed to get Repository Name from Job [name: %s].", backupName));
+        }
+
+        for (String block : result.second().split("\n\n")) {
+           if (block.matches("Name(\\s)+:(.)*")) {
+               return block.split(":")[1].trim();
+           }

Review comment:
       Done too. Thanks for the suggestions.




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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


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


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

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

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



[GitHub] [cloudstack] SadiJr commented on pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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


   @sureshanaparti thanks for the review, and sorry for the delay in answer.


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

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

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



[GitHub] [cloudstack] GabrielBrascher commented on a change in pull request #5774: [Veeam] Force ACS to use the template repository to clone job

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



##########
File path: plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
##########
@@ -337,25 +337,47 @@ private boolean checkTaskStatus(final HttpResponse response) throws IOException
     //////////////// Public Veeam APIs /////////////////////
     ////////////////////////////////////////////////////////
 
-    public Ref listBackupRepository(final String backupServerId) {
-        LOG.debug("Trying to list backup repository for backup server id: " + backupServerId);
+    public Ref listBackupRepository(final String backupServerId, final String backupName) {
+        LOG.debug(String.format("Trying to list backup repository for backup job [name: %s] in server [id: %s].", backupName, backupServerId));
         try {
+            String repositoryName = getRepositoryNameFromJob(backupName);
+            if (StringUtils.isEmpty(repositoryName)) {
+                throw new CloudRuntimeException(String.format("Can't find any repository name for Job [name: %s].", backupName));
+            }
             final HttpResponse response = get(String.format("/backupServers/%s/repositories", backupServerId));
             checkResponseOK(response);
             final ObjectMapper objectMapper = new XmlMapper();
             final EntityReferences references = objectMapper.readValue(response.getEntity().getContent(), EntityReferences.class);
             for (final Ref ref : references.getRefs()) {
-                if (ref.getType().equals("RepositoryReference")) {
+                if (ref.getType().equals("RepositoryReference") && ref.getName().equals(repositoryName)) {
                     return ref;
                 }
             }
         } catch (final IOException e) {
-            LOG.error("Failed to list Veeam jobs due to:", e);
+            LOG.error(String.format("Failed to list Veeam backup repository used by backup job [name: %s] due to: [%s].", backupName, e.getMessage()), e);
             checkResponseTimeOut(e);
         }
         return null;
     }
 
+    private String getRepositoryNameFromJob(String backupName) {
+        final List<String> cmds = Arrays.asList(
+                String.format("$Job = Get-VBRJob -name \"%s\"", backupName),
+                "$Job.GetBackupTargetRepository() ^| select Name | Format-List"
+        );
+        Pair<Boolean, String> result = executePowerShellCommands(cmds);
+        if (result == null || !result.first()) {
+            throw new CloudRuntimeException(String.format("Failed to get Repository Name from Job [name: %s].", backupName));
+        }
+
+        for (String block : result.second().split("\n\n")) {
+           if (block.matches("Name(\\s)+:(.)*")) {
+               return block.split(":")[1].trim();
+           }

Review comment:
       Maybe a few unit test cases would be good, just to ensure this method sends the expected `cmds` (lines 364 - 367) and retrieves the correct String when processing the result (373 - 377).

##########
File path: plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java
##########
@@ -337,25 +337,47 @@ private boolean checkTaskStatus(final HttpResponse response) throws IOException
     //////////////// Public Veeam APIs /////////////////////
     ////////////////////////////////////////////////////////
 
-    public Ref listBackupRepository(final String backupServerId) {
-        LOG.debug("Trying to list backup repository for backup server id: " + backupServerId);
+    public Ref listBackupRepository(final String backupServerId, final String backupName) {
+        LOG.debug(String.format("Trying to list backup repository for backup job [name: %s] in server [id: %s].", backupName, backupServerId));
         try {
+            String repositoryName = getRepositoryNameFromJob(backupName);
+            if (StringUtils.isEmpty(repositoryName)) {
+                throw new CloudRuntimeException(String.format("Can't find any repository name for Job [name: %s].", backupName));
+            }
             final HttpResponse response = get(String.format("/backupServers/%s/repositories", backupServerId));
             checkResponseOK(response);
             final ObjectMapper objectMapper = new XmlMapper();
             final EntityReferences references = objectMapper.readValue(response.getEntity().getContent(), EntityReferences.class);
             for (final Ref ref : references.getRefs()) {
-                if (ref.getType().equals("RepositoryReference")) {
+                if (ref.getType().equals("RepositoryReference") && ref.getName().equals(repositoryName)) {
                     return ref;
                 }
             }
         } catch (final IOException e) {
-            LOG.error("Failed to list Veeam jobs due to:", e);
+            LOG.error(String.format("Failed to list Veeam backup repository used by backup job [name: %s] due to: [%s].", backupName, e.getMessage()), e);
             checkResponseTimeOut(e);
         }
         return null;
     }
 
+    private String getRepositoryNameFromJob(String backupName) {
+        final List<String> cmds = Arrays.asList(
+                String.format("$Job = Get-VBRJob -name \"%s\"", backupName),
+                "$Job.GetBackupTargetRepository() ^| select Name | Format-List"
+        );
+        Pair<Boolean, String> result = executePowerShellCommands(cmds);
+        if (result == null || !result.first()) {
+            throw new CloudRuntimeException(String.format("Failed to get Repository Name from Job [name: %s].", backupName));
+        }
+
+        for (String block : result.second().split("\n\n")) {
+           if (block.matches("Name(\\s)+:(.)*")) {
+               return block.split(":")[1].trim();
+           }
+        }
+        return null;

Review comment:
       You can already throw the exception that is thrown in case this method returns null or empty, instead of returning `null`.
   ```
   String repositoryName = getRepositoryNameFromJob(backupName);
   if (StringUtils.isEmpty(repositoryName)) {
      throw new CloudRuntimeException(String.format("Can't find any repository name for Job [name: %s].", backupName));
   }
   ```




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

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

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