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/09/20 05:16:28 UTC

[GitHub] [cloudstack] Pearl1594 opened a new pull request #5468: api: Fix list templates when no secondary stores present

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


   ### Description
   
   This PR fixes listTemplates' API response when no stores are present. Currenty, when there are no secondary stores, listing templates leads to a DB exception, that breaks the API.
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [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
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   Prior Fix:
   ```
   (localcloud) SBCM5> > list templates templatefilter=all filter=id,downloaddetails
   🙈 Error: (HTTP 530, error code 4250) DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: SELECT template_store_ref.id, template_store_ref.store_id, template_store_ref.template_id, template_store_ref.store_role, template_store_ref.created, template_store_ref.last_updated, template_store_ref.download_pct, template_store_ref.size, template_store_ref.physical_size, template_store_ref.download_state, template_store_ref.local_path, template_store_ref.error_str, template_store_ref.job_id, template_store_ref.install_path, template_store_ref.url, template_store_ref.download_url, template_store_ref.download_url_created, template_store_ref.is_copy, template_store_ref.destroyed, template_store_ref.update_count, template_store_ref.updated, template_store_ref.state, template_store_ref.ref_cnt FROM template_store_ref WHERE template_store_ref.template_id = 203  AND template_store_ref.download_state != 'BYPASSED'  AND template_store_ref.destroyed = 0  AND template_store_ref.store_id IN 
 ) 
   (localcloud) SBCM5> > list templates templatefilter=all
   
   ```
   
   Post Fix:
   
   ```
   (localcloud) SBCM5> > list templates templatefilter=all filter=id,downloaddetails
   {
     "count": 3,
     "template": [
       {
         "downloaddetails": [],
         "id": "47339986-99f8-482e-86f1-0a052608b0ff"
       },
       {
         "downloaddetails": [],
         "id": "2b121919-beb6-4987-a522-00b93e3bd240"
       },
       {
         "downloaddetails": [],
         "id": "8ca30d40-151b-11ec-9958-1e00e300025a"
       }
     ]
   }
   
   ```
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


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

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 #5468: api: Fix list templates when no secondary stores present

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


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


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

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

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #5468: api: Fix list templates when no secondary stores present

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


   @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 #5468: api: Fix list templates when no secondary stores present

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


   <b>Trillian test result (tid-2125)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 34958 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5468-t2125-kvm-centos7.zip
   Smoke tests completed. 89 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 #5468: api: Fix list templates when no secondary stores present

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


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


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

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

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



[GitHub] [cloudstack] shwstppr closed pull request #5468: api: Fix list templates when no secondary stores present

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


   


-- 
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 #5468: api: Fix list templates when no secondary stores present

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


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


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

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

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



[GitHub] [cloudstack] rhtyd commented on pull request #5468: api: Fix list templates when no secondary stores present

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


   @Pearl1594 pl kick pkging, smoketest


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

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

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #5468: api: Fix list templates when no secondary stores present

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


   @blueorangutan test


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

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

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



[GitHub] [cloudstack] nvazquez merged pull request #5468: api: Fix list templates when no secondary stores present

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


   


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