-
Notifications
You must be signed in to change notification settings - Fork 1.3k
server: throw exception when update vm nic on L2 network #4625
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
server: throw exception when update vm nic on L2 network #4625
Conversation
without this change
```
root@mgt01:~# cmk update vmnicip nicid=afab73cb-f4f4-490f-a524-365edef432b7
{
"accountid": "a27bffc1-48ee-11eb-8680-069fc4003392",
"cmd": "org.apache.cloudstack.api.command.user.vm.UpdateVmNicIpCmd",
"completed": "2020-12-28T12:55:27+0000",
"created": "2020-12-28T12:55:27+0000",
"jobid": "88af30e0-214b-4379-9c39-49648f998ff6",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 530,
"errortext": "Failed to update ip address on vm NIC. Refer to server logs for details."
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "a27f45f5-48ee-11eb-8680-069fc4003392"
}
🙈 Error: async API failed for job 88af30e0-214b-4379-9c39-49648f998ff6
```
with this change
```
root@mgt01:~# cmk update vmnicip nicid=22d79189-6754-4dfe-a8c4-0ba21be2ada5
{
"accountid": "044bb5a9-32fd-11eb-b251-06b6e80033a6",
"cmd": "org.apache.cloudstack.api.command.user.vm.UpdateVmNicIpCmd",
"completed": "2020-12-28T12:55:15+0000",
"created": "2020-12-28T12:55:15+0000",
"jobid": "f4ccb545-0e47-4e9c-b562-b0e6cf52ddd7",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 431,
"errortext": "UpdateVmNicIpCmd is not supported in L2 network"
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "044cc6e3-32fd-11eb-b251-06b6e80033a6"
}
🙈 Error: async API failed for job f4ccb545-0e47-4e9c-b562-b0e6cf52ddd7
```
|
@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-2604 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Pearl1594
left a comment
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.
LGTM
|
Trillian test result (tid-3442)
|
| } else { | ||
| s_logger.error("UpdateVmNicIpCmd is not supported in this network..."); | ||
| return null; | ||
| throw new InvalidParameterValueException("UpdateVmNicIpCmd is not supported in L2 network"); |
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.
I'd say it is cleaner to move this to line 1545 as
| throw new InvalidParameterValueException("UpdateVmNicIpCmd is not supported in L2 network"); | |
| if(! Network.GuestType.Isolated.equals(network.getGuestType()) { | |
| throw new InvalidParameterValueException("UpdateVmNicIpCmd is only supported in GUEST networks"); | |
| } |
#nitpicking
shwstppr
left a comment
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.
LGTM
* 4.14: server: select root disk based on user input during vm import (#4591) kvm: Use Q35 chipset for UEFI x86_64 (#4576) server: fix wrong error message when create isolated network without SourceNat (#4624) server: add possibility to scale vm to current customer offerings (#4622) server: keep networks order and ips while move a vm with multiple networks (#4602) server: throw exception when update vm nic on L2 network (#4625) doc: fix typo in install notes (#4633)
* 4.15: server: select root disk based on user input during vm import (#4591) kvm: Use Q35 chipset for UEFI x86_64 (#4576) server: fix wrong error message when create isolated network without SourceNat (#4624) server: add possibility to scale vm to current customer offerings (#4622) server: keep networks order and ips while move a vm with multiple networks (#4602) server: throw exception when update vm nic on L2 network (#4625) doc: fix typo in install notes (#4633)
Description
This PR throws an exception when update vm nic ip on L2 network. The error text is not clear now.
without this change
with this change
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?