You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "DaanHoogland (via GitHub)" <gi...@apache.org> on 2024/04/10 07:59:24 UTC

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

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

   ### Description
   
   This PR fixes an NPE seen in an evironment after an upgrade from 4.15 to 4.17. It is not clear if configuration mistakes where made, but this PR attempts to handle the NPE a bit.
   
   Starting a stopped VM after ACS upgrade from 4.15.2 to 4.17.2 resulted in failure to start VM caused by NPE while starting the VR.
   
   ~~~
   2024-01-02 22:40:32,765 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-56:ctx-d6145db6 job-312930) (logid:77c2bb82) Unexpected exception while executing org.apache.cloudstack.api.command.admin.vm.StartVMCmdByAdmin
   java.lang.NullPointerException
           at org.apache.cloudstack.storage.image.store.TemplateObject.getId(TemplateObject.java:111)
           at org.apache.cloudstack.storage.volume.VolumeServiceImpl.createVolumeFromTemplateAsync(VolumeServiceImpl.java:1533)
           at org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.recreateVolume(VolumeOrchestrator.java:1583)
           at org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.prepare(VolumeOrchestrator.java:1689)
           at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:1179)
           at com.cloud.vm.VirtualMachineManagerImpl.advanceStart(VirtualMachineManagerImpl.java:972)
           at com.cloud.network.router.NetworkHelperImpl.start(NetworkHelperImpl.java:315)
           at com.cloud.network.router.NetworkHelperImpl.startVirtualRouter(NetworkHelperImpl.java:394)
           at com.cloud.network.router.NetworkHelperImpl.startRouters(NetworkHelperImpl.java:379)
           at org.apache.cloudstack.network.router.deployment.RouterDeploymentDefinition.deployVirtualRouter(RouterDeploymentDefinition.java:209)
           at com.cloud.network.element.VirtualRouterElement.prepare(VirtualRouterElement.java:285)
           at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareElement(NetworkOrchestrator.java:1591)
           at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareNic(NetworkOrchestrator.java:1946)
           at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1880)
   
   ~~~
   <!--- 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: AUTOMATION 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)
   - [ ] build/CI
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [x] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [x] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- 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


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

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

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


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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1566898832


##########
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:
   @sureshanaparti , I changed the class to have a private constructor, making sure the configure is always called and the input image is checked. (needs extensive testing ;) 



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

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

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


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

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

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


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

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

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


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

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1559028847


##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##########
@@ -89,10 +90,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) {
+            String msg = String.format("Temp[late Object is not propoerly initialised %s", this.toString());

Review Comment:
   ```suggestion
               String msg = String.format("Template Object is not properly initialised %s", this.toString());
   ```
   
   :-)



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

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

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


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

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

   <b>[SF] Trillian test result (tid-9915)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 44656 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t9915-vmware-67u3.zip
   Smoke tests completed. 71 look OK, 39 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 82.33 | test_accounts.py
   test_DeleteDomain | `Error` | 157.88 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 160.89 | test_accounts.py
   test_01_user_remove_VM_running | `Error` | 71.64 | test_accounts.py
   test_DeployVmAntiAffinityGroup_in_project | `Error` | 81.44 | test_affinity_groups_projects.py
   ContextSuite context=TestAnnotations>:setup | `Error` | 0.00 | test_annotations.py
   test_query_async_job_result | `Error` | 103.61 | test_async_job.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 75.67 | test_internal_lb.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 75.68 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 139.63 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 139.64 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 74.34 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 74.35 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 151.46 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 151.47 | test_internal_lb.py
   test_deploy_more_vms_than_limit_allows | `Error` | 63.59 | test_deploy_vms_in_parallel.py
   ContextSuite context=TestLoadBalance>:setup | `Error` | 0.00 | test_loadbalance.py
   test_deployvm_firstfit | `Error` | 64.53 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userconcentrated | `Error` | 16.03 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdispersing | `Error` | 16.99 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdata | `Error` | 61.38 | test_deploy_vm_with_userdata.py
   test_deployvm_userdata_post | `Error` | 15.85 | test_deploy_vm_with_userdata.py
   test_delete_account | `Error` | 79.69 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 9.95 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 9.95 | test_network.py
   test_deploy_vm_l2network | `Error` | 8.84 | test_network.py
   test_deploy_vm_l2network | `Error` | 8.84 | test_network.py
   test_l2network_restart | `Error` | 9.40 | test_network.py
   test_l2network_restart | `Error` | 9.40 | test_network.py
   ContextSuite context=TestL2Networks>:teardown | `Error` | 10.59 | test_network.py
   ContextSuite context=TestPortForwarding>:setup | `Error` | 83.65 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 71.13 | test_network.py
   test_reboot_router | `Error` | 68.73 | test_network.py
   test_releaseIP | `Error` | 67.53 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 138.87 | test_network.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_list_vms_metrics_admin | `Error` | 23.97 | test_metrics_api.py
   test_list_vms_metrics_history | `Error` | 23.12 | test_metrics_api.py
   test_list_vms_metrics_user | `Error` | 69.71 | test_metrics_api.py
   test_list_volumes_metrics_history | `Error` | 16.60 | test_metrics_api.py
   test_03_deploy_vm_domain_service_offering | `Error` | 94.82 | test_domain_service_offerings.py
   ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py
   test_nic_secondaryip_add_remove | `Error` | 77.04 | test_multipleips_per_nic.py
   test_nested_virtualization_vmware | `Error` | 94.31 | test_nested_virtualization.py
   test_network_acl | `Error` | 97.41 | test_network_acl.py
   test_01_verify_ipv6_network | `Error` | 72.79 | test_network_ipv6.py
   test_01_verify_ipv6_network | `Error` | 72.80 | test_network_ipv6.py
   ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
   test_01_create_delete_portforwarding_fornonvpc | `Error` | 70.40 | test_portforwardingrules.py
   test_02_vpc_privategw_static_routes | `Failure` | 142.09 | test_privategw_acl.py
   test_02_vpc_privategw_static_routes | `Error` | 142.10 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 138.18 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Error` | 138.19 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 260.42 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Error` | 260.44 | test_privategw_acl.py
   test_09_project_suspend | `Error` | 72.30 | test_projects.py
   test_10_project_activation | `Error` | 16.61 | test_projects.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   test_01_so_removal_resource_update | `Error` | 71.72 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   test_02_routervm_iptables_policies | `Error` | 69.37 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 99.66 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 99.67 | test_routers_iptables_default_policy.py
   test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 63.75 | test_routers_network_ops.py
   test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 60.40 | test_routers_network_ops.py
   test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 139.71 | test_routers_network_ops.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Error` | 126.79 | test_routers_network_ops.py
   test_03_RVR_Network_check_router_state | `Error` | 129.93 | test_routers_network_ops.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 73.83 | test_service_offerings.py
   test_01_import_storage_policies | `Error` | 20.68 | test_storage_policy.py
   ContextSuite context=TestVMWareStoragePolicies>:teardown | `Error` | 20.72 | test_storage_policy.py
   test_01_vapps_vm_cycle | `Error` | 0.91 | test_vm_life_cycle.py
   ContextSuite context=TestVolumes>:setup | `Error` | 80.07 | test_volumes.py
   test_01_verify_ipv6_vpc | `Error` | 89.97 | test_vpc_ipv6.py
   test_01_verify_ipv6_vpc | `Error` | 89.97 | test_vpc_ipv6.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 168.38 | test_vpc_redundant.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 168.39 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Failure` | 169.57 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Error` | 169.59 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 178.64 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Error` | 178.66 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 177.96 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Error` | 177.97 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 162.95 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 162.96 | test_vpc_redundant.py
   test_01_VPC_nics_after_destroy | `Failure` | 99.52 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Failure` | 99.27 | test_vpc_router_nics.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 257.54 | test_vpc_vpn.py
   test_01_redundant_vpc_site2site_vpn | `Error` | 257.55 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 138.22 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Error` | 138.23 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 69.81 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 69.81 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 125.78 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Error` | 125.78 | 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-unsubscribe@cloudstack.apache.org

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


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

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

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1587369641


##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##########
@@ -81,6 +81,10 @@ public TemplateObject() {
     }
 
     protected void configure(VMTemplateVO template, DataStore dataStore) {
+        if (template == null) {
+            String msg = String.format("Template Object is not properly initialised %s", this.toString());
+            s_logger.error(msg);

Review Comment:
   ```suggestion
               s_logger.warn(msg);
   ```



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

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

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


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

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

   <b>[SF] Trillian test result (tid-10095)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 45558 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t10095-vmware-67u3.zip
   Smoke tests completed. 71 look OK, 39 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 134.13 | test_accounts.py
   test_DeleteDomain | `Error` | 113.25 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 97.69 | test_accounts.py
   test_01_user_remove_VM_running | `Error` | 74.14 | test_accounts.py
   test_DeployVmAntiAffinityGroup_in_project | `Error` | 86.05 | test_affinity_groups_projects.py
   ContextSuite context=TestAnnotations>:setup | `Error` | 0.00 | test_annotations.py
   test_query_async_job_result | `Error` | 103.78 | test_async_job.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 89.33 | test_internal_lb.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 89.34 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 160.94 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 160.95 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 82.20 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 82.21 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 162.60 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 162.61 | test_internal_lb.py
   test_deploy_more_vms_than_limit_allows | `Error` | 80.40 | test_deploy_vms_in_parallel.py
   ContextSuite context=TestLoadBalance>:setup | `Error` | 0.00 | test_loadbalance.py
   test_deployvm_firstfit | `Error` | 79.60 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userconcentrated | `Error` | 21.34 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdispersing | `Error` | 23.41 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdata | `Error` | 77.68 | test_deploy_vm_with_userdata.py
   test_deployvm_userdata_post | `Error` | 21.44 | test_deploy_vm_with_userdata.py
   test_delete_account | `Error` | 80.66 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 11.10 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 11.10 | test_network.py
   test_deploy_vm_l2network | `Error` | 8.83 | test_network.py
   test_deploy_vm_l2network | `Error` | 8.83 | test_network.py
   test_l2network_restart | `Error` | 13.41 | test_network.py
   test_l2network_restart | `Error` | 13.41 | test_network.py
   ContextSuite context=TestL2Networks>:teardown | `Error` | 14.54 | test_network.py
   ContextSuite context=TestPortForwarding>:setup | `Error` | 86.66 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 66.17 | test_network.py
   test_reboot_router | `Error` | 66.82 | test_network.py
   test_releaseIP | `Error` | 70.60 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 136.48 | test_network.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_list_vms_metrics_admin | `Error` | 25.30 | test_metrics_api.py
   test_list_vms_metrics_history | `Error` | 15.65 | test_metrics_api.py
   test_list_vms_metrics_user | `Error` | 74.18 | test_metrics_api.py
   test_list_volumes_metrics_history | `Error` | 15.31 | test_metrics_api.py
   test_03_deploy_vm_domain_service_offering | `Error` | 96.43 | test_domain_service_offerings.py
   ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py
   test_nic_secondaryip_add_remove | `Error` | 78.85 | test_multipleips_per_nic.py
   test_nested_virtualization_vmware | `Error` | 95.66 | test_nested_virtualization.py
   test_network_acl | `Error` | 104.26 | test_network_acl.py
   test_01_verify_ipv6_network | `Error` | 68.06 | test_network_ipv6.py
   test_01_verify_ipv6_network | `Error` | 68.06 | test_network_ipv6.py
   ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
   test_01_create_delete_portforwarding_fornonvpc | `Error` | 72.07 | test_portforwardingrules.py
   test_02_vpc_privategw_static_routes | `Failure` | 141.96 | test_privategw_acl.py
   test_02_vpc_privategw_static_routes | `Error` | 141.97 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 135.18 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Error` | 135.19 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 269.63 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Error` | 269.65 | test_privategw_acl.py
   test_09_project_suspend | `Error` | 73.38 | test_projects.py
   test_10_project_activation | `Error` | 23.58 | test_projects.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   test_01_so_removal_resource_update | `Error` | 69.14 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   test_02_routervm_iptables_policies | `Error` | 73.16 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 96.49 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 96.50 | test_routers_iptables_default_policy.py
   test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 63.83 | test_routers_network_ops.py
   test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 73.58 | test_routers_network_ops.py
   test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 131.84 | test_routers_network_ops.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Error` | 146.88 | test_routers_network_ops.py
   test_03_RVR_Network_check_router_state | `Error` | 133.78 | test_routers_network_ops.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 77.18 | test_service_offerings.py
   test_01_import_storage_policies | `Error` | 22.01 | test_storage_policy.py
   ContextSuite context=TestVMWareStoragePolicies>:teardown | `Error` | 22.05 | test_storage_policy.py
   test_01_vapps_vm_cycle | `Error` | 1.29 | test_vm_life_cycle.py
   ContextSuite context=TestVolumes>:setup | `Error` | 78.83 | test_volumes.py
   test_01_verify_ipv6_vpc | `Error` | 88.55 | test_vpc_ipv6.py
   test_01_verify_ipv6_vpc | `Error` | 88.56 | test_vpc_ipv6.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 170.76 | test_vpc_redundant.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 170.78 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Failure` | 171.99 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Error` | 172.00 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 169.35 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Error` | 169.36 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 169.25 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Error` | 169.26 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 163.89 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 163.90 | test_vpc_redundant.py
   test_01_VPC_nics_after_destroy | `Failure` | 108.04 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Failure` | 96.26 | test_vpc_router_nics.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 264.00 | test_vpc_vpn.py
   test_01_redundant_vpc_site2site_vpn | `Error` | 264.02 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 131.00 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Error` | 131.01 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 76.49 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 76.50 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 136.93 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Error` | 136.94 | 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-unsubscribe@cloudstack.apache.org

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


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

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

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


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

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

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


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

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

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

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


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

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

   @blueorangutan package


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

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

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


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

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

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


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

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

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


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

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

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


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

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

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


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

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

   @blueorangutan package


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

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

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


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

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

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


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

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

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


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

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

   <b>[SF] Trillian Build Failed (tid-9848)<b/>


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

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

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


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

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

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


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

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

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


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

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

   <b>[SF] Trillian test result (tid-9784)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 40372 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t9784-kvm-centos7.zip
   Smoke tests completed. 110 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


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

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

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


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

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

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

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


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

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

   @DaanHoogland a [SL] Trillian-Jenkins test job (rocky8 mgmt + vmware-70u3) has been kicked to run smoke tests


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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1587276383


##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -1832,7 +1832,7 @@ private Pair<VolumeVO, DataStore> recreateVolume(VolumeVO vol, VirtualMachinePro
                 break; //break out of template-redeploy retry loop
             } catch (StorageAccessException e) {
                 throw e;
-            } catch (InterruptedException | ExecutionException e) {
+            } catch (InterruptedException | ExecutionException | NullPointerException e) {

Review Comment:
   for test purposes ; let the NPE pass through
   ```suggestion
               } catch (InterruptedException | ExecutionException e) {
   ```



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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1568778603


##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##########
@@ -76,11 +78,16 @@ public class TemplateObject implements TemplateInfo {
     TemplateDataStoreDao templateStoreDao;
     final private boolean followRedirects;
 
-    public TemplateObject() {
+    private TemplateObject() {
         this.followRedirects = StorageManager.DataStoreDownloadFollowRedirects.value();
     }
 
     protected void configure(VMTemplateVO template, DataStore dataStore) {
+        if (template == null) {
+            String msg = String.format("Template Object is not properly initialised %s", this.toString());
+            s_logger.error(msg);
+            throw new InvalidParameterValueException(msg);
+        }

Review Comment:
   ```suggestion
   ```



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

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

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


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

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

   <b>[SF] Trillian test result (tid-9894)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 46412 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t9894-kvm-centos7.zip
   Smoke tests completed. 109 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_08_migrate_vm | `Error` | 0.05 | test_vm_life_cycle.py
   


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

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

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


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

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

   <b>[SF] Trillian test result (tid-10042)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 49762 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t10042-vmware-67u3.zip
   Smoke tests completed. 71 look OK, 39 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 156.75 | test_accounts.py
   test_DeleteDomain | `Error` | 101.52 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 91.91 | test_accounts.py
   test_01_user_remove_VM_running | `Error` | 80.21 | test_accounts.py
   test_DeployVmAntiAffinityGroup_in_project | `Error` | 82.76 | test_affinity_groups_projects.py
   ContextSuite context=TestAnnotations>:setup | `Error` | 0.00 | test_annotations.py
   test_query_async_job_result | `Error` | 100.79 | test_async_job.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 80.36 | test_internal_lb.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 80.36 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 151.54 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 151.55 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 95.92 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 95.93 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 160.62 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 160.63 | test_internal_lb.py
   test_deploy_more_vms_than_limit_allows | `Error` | 72.47 | test_deploy_vms_in_parallel.py
   ContextSuite context=TestLoadBalance>:setup | `Error` | 0.00 | test_loadbalance.py
   test_deployvm_firstfit | `Error` | 81.66 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userconcentrated | `Error` | 17.09 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdispersing | `Error` | 16.08 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdata | `Error` | 73.84 | test_deploy_vm_with_userdata.py
   test_deployvm_userdata_post | `Error` | 14.16 | test_deploy_vm_with_userdata.py
   test_delete_account | `Error` | 81.70 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 9.18 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 9.18 | test_network.py
   test_deploy_vm_l2network | `Error` | 7.88 | test_network.py
   test_deploy_vm_l2network | `Error` | 7.89 | test_network.py
   test_l2network_restart | `Error` | 10.40 | test_network.py
   test_l2network_restart | `Error` | 10.40 | test_network.py
   ContextSuite context=TestL2Networks>:teardown | `Error` | 11.55 | test_network.py
   ContextSuite context=TestPortForwarding>:setup | `Error` | 79.52 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 68.14 | test_network.py
   test_reboot_router | `Error` | 68.19 | test_network.py
   test_releaseIP | `Error` | 68.72 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 135.59 | test_network.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_list_vms_metrics_admin | `Error` | 24.92 | test_metrics_api.py
   test_list_vms_metrics_history | `Error` | 17.77 | test_metrics_api.py
   test_list_vms_metrics_user | `Error` | 67.97 | test_metrics_api.py
   test_list_volumes_metrics_history | `Error` | 17.45 | test_metrics_api.py
   test_03_deploy_vm_domain_service_offering | `Error` | 93.53 | test_domain_service_offerings.py
   ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py
   test_nic_secondaryip_add_remove | `Error` | 78.25 | test_multipleips_per_nic.py
   test_nested_virtualization_vmware | `Error` | 90.37 | test_nested_virtualization.py
   test_network_acl | `Error` | 100.06 | test_network_acl.py
   test_01_verify_ipv6_network | `Error` | 71.74 | test_network_ipv6.py
   test_01_verify_ipv6_network | `Error` | 71.75 | test_network_ipv6.py
   ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
   test_01_create_delete_portforwarding_fornonvpc | `Error` | 74.57 | test_portforwardingrules.py
   test_02_vpc_privategw_static_routes | `Failure` | 137.12 | test_privategw_acl.py
   test_02_vpc_privategw_static_routes | `Error` | 137.13 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 129.33 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Error` | 129.34 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 259.53 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Error` | 259.55 | test_privategw_acl.py
   test_09_project_suspend | `Error` | 68.21 | test_projects.py
   test_10_project_activation | `Error` | 14.07 | test_projects.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   test_01_so_removal_resource_update | `Error` | 69.94 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   test_02_routervm_iptables_policies | `Error` | 69.86 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 96.03 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 96.04 | test_routers_iptables_default_policy.py
   test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 63.96 | test_routers_network_ops.py
   test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 61.84 | test_routers_network_ops.py
   test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 133.11 | test_routers_network_ops.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Error` | 130.91 | test_routers_network_ops.py
   test_03_RVR_Network_check_router_state | `Error` | 137.64 | test_routers_network_ops.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 76.08 | test_service_offerings.py
   test_01_import_storage_policies | `Error` | 17.20 | test_storage_policy.py
   ContextSuite context=TestVMWareStoragePolicies>:teardown | `Error` | 17.24 | test_storage_policy.py
   test_01_offline_migrate_VM_and_root_volume | `Error` | 115.95 | test_vm_life_cycle.py
   test_02_offline_migrate_VM_with_two_data_disks | `Error` | 65.86 | test_vm_life_cycle.py
   test_03_live_migrate_VM_with_two_data_disks | `Error` | 66.97 | test_vm_life_cycle.py
   test_04_migrate_detached_volume | `Error` | 64.47 | test_vm_life_cycle.py
   test_01_vapps_vm_cycle | `Error` | 1.14 | test_vm_life_cycle.py
   ContextSuite context=TestVolumes>:setup | `Error` | 80.63 | test_volumes.py
   test_01_verify_ipv6_vpc | `Error` | 87.51 | test_vpc_ipv6.py
   test_01_verify_ipv6_vpc | `Error` | 87.52 | test_vpc_ipv6.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 178.64 | test_vpc_redundant.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 178.66 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Failure` | 177.66 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Error` | 177.67 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 175.92 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Error` | 175.94 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 174.12 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Error` | 174.13 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 170.23 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 170.25 | test_vpc_redundant.py
   test_01_VPC_nics_after_destroy | `Failure` | 100.97 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Failure` | 99.59 | test_vpc_router_nics.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 270.70 | test_vpc_vpn.py
   test_01_redundant_vpc_site2site_vpn | `Error` | 270.72 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 131.19 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Error` | 131.20 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 75.55 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 75.55 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 132.23 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Error` | 132.24 | 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-unsubscribe@cloudstack.apache.org

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1568783462


##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##########
@@ -410,10 +414,7 @@ public boolean canBeDeletedFromDataStore() {
 
     @Override
     public boolean isDeployAsIs() {
-        if (this.imageVO == null) {
-            return false;
-        }
-        return this.imageVO.isDeployAsIs();
+        return getImage().isDeployAsIs();

Review Comment:
   ```suggestion
           try {
               return getImage().isDirectDownload();
           } catch (InvalidParameterValueException e) {
               return false;
           }
   ```



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

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

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


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

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

   @blueorangutan test rocky8 vmware-70u3


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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1568779770


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

Review Comment:
   ```suggestion
       public VMTemplateVO getImage() {
           if (template == null) {
               String msg = String.format("Template Object is not properly initialised %s", this.toString());
               s_logger.error(msg);
               throw new InvalidParameterValueException(msg);
           }
   ```



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

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

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


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

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

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


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

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

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


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

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

   <b>[SF] Trillian test result (tid-10169)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 41431 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t10169-vmware-67u3.zip
   Smoke tests completed. 71 look OK, 39 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 74.77 | test_accounts.py
   test_DeleteDomain | `Error` | 195.73 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 112.01 | test_accounts.py
   test_01_user_remove_VM_running | `Error` | 74.56 | test_accounts.py
   test_DeployVmAntiAffinityGroup_in_project | `Error` | 74.65 | test_affinity_groups_projects.py
   ContextSuite context=TestAnnotations>:setup | `Error` | 0.00 | test_annotations.py
   test_query_async_job_result | `Error` | 103.14 | test_async_job.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 99.32 | test_internal_lb.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 99.33 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 132.69 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 132.70 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 74.57 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 74.57 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 155.28 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 155.28 | test_internal_lb.py
   test_deploy_more_vms_than_limit_allows | `Error` | 68.12 | test_deploy_vms_in_parallel.py
   ContextSuite context=TestLoadBalance>:setup | `Error` | 0.00 | test_loadbalance.py
   test_deployvm_firstfit | `Error` | 62.24 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userconcentrated | `Error` | 18.99 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdispersing | `Error` | 12.77 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdata | `Error` | 63.60 | test_deploy_vm_with_userdata.py
   test_deployvm_userdata_post | `Error` | 14.90 | test_deploy_vm_with_userdata.py
   test_delete_account | `Error` | 72.94 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 14.10 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 14.10 | test_network.py
   test_deploy_vm_l2network | `Error` | 7.80 | test_network.py
   test_deploy_vm_l2network | `Error` | 7.80 | test_network.py
   test_l2network_restart | `Error` | 9.99 | test_network.py
   test_l2network_restart | `Error` | 9.99 | test_network.py
   ContextSuite context=TestL2Networks>:teardown | `Error` | 11.12 | test_network.py
   ContextSuite context=TestPortForwarding>:setup | `Error` | 76.14 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 62.50 | test_network.py
   test_reboot_router | `Error` | 64.96 | test_network.py
   test_releaseIP | `Error` | 68.17 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 131.89 | test_network.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_list_vms_metrics_admin | `Error` | 20.37 | test_metrics_api.py
   test_list_vms_metrics_history | `Error` | 17.32 | test_metrics_api.py
   test_list_vms_metrics_user | `Error` | 61.24 | test_metrics_api.py
   test_list_volumes_metrics_history | `Error` | 13.04 | test_metrics_api.py
   test_03_deploy_vm_domain_service_offering | `Error` | 95.24 | test_domain_service_offerings.py
   ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py
   test_nic_secondaryip_add_remove | `Error` | 73.57 | test_multipleips_per_nic.py
   test_nested_virtualization_vmware | `Error` | 82.13 | test_nested_virtualization.py
   test_network_acl | `Error` | 89.78 | test_network_acl.py
   test_01_verify_ipv6_network | `Error` | 62.20 | test_network_ipv6.py
   test_01_verify_ipv6_network | `Error` | 62.21 | test_network_ipv6.py
   ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
   test_01_create_delete_portforwarding_fornonvpc | `Error` | 69.32 | test_portforwardingrules.py
   test_02_vpc_privategw_static_routes | `Failure` | 126.11 | test_privategw_acl.py
   test_02_vpc_privategw_static_routes | `Error` | 126.12 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 124.09 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Error` | 124.10 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 239.35 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Error` | 239.36 | test_privategw_acl.py
   test_09_project_suspend | `Error` | 66.45 | test_projects.py
   test_10_project_activation | `Error` | 15.96 | test_projects.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   test_01_so_removal_resource_update | `Error` | 82.00 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   test_02_routervm_iptables_policies | `Error` | 61.15 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 87.49 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 87.50 | test_routers_iptables_default_policy.py
   test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 61.34 | test_routers_network_ops.py
   test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 55.22 | test_routers_network_ops.py
   test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 135.85 | test_routers_network_ops.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Error` | 123.85 | test_routers_network_ops.py
   test_03_RVR_Network_check_router_state | `Error` | 124.38 | test_routers_network_ops.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 73.37 | test_service_offerings.py
   test_01_import_storage_policies | `Error` | 17.23 | test_storage_policy.py
   ContextSuite context=TestVMWareStoragePolicies>:teardown | `Error` | 17.26 | test_storage_policy.py
   test_01_vapps_vm_cycle | `Error` | 0.94 | test_vm_life_cycle.py
   ContextSuite context=TestVolumes>:setup | `Error` | 71.23 | test_volumes.py
   test_01_verify_ipv6_vpc | `Error` | 85.16 | test_vpc_ipv6.py
   test_01_verify_ipv6_vpc | `Error` | 85.16 | test_vpc_ipv6.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 161.88 | test_vpc_redundant.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 161.89 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Failure` | 156.90 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Error` | 156.91 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 160.55 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Error` | 160.56 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 164.77 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Error` | 164.78 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 163.72 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 163.72 | test_vpc_redundant.py
   test_01_VPC_nics_after_destroy | `Failure` | 91.19 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Failure` | 91.04 | test_vpc_router_nics.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 249.90 | test_vpc_vpn.py
   test_01_redundant_vpc_site2site_vpn | `Error` | 249.92 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 127.09 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Error` | 127.10 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 66.37 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 66.38 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 122.01 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Error` | 122.02 | 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-unsubscribe@cloudstack.apache.org

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


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

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

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


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

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

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


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

Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
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-unsubscribe@cloudstack.apache.org

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


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

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

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


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

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

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


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

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

   <b>[SF] Trillian Build Failed (tid-9869)<b/>


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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1568778603


##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##########
@@ -76,11 +78,16 @@ public class TemplateObject implements TemplateInfo {
     TemplateDataStoreDao templateStoreDao;
     final private boolean followRedirects;
 
-    public TemplateObject() {
+    private TemplateObject() {
         this.followRedirects = StorageManager.DataStoreDownloadFollowRedirects.value();
     }
 
     protected void configure(VMTemplateVO template, DataStore dataStore) {
+        if (template == null) {
+            String msg = String.format("Template Object is not properly initialised %s", this.toString());
+            s_logger.error(msg);
+            throw new InvalidParameterValueException(msg);
+        }

Review Comment:
   ```suggestion
   ```



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

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

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


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

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

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8898?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `0%` with `54 lines` in your changes are missing coverage. Please review.
   > Project coverage is 12.24%. Comparing base [(`f731fe8`)](https://app.codecov.io/gh/apache/cloudstack/commit/f731fe882c5b8459a14da9a13269a8360df2743e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`7c9b467`)](https://app.codecov.io/gh/apache/cloudstack/pull/8898?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 34 commits behind head on 4.18.
   
   | [Files](https://app.codecov.io/gh/apache/cloudstack/pull/8898?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...cloudstack/storage/image/store/TemplateObject.java](https://app.codecov.io/gh/apache/cloudstack/pull/8898?src=pr&el=tree&filepath=engine%2Fstorage%2Fimage%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fstorage%2Fimage%2Fstore%2FTemplateObject.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZW5naW5lL3N0b3JhZ2UvaW1hZ2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2Nsb3Vkc3RhY2svc3RvcmFnZS9pbWFnZS9zdG9yZS9UZW1wbGF0ZU9iamVjdC5qYXZh) | 0.00% | [47 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8898?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...e/cloudstack/storage/volume/VolumeServiceImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8898?src=pr&el=tree&filepath=engine%2Fstorage%2Fvolume%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fstorage%2Fvolume%2FVolumeServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZW5naW5lL3N0b3JhZ2Uvdm9sdW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jbG91ZHN0YWNrL3N0b3JhZ2Uvdm9sdW1lL1ZvbHVtZVNlcnZpY2VJbXBsLmphdmE=) | 0.00% | [7 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8898?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               4.18    #8898       +/-   ##
   =============================================
   - Coverage     13.16%   12.24%    -0.93%     
   - Complexity     9203     9290       +87     
   =============================================
     Files          2724     4698     +1974     
     Lines        258130   414260   +156130     
     Branches      40232    53320    +13088     
   =============================================
   + Hits          33989    50706    +16717     
   - Misses       219833   357253   +137420     
   - Partials       4308     6301     +1993     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8898/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/8898/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `12.24% <0.00%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8898?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


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

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

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


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

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

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


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

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

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


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

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

   <b>[SF] Trillian test result (tid-10118)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 41752 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t10118-vmware-67u3.zip
   Smoke tests completed. 70 look OK, 40 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 98.71 | test_accounts.py
   test_DeleteDomain | `Error` | 98.66 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 91.28 | test_accounts.py
   test_01_user_remove_VM_running | `Error` | 75.45 | test_accounts.py
   test_DeployVmAntiAffinityGroup_in_project | `Error` | 64.49 | test_affinity_groups_projects.py
   ContextSuite context=TestAnnotations>:setup | `Error` | 0.00 | test_annotations.py
   test_query_async_job_result | `Error` | 96.20 | test_async_job.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 78.93 | test_internal_lb.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 78.94 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 141.71 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 141.72 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 81.60 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 81.60 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 142.56 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 142.57 | test_internal_lb.py
   test_deploy_more_vms_than_limit_allows | `Error` | 66.75 | test_deploy_vms_in_parallel.py
   ContextSuite context=TestLoadBalance>:setup | `Error` | 0.00 | test_loadbalance.py
   test_deployvm_firstfit | `Error` | 62.58 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userconcentrated | `Error` | 13.79 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdispersing | `Error` | 15.88 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdata | `Error` | 62.56 | test_deploy_vm_with_userdata.py
   test_deployvm_userdata_post | `Error` | 12.88 | test_deploy_vm_with_userdata.py
   test_delete_account | `Error` | 73.63 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 9.81 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 9.82 | test_network.py
   test_deploy_vm_l2network | `Error` | 5.60 | test_network.py
   test_deploy_vm_l2network | `Error` | 5.60 | test_network.py
   test_l2network_restart | `Error` | 9.90 | test_network.py
   test_l2network_restart | `Error` | 9.91 | test_network.py
   ContextSuite context=TestL2Networks>:teardown | `Error` | 11.04 | test_network.py
   ContextSuite context=TestPortForwarding>:setup | `Error` | 73.29 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 60.71 | test_network.py
   test_reboot_router | `Error` | 61.85 | test_network.py
   test_releaseIP | `Error` | 65.08 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 127.25 | test_network.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_list_vms_metrics_admin | `Error` | 19.60 | test_metrics_api.py
   test_list_vms_metrics_history | `Error` | 18.24 | test_metrics_api.py
   test_list_vms_metrics_user | `Error` | 66.31 | test_metrics_api.py
   test_list_volumes_metrics_history | `Error` | 12.93 | test_metrics_api.py
   test_03_deploy_vm_domain_service_offering | `Error` | 84.65 | test_domain_service_offerings.py
   ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py
   test_nic_secondaryip_add_remove | `Error` | 70.35 | test_multipleips_per_nic.py
   test_nested_virtualization_vmware | `Error` | 88.32 | test_nested_virtualization.py
   test_network_acl | `Error` | 90.50 | test_network_acl.py
   test_01_verify_ipv6_network | `Error` | 66.50 | test_network_ipv6.py
   test_01_verify_ipv6_network | `Error` | 66.50 | test_network_ipv6.py
   ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
   test_01_create_delete_portforwarding_fornonvpc | `Error` | 69.00 | test_portforwardingrules.py
   test_02_vpc_privategw_static_routes | `Failure` | 130.36 | test_privategw_acl.py
   test_02_vpc_privategw_static_routes | `Error` | 130.37 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 124.01 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Error` | 124.02 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 243.43 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Error` | 243.44 | test_privategw_acl.py
   test_09_project_suspend | `Error` | 67.79 | test_projects.py
   test_10_project_activation | `Error` | 15.94 | test_projects.py
   test_create_pvlan_network | `Error` | 0.08 | test_pvlan.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   test_01_so_removal_resource_update | `Error` | 63.45 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   test_02_routervm_iptables_policies | `Error` | 69.59 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 89.01 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 89.03 | test_routers_iptables_default_policy.py
   test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 61.34 | test_routers_network_ops.py
   test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 54.08 | test_routers_network_ops.py
   test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 133.50 | test_routers_network_ops.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Error` | 121.80 | test_routers_network_ops.py
   test_03_RVR_Network_check_router_state | `Error` | 131.66 | test_routers_network_ops.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 71.61 | test_service_offerings.py
   test_01_import_storage_policies | `Error` | 19.23 | test_storage_policy.py
   ContextSuite context=TestVMWareStoragePolicies>:teardown | `Error` | 19.26 | test_storage_policy.py
   test_01_vapps_vm_cycle | `Error` | 0.92 | test_vm_life_cycle.py
   ContextSuite context=TestVolumes>:setup | `Error` | 72.52 | test_volumes.py
   test_01_verify_ipv6_vpc | `Error` | 81.96 | test_vpc_ipv6.py
   test_01_verify_ipv6_vpc | `Error` | 81.96 | test_vpc_ipv6.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 164.52 | test_vpc_redundant.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 164.53 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Failure` | 167.53 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Error` | 167.54 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 163.37 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Error` | 163.38 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 163.95 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Error` | 163.96 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 163.34 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 163.35 | test_vpc_redundant.py
   test_01_VPC_nics_after_destroy | `Failure` | 91.00 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Failure` | 98.99 | test_vpc_router_nics.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 250.22 | test_vpc_vpn.py
   test_01_redundant_vpc_site2site_vpn | `Error` | 250.24 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 132.43 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Error` | 132.44 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 68.10 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 68.10 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 120.90 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Error` | 120.91 | 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-unsubscribe@cloudstack.apache.org

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


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

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

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


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

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

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


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

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

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


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

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

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


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

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

   @blueorangutan package


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

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

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


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

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

   sugestion by @vishesh92 :
   ```
   diff --git a/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java b/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java
   index 492ec74382..30c0131be8 100644
   --- a/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java
   +++ b/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateDataFactoryImpl.java
   @@ -97,6 +97,9 @@ public class TemplateDataFactoryImpl implements TemplateDataFactory {
        @Override
        public TemplateInfo getTemplate(long templateId, DataStore store) {
            VMTemplateVO templ = imageDataDao.findById(templateId);
   +        if (templ == null) {
   +            return null;
   +        }
            if (store == null && !templ.isDirectDownload()) {
                TemplateObject tmpl = TemplateObject.getTemplate(templ, null, null);
                return tmpl;
   ``


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

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

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


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

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

   <b>[SF] Trillian Build Failed (tid-9782)<b/>


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

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

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


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

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

   <b>[SF] Trillian Build Failed (tid-9849)<b/>


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

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

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


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

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

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


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

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

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


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

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

   <b>[SF] Trillian test result (tid-9893)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 85315 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t9893-vmware-67u3.zip
   Smoke tests completed. 57 look OK, 53 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 87.16 | test_accounts.py
   test_DeleteDomain | `Error` | 123.69 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 99.94 | test_accounts.py
   test_01_user_remove_VM_running | `Error` | 71.81 | test_accounts.py
   test_DeployVmAntiAffinityGroup_in_project | `Error` | 122.25 | test_affinity_groups_projects.py
   test_DeployVmAntiAffinityGroup | `Error` | 141.45 | test_affinity_groups.py
   ContextSuite context=TestAnnotations>:setup | `Error` | 0.00 | test_annotations.py
   test_query_async_job_result | `Error` | 95.01 | test_async_job.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 80.69 | test_internal_lb.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 80.70 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 158.06 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 158.07 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 76.85 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 76.86 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 151.19 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 151.20 | test_internal_lb.py
   test_deploy_more_vms_than_limit_allows | `Error` | 85.20 | test_deploy_vms_in_parallel.py
   ContextSuite context=TestLoadBalance>:setup | `Error` | 0.00 | test_loadbalance.py
   test_deployvm_firstfit | `Error` | 69.61 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userconcentrated | `Error` | 16.98 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdispersing | `Error` | 23.28 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdata | `Error` | 80.09 | test_deploy_vm_with_userdata.py
   test_deployvm_userdata_post | `Error` | 11.86 | test_deploy_vm_with_userdata.py
   test_delete_account | `Error` | 73.06 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 11.95 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 11.95 | test_network.py
   test_deploy_vm_l2network | `Error` | 8.84 | test_network.py
   test_deploy_vm_l2network | `Error` | 8.84 | test_network.py
   test_l2network_restart | `Error` | 8.90 | test_network.py
   test_l2network_restart | `Error` | 8.91 | test_network.py
   ContextSuite context=TestL2Networks>:teardown | `Error` | 10.05 | test_network.py
   ContextSuite context=TestPortForwarding>:setup | `Error` | 71.61 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 64.63 | test_network.py
   test_reboot_router | `Error` | 64.62 | test_network.py
   test_releaseIP | `Error` | 67.29 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 128.73 | test_network.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_list_vms_metrics_admin | `Error` | 22.99 | test_metrics_api.py
   test_list_vms_metrics_history | `Error` | 16.43 | test_metrics_api.py
   test_list_vms_metrics_user | `Error` | 68.66 | test_metrics_api.py
   test_list_volumes_metrics_history | `Error` | 16.24 | test_metrics_api.py
   test_03_deploy_vm_domain_service_offering | `Error` | 101.42 | test_domain_service_offerings.py
   test_03_deploy_and_scale_kubernetes_cluster | `Failure` | 48.89 | test_kubernetes_clusters.py
   test_08_upgrade_kubernetes_ha_cluster | `Failure` | 0.09 | test_kubernetes_clusters.py
   ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py
   test_nic_secondaryip_add_remove | `Error` | 72.00 | test_multipleips_per_nic.py
   test_nested_virtualization_vmware | `Error` | 81.11 | test_nested_virtualization.py
   test_network_acl | `Error` | 97.03 | test_network_acl.py
   test_01_verify_ipv6_network | `Error` | 65.19 | test_network_ipv6.py
   test_01_verify_ipv6_network | `Error` | 65.19 | test_network_ipv6.py
   test_01_non_strict_host_anti_affinity | `Failure` | 150.13 | test_nonstrict_affinity_group.py
   test_02_non_strict_host_affinity | `Error` | 105.64 | test_nonstrict_affinity_group.py
   ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
   test_01_create_delete_portforwarding_fornonvpc | `Error` | 67.99 | test_portforwardingrules.py
   test_02_vpc_privategw_static_routes | `Failure` | 130.75 | test_privategw_acl.py
   test_02_vpc_privategw_static_routes | `Error` | 130.76 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 135.06 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Error` | 135.07 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 261.16 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Error` | 261.17 | test_privategw_acl.py
   test_09_project_suspend | `Error` | 137.94 | test_projects.py
   test_10_project_activation | `Error` | 2.57 | test_projects.py
   test_deploy_vm_with_registered_userdata | `Error` | 6.31 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_allow | `Error` | 5.72 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_append | `Error` | 6.65 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_params | `Error` | 7.84 | test_register_userdata.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestRAMCPUResourceAccounting>:setup | `Error` | 0.00 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   test_01_scale_vm | `Error` | 1.37 | test_scale_vm.py
   test_02_scale_vm_negative_offering_disable_scaling | `Error` | 1.32 | test_scale_vm.py
   test_03_scale_vm_negative_vm_disable_scaling | `Error` | 1.29 | test_scale_vm.py
   test_04_scale_vm_with_user_account | `Error` | 8.53 | test_scale_vm.py
   test_05_scale_vm_dont_allow_disk_offering_change | `Error` | 1.38 | test_scale_vm.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   ContextSuite context=TestRouterIpTablesPolicies>:setup | `Error` | 0.00 | test_routers_iptables_default_policy.py
   ContextSuite context=TestVPCIpTablesPolicies>:setup | `Error` | 0.00 | test_routers_iptables_default_policy.py
   ContextSuite context=TestIsolatedNetworks>:setup | `Error` | 0.00 | test_routers_network_ops.py
   ContextSuite context=TestRedundantIsolateNetworks>:setup | `Error` | 0.00 | test_routers_network_ops.py
   test_01_sys_vm_start | `Failure` | 0.10 | test_secondary_storage.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 1517.95 | test_service_offerings.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 0.00 | test_snapshots.py
   test_01_list_sec_storage_vm | `Failure` | 0.05 | test_ssvm.py
   test_02_list_cpvm_vm | `Failure` | 0.04 | test_ssvm.py
   test_03_ssvm_internals | `Failure` | 0.04 | test_ssvm.py
   test_04_cpvm_internals | `Failure` | 0.04 | test_ssvm.py
   test_05_stop_ssvm | `Failure` | 0.04 | test_ssvm.py
   test_06_stop_cpvm | `Failure` | 0.05 | test_ssvm.py
   test_07_reboot_ssvm | `Failure` | 0.05 | test_ssvm.py
   test_08_reboot_cpvm | `Failure` | 0.05 | test_ssvm.py
   test_09_reboot_ssvm_forced | `Failure` | 0.05 | test_ssvm.py
   test_10_reboot_cpvm_forced | `Failure` | 0.05 | test_ssvm.py
   test_11_destroy_ssvm | `Failure` | 0.05 | test_ssvm.py
   test_12_destroy_cpvm | `Failure` | 0.05 | test_ssvm.py
   ContextSuite context=TestVMWareStoragePolicies>:setup | `Error` | 0.00 | test_storage_policy.py
   test_02_create_template_with_checksum_sha1 | `Error` | 65.67 | test_templates.py
   test_03_create_template_with_checksum_sha256 | `Error` | 65.69 | test_templates.py
   test_04_create_template_with_checksum_md5 | `Error` | 65.64 | test_templates.py
   test_05_create_template_with_no_checksum | `Error` | 65.67 | test_templates.py
   ContextSuite context=TestTemplates>:setup | `Error` | 7.38 | test_templates.py
   ContextSuite context=TestISOUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestLBRuleUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestNatRuleUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestPublicIPUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestSnapshotUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestVmUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestVolumeUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestVpnUsage>:setup | `Error` | 0.00 | test_usage.py
   test_01_scale_up_verify | `Failure` | 35.05 | test_vm_autoscaling.py
   test_02_update_vmprofile_and_vmgroup | `Failure` | 245.59 | test_vm_autoscaling.py
   test_03_scale_down_verify | `Failure` | 304.60 | test_vm_autoscaling.py
   test_04_stop_remove_vm_in_vmgroup | `Failure` | 0.03 | test_vm_autoscaling.py
   test_06_autoscaling_vmgroup_on_project_network | `Failure` | 46.53 | test_vm_autoscaling.py
   test_06_autoscaling_vmgroup_on_project_network | `Error` | 46.54 | test_vm_autoscaling.py
   test_07_autoscaling_vmgroup_on_vpc_network | `Error` | 1.20 | test_vm_autoscaling.py
   ContextSuite context=TestVmAutoScaling>:teardown | `Error` | 13.31 | test_vm_autoscaling.py
   test_01_deploy_vm_on_specific_host | `Error` | 0.09 | test_vm_deployment_planner.py
   test_02_deploy_vm_on_specific_cluster | `Error` | 1.41 | test_vm_deployment_planner.py
   test_03_deploy_vm_on_specific_pod | `Error` | 1.35 | test_vm_deployment_planner.py
   test_04_deploy_vm_on_host_override_pod_and_cluster | `Error` | 0.13 | test_vm_deployment_planner.py
   test_05_deploy_vm_on_cluster_override_pod | `Error` | 1.36 | test_vm_deployment_planner.py
   ContextSuite context=TestDeployVM>:setup | `Error` | 0.00 | test_vm_life_cycle.py
   ContextSuite context=TestVAppsVM>:setup | `Error` | 1519.41 | test_vm_life_cycle.py
   ContextSuite context=TestVMLifeCycle>:setup | `Error` | 1523.61 | test_vm_life_cycle.py
   test_01_unmanage_vm_cycle | `Error` | 0.38 | test_vm_lifecycle_unmanage_import.py
   ContextSuite context=TestUnmanageVM>:teardown | `Error` | 0.41 | test_vm_lifecycle_unmanage_import.py
   test_change_service_offering_for_vm_with_snapshots | `Error` | 1.42 | test_vm_snapshots.py
   ContextSuite context=TestVmSnapshot>:setup | `Error` | 10.82 | test_vm_snapshots.py
   ContextSuite context=TestCreateVolume>:setup | `Error` | 0.00 | test_volumes.py
   ContextSuite context=TestVolumes>:setup | `Error` | 1517.68 | test_volumes.py
   ContextSuite context=TestIpv6Vpc>:setup | `Error` | 0.00 | test_vpc_ipv6.py
   ContextSuite context=TestVPCRedundancy>:setup | `Error` | 0.00 | test_vpc_redundant.py
   ContextSuite context=TestVPCNics>:setup | `Error` | 0.00 | test_vpc_router_nics.py
   ContextSuite context=TestRVPCSite2SiteVpn>:setup | `Error` | 0.00 | test_vpc_vpn.py
   ContextSuite context=TestVPCSite2SiteVPNMultipleOptions>:setup | `Error` | 0.00 | test_vpc_vpn.py
   ContextSuite context=TestVpcRemoteAccessVpn>:setup | `Error` | 0.00 | test_vpc_vpn.py
   ContextSuite context=TestVpcSite2SiteVpn>:setup | `Error` | 0.00 | test_vpc_vpn.py
   test_01_cancel_host_maintenace_with_no_migration_jobs | `Error` | 0.07 | test_host_maintenance.py
   test_02_cancel_host_maintenace_with_migration_jobs | `Error` | 0.06 | test_host_maintenance.py
   test_03_cancel_host_maintenace_with_migration_jobs_failure | `Error` | 0.07 | test_host_maintenance.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


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

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

   clearly something wrong in vmware; investigating


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

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

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


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

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

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

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


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

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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
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-unsubscribe@cloudstack.apache.org

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


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

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

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


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

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

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


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

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

   @blueorangutan package


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

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

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


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

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

   <b>[SF] Trillian Build Failed (tid-9847)<b/>


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

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

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


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

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

   > [SF] Trillian test result (tid-9945) Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8 Total time taken: 64704 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t9945-vmware-67u3.zip Smoke tests completed. 62 look OK, 19 have errors, 0 did not run Only failed and skipped tests results shown below:
   
   oddly some of these test files are not in the smoke test directory
   
   - test_deploy_vm.py
   - test_escalations_templates.py
   - test_host_annotations.py
   - test_vm_ha
   - test_vm_sync
   
   and some should work
   
   - [ ] test_affinity_groups_projects.py
   - [ ] test_deploy_vm_root_resize.py
   - [ ] test_global_settings.py
   - [ ] test_host_maintenance.py
   - [ ] test_network.py
   - [ ] test_outofbandmanagement.py
   - [ ] test_privategw_acl.py
   - [ ] test_projects.py
   - [ ] test_public_ip_range.py
   - [ ] test_pvlan.py
   - [ ] test_routers_network_ops.py
   - [ ] test_templates.py
   - [ ] test_vm_life_cycle.py (seen to fail on main lately)
   - [ ] test_vpc_redundant.py
   
   suspicion ; broken tests broke the env for the rest, doing a manual round on these.


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

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

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


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

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

   <b>[SF] Trillian test result (tid-9945)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 64704 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t9945-vmware-67u3.zip
   Smoke tests completed. 62 look OK, 19 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_deploy_vm_start_failure | `Error` | 108.28 | test_deploy_vm.py
   test_deploy_vm_volume_creation_failure | `Error` | 99.98 | test_deploy_vm.py
   test01_template_download_URL_expire | `Error` | 15026.64 | test_escalations_templates.py
   test_vm_ha | `Error` | 99.71 | test_vm_ha.py
   test_vm_sync | `Error` | 179.54 | test_vm_sync.py
   ContextSuite context=TestDeployVmWithAffinityGroup>:teardown | `Error` | 147.65 | test_affinity_groups_projects.py
   runTest | `Error` | 0.00 | test_network.py
   test_02_deploy_vm_root_resize | `Failure` | 0.14 | test_deploy_vm_root_resize.py
   test_02_vpc_privategw_static_routes | `Failure` | 232.05 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 213.33 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 370.87 | test_privategw_acl.py
   test_UpdateConfigParamWithScope | `Error` | 0.79 | test_global_settings.py
   test_07_project_resources_account_delete | `Error` | 5.60 | test_projects.py
   test_08_cleanup_after_project_delete | `Error` | 7.74 | test_projects.py
   ContextSuite context=TestProjectResources>:teardown | `Error` | 9.96 | test_projects.py
   ContextSuite context=TestProjectSuspendActivate>:teardown | `Error` | 97.50 | test_projects.py
   test_03_user_role_dont_see_annotations | `Failure` | 3.00 | test_host_annotations.py
   test_dedicatePublicIpRange | `Error` | 0.04 | test_public_ip_range.py
   test_create_pvlan_network | `Error` | 0.06 | test_pvlan.py
   test_oobm_background_powerstate_sync | `Failure` | 20.82 | test_outofbandmanagement.py
   test_oobm_enabledisable_across_clusterzones | `Error` | 33.18 | test_outofbandmanagement.py
   test_oobm_issue_power_cycle | `Error` | 18.81 | test_outofbandmanagement.py
   test_oobm_issue_power_off | `Error` | 19.80 | test_outofbandmanagement.py
   test_oobm_issue_power_on | `Error` | 19.80 | test_outofbandmanagement.py
   test_oobm_issue_power_reset | `Error` | 18.79 | test_outofbandmanagement.py
   test_oobm_issue_power_soft | `Error` | 18.83 | test_outofbandmanagement.py
   test_oobm_issue_power_status | `Error` | 18.78 | test_outofbandmanagement.py
   test_oobm_multiple_mgmt_server_ownership | `Failure` | 27.93 | test_outofbandmanagement.py
   test_oobm_zchange_password | `Error` | 7.42 | test_outofbandmanagement.py
   test_03_RVR_Network_check_router_state | `Failure` | 149.85 | test_routers_network_ops.py
   test_02_create_template_with_checksum_sha1 | `Error` | 5.24 | test_templates.py
   test_03_create_template_with_checksum_sha256 | `Error` | 5.19 | test_templates.py
   test_04_create_template_with_checksum_md5 | `Error` | 5.24 | test_templates.py
   test_01_migrate_VM_and_root_volume | `Error` | 95.69 | test_vm_life_cycle.py
   test_02_migrate_VM_with_two_data_disks | `Error` | 62.93 | test_vm_life_cycle.py
   test_03_migrate_detached_volume | `Error` | 61.72 | test_vm_life_cycle.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 351.37 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Failure` | 332.59 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 215.55 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 171.50 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 301.70 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 337.39 | test_vpc_redundant.py
   test_02_cancel_host_maintenace_with_migration_jobs | `Failure` | 208.79 | test_host_maintenance.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


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

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

   @blueorangutan package


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

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

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


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

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

   <b>[SF] Trillian test result (tid-10178)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 131957 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t10178-vmware-67u3.zip
   Smoke tests completed. 44 look OK, 37 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_deploy_vm_start_failure | `Error` | 94.99 | test_deploy_vm.py
   test_deploy_vm_volume_creation_failure | `Error` | 101.47 | test_deploy_vm.py
   test01_template_download_URL_expire | `Error` | 16034.31 | test_escalations_templates.py
   test_vm_ha | `Error` | 1085.18 | test_vm_ha.py
   test_vm_sync | `Error` | 1187.54 | test_vm_sync.py
   ContextSuite context=TestDeployVmWithAffinityGroup>:teardown | `Error` | 1151.84 | test_affinity_groups_projects.py
   runTest | `Error` | 0.00 | test_network.py
   test_02_deploy_vm_root_resize | `Failure` | 0.26 | test_deploy_vm_root_resize.py
   test_02_vpc_privategw_static_routes | `Failure` | 217.07 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 1216.69 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 2338.51 | test_privategw_acl.py
   test_UpdateConfigParamWithScope | `Error` | 0.83 | test_global_settings.py
   test_07_project_resources_account_delete | `Error` | 5.80 | test_projects.py
   test_08_cleanup_after_project_delete | `Error` | 8.32 | test_projects.py
   ContextSuite context=TestProjectResources>:teardown | `Error` | 10.54 | test_projects.py
   ContextSuite context=TestProjectSuspendActivate>:teardown | `Error` | 101.94 | test_projects.py
   test_03_user_role_dont_see_annotations | `Failure` | 3.04 | test_host_annotations.py
   test_dedicatePublicIpRange | `Error` | 0.04 | test_public_ip_range.py
   test_create_pvlan_network | `Error` | 0.05 | test_pvlan.py
   test_oobm_background_powerstate_sync | `Failure` | 20.94 | test_outofbandmanagement.py
   test_oobm_enabledisable_across_clusterzones | `Error` | 33.46 | test_outofbandmanagement.py
   test_oobm_issue_power_cycle | `Error` | 20.00 | test_outofbandmanagement.py
   test_oobm_issue_power_off | `Error` | 19.95 | test_outofbandmanagement.py
   test_oobm_issue_power_on | `Error` | 18.89 | test_outofbandmanagement.py
   test_oobm_issue_power_reset | `Error` | 18.90 | test_outofbandmanagement.py
   test_oobm_issue_power_soft | `Error` | 20.00 | test_outofbandmanagement.py
   test_oobm_issue_power_status | `Error` | 19.99 | test_outofbandmanagement.py
   test_oobm_multiple_mgmt_server_ownership | `Failure` | 28.11 | test_outofbandmanagement.py
   test_oobm_zchange_password | `Error` | 6.43 | test_outofbandmanagement.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   ContextSuite context=TestRAMCPUResourceAccounting>:setup | `Error` | 0.00 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   ContextSuite context=TestRouterIpTablesPolicies>:setup | `Error` | 0.00 | test_routers_iptables_default_policy.py
   ContextSuite context=TestVPCIpTablesPolicies>:setup | `Error` | 0.00 | test_routers_iptables_default_policy.py
   ContextSuite context=TestIsolatedNetworks>:setup | `Error` | 0.00 | test_routers_network_ops.py
   ContextSuite context=TestRedundantIsolateNetworks>:setup | `Error` | 0.00 | test_routers_network_ops.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestScaleVm>:setup | `Error` | 0.00 | test_scale_vm.py
   test_01_sys_vm_start | `Failure` | 0.15 | test_secondary_storage.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 1518.99 | test_service_offerings.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   test_01_list_sec_storage_vm | `Failure` | 0.06 | test_ssvm.py
   test_02_list_cpvm_vm | `Failure` | 0.07 | test_ssvm.py
   test_03_ssvm_internals | `Failure` | 0.06 | test_ssvm.py
   test_04_cpvm_internals | `Failure` | 0.07 | test_ssvm.py
   test_05_stop_ssvm | `Failure` | 0.08 | test_ssvm.py
   test_06_stop_cpvm | `Failure` | 0.07 | test_ssvm.py
   test_07_reboot_ssvm | `Failure` | 0.06 | test_ssvm.py
   test_08_reboot_cpvm | `Failure` | 0.06 | test_ssvm.py
   test_09_destroy_ssvm | `Failure` | 0.05 | test_ssvm.py
   test_10_destroy_cpvm | `Failure` | 0.08 | test_ssvm.py
   test_02_create_template_with_checksum_sha1 | `Error` | 65.66 | test_templates.py
   test_03_create_template_with_checksum_sha256 | `Error` | 65.75 | test_templates.py
   test_04_create_template_with_checksum_md5 | `Error` | 65.73 | test_templates.py
   test_05_create_template_with_no_checksum | `Error` | 65.75 | test_templates.py
   ContextSuite context=TestTemplates>:setup | `Error` | 9.01 | test_templates.py
   ContextSuite context=TestISOUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestLBRuleUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestNatRuleUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestPublicIPUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestSnapshotUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestVmUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestVolumeUsage>:setup | `Error` | 0.00 | test_usage.py
   ContextSuite context=TestVpnUsage>:setup | `Error` | 0.00 | test_usage.py
   test_01_deploy_vm_on_specific_host | `Error` | 1.53 | test_vm_deployment_planner.py
   test_02_deploy_vm_on_specific_cluster | `Error` | 1.55 | test_vm_deployment_planner.py
   test_03_deploy_vm_on_specific_pod | `Error` | 1.43 | test_vm_deployment_planner.py
   test_04_deploy_vm_on_host_override_pod_and_cluster | `Error` | 1.39 | test_vm_deployment_planner.py
   test_05_deploy_vm_on_cluster_override_pod | `Error` | 1.37 | test_vm_deployment_planner.py
   ContextSuite context=TestDeployVM>:setup | `Error` | 0.00 | test_vm_life_cycle.py
   test_01_migrate_VM_and_root_volume | `Error` | 1.41 | test_vm_life_cycle.py
   test_02_migrate_VM_with_two_data_disks | `Error` | 1.34 | test_vm_life_cycle.py
   test_03_migrate_detached_volume | `Error` | 1.31 | test_vm_life_cycle.py
   ContextSuite context=TestVMLifeCycle>:setup | `Error` | 4.71 | test_vm_life_cycle.py
   test_change_service_offering_for_vm_with_snapshots | `Error` | 1.48 | test_vm_snapshots.py
   ContextSuite context=TestVmSnapshot>:setup | `Error` | 11.24 | test_vm_snapshots.py
   ContextSuite context=TestCreateVolume>:setup | `Error` | 0.00 | test_volumes.py
   ContextSuite context=TestVolumes>:setup | `Error` | 0.00 | test_volumes.py
   ContextSuite context=TestVPCRedundancy>:setup | `Error` | 0.00 | test_vpc_redundant.py
   ContextSuite context=TestVPCNics>:setup | `Error` | 0.00 | test_vpc_router_nics.py
   ContextSuite context=TestRVPCSite2SiteVpn>:setup | `Error` | 0.00 | test_vpc_vpn.py
   ContextSuite context=TestVPCSite2SiteVPNMultipleOptions>:setup | `Error` | 0.00 | test_vpc_vpn.py
   ContextSuite context=TestVpcRemoteAccessVpn>:setup | `Error` | 0.00 | test_vpc_vpn.py
   ContextSuite context=TestVpcSite2SiteVpn>:setup | `Error` | 0.00 | test_vpc_vpn.py
   test_02_cancel_host_maintenace_with_migration_jobs | `Error` | 1.76 | test_host_maintenance.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


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

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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1568777802


##########
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:
   @suresh, this tactic fails as some `TemplateObject`s are created from spring contexts. I think the null check needs to go back into the `getImage()` method.



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

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

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


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

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

   <b>[SF] Trillian Build Failed (tid-9881)<b/>


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

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

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


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

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

   @blueorangutan package


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

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

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


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

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

   <b>[SF] Trillian test result (tid-9783)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 46353 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t9783-vmware-67u3.zip
   Smoke tests completed. 110 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


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

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

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


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

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

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

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


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

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

   <b>[SF] Trillian Build Failed (tid-9851)<b/>


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

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

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


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

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

   <b>[SF] Trillian Build Failed (tid-9852)<b/>


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

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

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


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

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

   <b>[SF] Trillian Build Failed (tid-9874)<b/>


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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1568782998


##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##########
@@ -373,10 +380,7 @@ public String getInstallPath() {
 
     @Override
     public boolean isDirectDownload() {
-        if (this.imageVO == null) {
-            return false;
-        }
-        return this.imageVO.isDirectDownload();
+        return getImage().isDirectDownload();

Review Comment:
   ```suggestion
           try {
               return getImage().isDirectDownload();
           } catch (InvalidParameterValueException e) {
               return false;
           }
   ```



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

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

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


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

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

   <b>[SF] Trillian test result (tid-9892)</b>
   Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 41484 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t9892-xenserver-71.zip
   Smoke tests completed. 110 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


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

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

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


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

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8898:
URL: https://github.com/apache/cloudstack/pull/8898#discussion_r1584435735


##########
engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java:
##########
@@ -81,6 +81,11 @@ public TemplateObject() {
     }
 
     protected void configure(VMTemplateVO template, DataStore dataStore) {
+        if (template == null) {
+            String msg = String.format("Template Object is not properly initialised %s", this.toString());
+            s_logger.error(msg);
+            throw new InvalidParameterValueException(msg);

Review Comment:
   don't throw (yet)
   ```suggestion
   ```



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

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

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


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

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

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


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

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

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


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

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

   <b>[SF] Trillian test result (tid-10129)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 43133 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8898-t10129-vmware-67u3.zip
   Smoke tests completed. 71 look OK, 39 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 99.81 | test_accounts.py
   test_DeleteDomain | `Error` | 102.15 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 99.98 | test_accounts.py
   test_01_user_remove_VM_running | `Error` | 58.46 | test_accounts.py
   test_DeployVmAntiAffinityGroup_in_project | `Error` | 80.14 | test_affinity_groups_projects.py
   ContextSuite context=TestAnnotations>:setup | `Error` | 0.00 | test_annotations.py
   test_query_async_job_result | `Error` | 113.54 | test_async_job.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 76.75 | test_internal_lb.py
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 76.76 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 146.47 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 146.47 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 71.94 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 71.94 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 139.15 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 139.16 | test_internal_lb.py
   test_deploy_more_vms_than_limit_allows | `Error` | 86.07 | test_deploy_vms_in_parallel.py
   ContextSuite context=TestLoadBalance>:setup | `Error` | 0.00 | test_loadbalance.py
   test_deployvm_firstfit | `Error` | 65.79 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userconcentrated | `Error` | 13.90 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdispersing | `Error` | 14.01 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdata | `Error` | 67.75 | test_deploy_vm_with_userdata.py
   test_deployvm_userdata_post | `Error` | 20.57 | test_deploy_vm_with_userdata.py
   test_delete_account | `Error` | 75.94 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 8.94 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 8.95 | test_network.py
   test_deploy_vm_l2network | `Error` | 9.90 | test_network.py
   test_deploy_vm_l2network | `Error` | 9.90 | test_network.py
   test_l2network_restart | `Error` | 9.27 | test_network.py
   test_l2network_restart | `Error` | 9.28 | test_network.py
   ContextSuite context=TestL2Networks>:teardown | `Error` | 10.39 | test_network.py
   ContextSuite context=TestPortForwarding>:setup | `Error` | 74.92 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 63.59 | test_network.py
   test_reboot_router | `Error` | 68.76 | test_network.py
   test_releaseIP | `Error` | 65.25 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 129.95 | test_network.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_list_vms_metrics_admin | `Error` | 23.13 | test_metrics_api.py
   test_list_vms_metrics_history | `Error` | 17.64 | test_metrics_api.py
   test_list_vms_metrics_user | `Error` | 66.77 | test_metrics_api.py
   test_list_volumes_metrics_history | `Error` | 21.49 | test_metrics_api.py
   test_03_deploy_vm_domain_service_offering | `Error` | 193.24 | test_domain_service_offerings.py
   ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py
   test_nic_secondaryip_add_remove | `Error` | 74.47 | test_multipleips_per_nic.py
   test_nested_virtualization_vmware | `Error` | 83.64 | test_nested_virtualization.py
   test_network_acl | `Error` | 96.78 | test_network_acl.py
   test_01_verify_ipv6_network | `Error` | 71.91 | test_network_ipv6.py
   test_01_verify_ipv6_network | `Error` | 71.91 | test_network_ipv6.py
   ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
   test_01_create_delete_portforwarding_fornonvpc | `Error` | 69.02 | test_portforwardingrules.py
   test_02_vpc_privategw_static_routes | `Failure` | 124.61 | test_privategw_acl.py
   test_02_vpc_privategw_static_routes | `Error` | 124.62 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 129.36 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Error` | 129.37 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 237.08 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Error` | 237.09 | test_privategw_acl.py
   test_09_project_suspend | `Error` | 63.72 | test_projects.py
   test_10_project_activation | `Error` | 18.06 | test_projects.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   test_01_so_removal_resource_update | `Error` | 64.05 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   test_02_routervm_iptables_policies | `Error` | 66.65 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 97.58 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 97.58 | test_routers_iptables_default_policy.py
   test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 59.91 | test_routers_network_ops.py
   test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 58.69 | test_routers_network_ops.py
   test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 133.11 | test_routers_network_ops.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Error` | 141.69 | test_routers_network_ops.py
   test_03_RVR_Network_check_router_state | `Error` | 131.95 | test_routers_network_ops.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 71.36 | test_service_offerings.py
   test_01_import_storage_policies | `Error` | 19.22 | test_storage_policy.py
   ContextSuite context=TestVMWareStoragePolicies>:teardown | `Error` | 19.26 | test_storage_policy.py
   test_01_vapps_vm_cycle | `Error` | 0.96 | test_vm_life_cycle.py
   ContextSuite context=TestVolumes>:setup | `Error` | 77.46 | test_volumes.py
   test_01_verify_ipv6_vpc | `Error` | 84.25 | test_vpc_ipv6.py
   test_01_verify_ipv6_vpc | `Error` | 84.25 | test_vpc_ipv6.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 167.61 | test_vpc_redundant.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 167.63 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Failure` | 166.01 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Error` | 166.02 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 165.53 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Error` | 165.54 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 164.37 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Error` | 164.38 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 163.95 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 163.96 | test_vpc_redundant.py
   test_01_VPC_nics_after_destroy | `Failure` | 100.83 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Failure` | 110.55 | test_vpc_router_nics.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 264.33 | test_vpc_vpn.py
   test_01_redundant_vpc_site2site_vpn | `Error` | 264.35 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 136.74 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Error` | 136.76 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 77.36 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Error` | 77.37 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 141.91 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Error` | 141.92 | 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-unsubscribe@cloudstack.apache.org

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


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

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

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


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