New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid Null pointer at DomainChecker and enhance AssignVMCmd #4279
Conversation
…nd not valid projectID
a3973be
to
cc8068c
Compare
cc8068c
to
f74dbdb
Compare
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java
Outdated
Show resolved
Hide resolved
29a65eb
to
0ca3546
Compare
@blueorangutan package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
@blueorangutan package |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-1817 |
@blueorangutan package |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-1819 |
@blueorangutan package |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-1836 |
@blueorangutan test |
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Test manually rekicked |
LGTM merging this based on Travis tests pass. |
Description
When executing request assignVirtualMachine with null
domainID
and a validprojectID
then aNullPointerException
happens at DomainChecker.java.Command example:
The
NullPointerException
that is thrown atDomainChecker
is handled at AssignVMCmd.java#L142, resulting in the following log message:Failed to move vm null
.My question is: does it make sense to assign VM to a project with
domainID=null
? If so, then the handling should be different. However, I think that it should not benull
and therefore I added a proper log message.Prior to commit
Types of changes
How Has This Been Tested?
Request of API command assignVirtualMachine with project ID and
null
domainID.