FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix null pointer exception in restore VM by vishesh92 · Pull Request #8930 · apache/cloudstack · GitHub

Repository navigation

Fix null pointer exception in restore VM - #8930

Merged
weizhouapache merged 1 commit into
apache:4.19from
shapeblue:fix-npe-restore-vm
Apr 22, 2024
Merged

weizhouapache merged 1 commit into
apache:4.19from
shapeblue:fix-npe-restore-vm

Conversation

vishesh92 commented Apr 17, 2024 •
edited by weizhouapache
Loading

Copy link
Copy Markdown
Member

Description

This PR fixes null pointer exception in restore VM.

2024-04-16T17:32:47,596 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-50:[ctx-969d6ccf, job-1648]) (logid:4eaa9a49) Unexpected exception while executing org.apache.cloudstack.api.command.user.vm.RestoreVMCmd java.lang.NullPointerE
xception
        at com.cloud.vm.UserVmManagerImpl.restoreVM(UserVmManagerImpl.java:7855)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
        at com.sun.proxy.$Proxy203.restoreVM(Unknown Source)
        at org.apache.cloudstack.api.command.user.vm.RestoreVMCmd.execute(RestoreVMCmd.java:101)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:173)
        at com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:110)
        at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:652)
        at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
        at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
        at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:600)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Types of changes

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

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

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

Copy link
Copy Markdown
Member Author

@blueorangutan package

Copy link
Copy Markdown

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

yadvr added this to the 4.19.1.0 milestone Apr 17, 2024

Copy link
Copy Markdown
Member Author

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el7 ✔️ debian. SL-JID 9288

DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

clgtm

Copy link
Copy Markdown
Contributor

@blueorangutan package

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member Author

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-9882)

Copy link
Copy Markdown
Member Author

@blueorangutan test

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

code lgtm

Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_01_events_resource Error 411.74 test_events_resource.py
test_02_trigger_shutdown Failure 346.70 test_safe_shutdown.py

yadvr marked this pull request as ready for review April 18, 2024 04:20
vishesh92 force-pushed the fix-npe-restore-vm branch from 27bf825 to 8109d69 Compare April 18, 2024 05:33

Copy link
Copy Markdown
Member Author

@blueorangutan package

Copy link
Copy Markdown

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

codecov-commenter commented Apr 18, 2024 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 17.36%. Comparing base (c25264b) to head (8109d69).
Report is 23 commits behind head on 4.19.

Files Patch % Lines
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 0.00% 7 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               4.19    #8930       +/-   ##
=============================================
- Coverage     30.98%   17.36%   -13.62%     
+ Complexity    34408    15865    -18543     
=============================================
  Files          5359     4863      -496     
  Lines        377017   326037    -50980     
  Branches      54856    45841     -9015     
=============================================
- Hits         116804    56626    -60178     
- Misses       244852   261162    +16310     
+ Partials      15361     8249     -7112     
Flag Coverage Δ
simulator-marvin-tests 17.36% <0.00%> (-7.45%) ⬇️
uitests ?
unit-tests ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member

@blueorangutan test rocky8 kvm-rocky8

Copy link
Copy Markdown

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

sureshanaparti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

clgtm

Copy link
Copy Markdown

[SF] Trillian test result (tid-9896)
Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
Total time taken: 45772 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8930-t9896-kvm-rocky8.zip
Smoke tests completed. 128 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_events_resource Error 416.84 test_events_resource.py

Copy link
Copy Markdown
Member

This is a regression issue of #8800

step to reproduce the issue:

  • restore vm
  • prior to this PR: got NPE exception
  • with this PR: it works

weizhouapache merged commit c081f60 into apache:4.19 Apr 22, 2024
DaanHoogland deleted the fix-npe-restore-vm branch April 23, 2024 06:23

borisstoyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, I could not see the error any more.

dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request May 3, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL