cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

server: fix fail to list public ips of shared networks sometimes

Open weizhouapache opened this issue 1 year ago • 55 comments
trafficstars

Description

This PR fixes #8622

error

2024-02-07 10:59:11,110 ERROR [c.c.a.ApiServer] (qtp1146825051-20:ctx-74413901 ctx-b91ecc51) (logid:aa41ab63) unhandled exception executing api command: [Ljava.lang.String;@5a46b058
java.lang.NullPointerException
    at com.cloud.vm.NicVO.getInstanceId(NicVO.java:256)
    at com.cloud.api.ApiResponseHelper.addSystemVmInfoToIpResponse(ApiResponseHelper.java:995)
    at com.cloud.api.ApiResponseHelper.showVmInfoForSharedNetworks(ApiResponseHelper.java:1175)
    at com.cloud.api.ApiResponseHelper.createIPAddressResponse(ApiResponseHelper.java:1088)
    at org.apache.cloudstack.api.command.user.address.ListPublicIpAddressesCmd.execute(ListPublicIpAddressesCmd.java:196)

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
  • [ ] build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [ ] Minor

Bug Severity

  • [ ] BLOCKER
  • [x] Critical
  • [ ] Major
  • [ ] Minor
  • [ ] Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

weizhouapache avatar Feb 07 '24 13:02 weizhouapache

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (0d36098) 30.75% compared to head (9855c1c) 30.95%. Report is 11 commits behind head on 4.19.

Files Patch % Lines
...src/main/java/com/cloud/api/ApiResponseHelper.java 0.00% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19    #8624      +/-   ##
============================================
+ Coverage     30.75%   30.95%   +0.20%     
- Complexity    33964    34220     +256     
============================================
  Files          5346     5346              
  Lines        375435   375447      +12     
  Branches      54603    54606       +3     
============================================
+ Hits         115460   116218     +758     
+ Misses       244742   243914     -828     
- Partials      15233    15315      +82     
Flag Coverage Δ
simulator-marvin-tests 24.85% <0.00%> (+0.33%) :arrow_up:
uitests 4.39% <ø> (ø)
unit-tests 16.54% <0.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 07 '24 13:02 codecov[bot]

@blueorangutan package

DaanHoogland avatar Feb 09 '24 14:02 DaanHoogland

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

blueorangutan avatar Feb 09 '24 14:02 blueorangutan

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

blueorangutan avatar Feb 09 '24 15:02 blueorangutan

@blueorangutan package

weizhouapache avatar Feb 09 '24 17:02 weizhouapache

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

blueorangutan avatar Feb 09 '24 17:02 blueorangutan

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

blueorangutan avatar Feb 09 '24 18:02 blueorangutan

@blueorangutan package

weizhouapache avatar Feb 12 '24 13:02 weizhouapache

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

blueorangutan avatar Feb 12 '24 13:02 blueorangutan

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

blueorangutan avatar Feb 12 '24 14:02 blueorangutan

@blueorangutan package

weizhouapache avatar Feb 12 '24 14:02 weizhouapache

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

blueorangutan avatar Feb 12 '24 15:02 blueorangutan

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

blueorangutan avatar Feb 12 '24 16:02 blueorangutan

@blueorangutan test

rohityadavcloud avatar Feb 13 '24 05:02 rohityadavcloud

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

blueorangutan avatar Feb 13 '24 05:02 blueorangutan

[SF] Trillian test result (tid-9185) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 43343 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8624-t9185-kvm-centos7.zip Smoke tests completed. 126 look OK, 3 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_network_operations_on_created_vm_of_otheruser Failure 120.38 test_network_permissions.py
test_03_network_operations_on_created_vm_of_otheruser Error 120.39 test_network_permissions.py
ContextSuite context=TestNetworkPermissions>:teardown Error 1.34 test_network_permissions.py
test_01_nic Error 200.61 test_nic.py
test_02_trigger_shutdown Failure 336.78 test_safe_shutdown.py

blueorangutan avatar Feb 13 '24 18:02 blueorangutan

@blueorangutan test

rohityadavcloud avatar Mar 08 '24 08:03 rohityadavcloud

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

blueorangutan avatar Mar 08 '24 08:03 blueorangutan

[SF] Trillian test result (tid-9429) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 53035 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8624-t9429-kvm-centos7.zip Smoke tests completed. 126 look OK, 3 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_network_operations_on_created_vm_of_otheruser Failure 125.36 test_network_permissions.py
test_03_network_operations_on_created_vm_of_otheruser Error 125.37 test_network_permissions.py
ContextSuite context=TestNetworkPermissions>:teardown Error 1.40 test_network_permissions.py
test_01_nic Error 203.30 test_nic.py
test_02_trigger_shutdown Failure 336.87 test_safe_shutdown.py

blueorangutan avatar Mar 08 '24 23:03 blueorangutan

@blueorangutan package

weizhouapache avatar Mar 15 '24 14:03 weizhouapache

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

blueorangutan avatar Mar 15 '24 14:03 blueorangutan

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

blueorangutan avatar Mar 15 '24 15:03 blueorangutan

@blueorangutan package

weizhouapache avatar Mar 28 '24 07:03 weizhouapache

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

blueorangutan avatar Mar 28 '24 07:03 blueorangutan

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

blueorangutan avatar Mar 28 '24 08:03 blueorangutan

@blueorangutan test

weizhouapache avatar Mar 28 '24 09:03 weizhouapache

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

blueorangutan avatar Mar 28 '24 09:03 blueorangutan

[SF] Trillian test result (tid-9612) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 49629 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8624-t9612-kvm-centos7.zip Smoke tests completed. 126 look OK, 3 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_network_operations_on_created_vm_of_otheruser Failure 129.60 test_network_permissions.py
test_03_network_operations_on_created_vm_of_otheruser Error 129.61 test_network_permissions.py
ContextSuite context=TestNetworkPermissions>:teardown Error 1.38 test_network_permissions.py
test_01_nic Error 205.41 test_nic.py
test_02_trigger_shutdown Failure 341.80 test_safe_shutdown.py

blueorangutan avatar Mar 28 '24 23:03 blueorangutan

@blueorangutan package

weizhouapache avatar Apr 10 '24 06:04 weizhouapache

LGTM, tested manually, the ips are listed

Screenshot 2024-04-10 at 11 29 16 AM

thanks for the testing @kiranchavala

let me rebuild the packages the kick a trillian test

weizhouapache avatar Apr 10 '24 06:04 weizhouapache