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
Do not send conserve mode param on L2 network offering creation from the UI #2694
Conversation
@blueorangutan package |
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2092 |
@blueorangutan test |
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
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, subject to testing of UI. Since this is only UI change integration tests are not needed but manual testing of UI is.
Trillian test result (tid-2726)
|
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.
as said by @rhtyd manual testing needed
@nvazquez can you add screenshots to show that it works? |
Sure @DaanHoogland, I've added them to the PR description. |
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.
although UI behaves as expected, when i tried to deploy a vm i received the following error:
2018-06-06 15:26:09,571 DEBUG [o.a.c.e.o.NetworkOrchestrator] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Asking ConfigDrive to prepare for Nic[8-4-75b5c7da-e02e-4448-82fd-9cd1d42321cc-null]
2018-06-06 15:26:09,589 DEBUG [c.c.n.e.ConfigDriveNetworkElement] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Creating config drive ISO for vm: i-2-4-VM
2018-06-06 15:26:09,590 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) [createConfigDriveIsoForVM] dataType=metadata, filename=service-offering, content=Small Instance
2018-06-06 15:26:09,591 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) [createConfigDriveIsoForVM] dataType=metadata, filename=availability-zone, content=pr2694-t2737-kvm-centos7
2018-06-06 15:26:09,591 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) [createConfigDriveIsoForVM] dataType=metadata, filename=local-hostname, content=configD
2018-06-06 15:26:09,591 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) [createConfigDriveIsoForVM] dataType=metadata, filename=local-ipv4, content=null
2018-06-06 15:26:09,591 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) [createConfigDriveIsoForVM] dataType=metadata, filename=public-ipv4, content=null
2018-06-06 15:26:09,591 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) [createConfigDriveIsoForVM] dataType=metadata, filename=public-hostname, content=null
2018-06-06 15:26:09,591 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) [createConfigDriveIsoForVM] dataType=metadata, filename=instance-id, content=4dfbda92-2711-41b7-ab5d-e65129d6402a
2018-06-06 15:26:09,591 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) [createConfigDriveIsoForVM] dataType=metadata, filename=vm-id, content=4dfbda92-2711-41b7-ab5d-e65129d6402a
2018-06-06 15:26:09,592 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) [createConfigDriveIsoForVM] dataType=metadata, filename=public-keys, content=null
2018-06-06 15:26:09,598 DEBUG [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Cleaning up resources for the vm VM[User|i-2-4-VM] in Starting state
2018-06-06 15:26:09,603 DEBUG [c.c.a.t.Request] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Seq 1-4068157838399111329: Sending { Cmd , MgmtId: 7251750357085, via: 1(pr2694-t2737-kvm-centos7-kvm1), Ver: v1, Flags: 100011, [{"com.cloud.agent.api.StopCommand":{"isProxy":false,"checkBeforeCleanup":false,"forceStop":false,"volumesToDisconnect":[],"vmName":"i-2-4-VM","executeInSequence":false,"wait":0}}] }
2018-06-06 15:26:09,772 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-c03c62fb) (logid:895cbe14) Found 0 routers to update status.
2018-06-06 15:26:09,773 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-c03c62fb) (logid:895cbe14) Found 0 VPC networks to update Redundant State.
2018-06-06 15:26:09,774 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-c03c62fb) (logid:895cbe14) Found 0 networks to update RvR status.
2018-06-06 15:26:10,032 DEBUG [c.c.a.t.Request] (AgentManager-Handler-11:null) (logid:) Seq 1-4068157838399111329: Processing: { Ans: , MgmtId: 7251750357085, via: 1, Ver: v1, Flags: 10, [{"com.cloud.agent.api.StopAnswer":{"result":true,"wait":0}}] }
2018-06-06 15:26:10,032 DEBUG [c.c.a.t.Request] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Seq 1-4068157838399111329: Received: { Ans: , MgmtId: 7251750357085, via: 1(pr2694-t2737-kvm-centos7-kvm1), Ver: v1, Flags: 10, { StopAnswer } }
2018-06-06 15:26:10,040 DEBUG [c.c.n.NetworkModelImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Service SecurityGroup is not supported in the network id=205
2018-06-06 15:26:10,042 DEBUG [o.a.c.e.o.NetworkOrchestrator] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Changing active number of nics for network id=205 on -1
2018-06-06 15:26:10,054 DEBUG [o.a.c.e.o.NetworkOrchestrator] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Asking ConfigDrive to release NicProfile[8-4-75b5c7da-e02e-4448-82fd-9cd1d42321cc-null-null
2018-06-06 15:26:10,058 DEBUG [c.c.n.e.ConfigDriveNetworkElement] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Deleting config drive ISO for vm: i-2-4-VM
2018-06-06 15:26:10,061 DEBUG [c.c.a.t.Request] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Seq 2-3047811047822983242: Sending { Cmd , MgmtId: 7251750357085, via: 2(s-1-VM), Ver: v1, Flags: 100011, [{"com.cloud.agent.api.HandleConfigDriveIsoCommand":{"isoFile":"configdrive/i-2-4-VM/configdrive.iso","create":false,"destStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"NFS://10.2.0.16/acs/secondary/pr2694-t2737-kvm-centos7/pr2694-t2737-kvm-centos7-sec1","_role":"Image"}},"wait":0}}] }
2018-06-06 15:26:10,123 DEBUG [c.c.a.t.Request] (AgentManager-Handler-13:null) (logid:) Seq 2-3047811047822983242: Processing: { Ans: , MgmtId: 7251750357085, via: 2, Ver: v1, Flags: 10, [{"com.cloud.agent.api.Answer":{"result":true,"wait":0}}] }
2018-06-06 15:26:10,123 DEBUG [c.c.a.t.Request] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Seq 2-3047811047822983242: Received: { Ans: , MgmtId: 7251750357085, via: 2(s-1-VM), Ver: v1, Flags: 10, { Answer } }
2018-06-06 15:26:10,123 DEBUG [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Successfully released network resources for the vm VM[User|i-2-4-VM]
2018-06-06 15:26:10,123 DEBUG [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Successfully cleanued up resources for the vm VM[User|i-2-4-VM] in Starting state
2018-06-06 15:26:10,139 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) VM state transitted from :Starting to Stopped with event: OperationFailedvm's original host id: null new host id: null host id before state transition: 1
2018-06-06 15:26:10,145 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Hosts's actual total CPU: 6900 and CPU after applying overprovisioning: 13800
2018-06-06 15:26:10,145 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Hosts's actual total RAM: 7515656192 and RAM after applying overprovisioning: 7515656192
2018-06-06 15:26:10,145 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) release cpu from host: 1, old used: 1500,reserved: 0, actual total: 6900, total with overprovisioning: 13800; new used: 1000,reserved:0; movedfromreserved: false,moveToReserveredfalse
2018-06-06 15:26:10,145 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) release mem from host: 1, old used: 2147483648,reserved: 0, total: 7515656192; new used: 1610612736,reserved:0; movedfromreserved: false,moveToReserveredfalse
2018-06-06 15:26:10,163 ERROR [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Invocation exception, caused by: java.lang.NullPointerException
2018-06-06 15:26:10,163 INFO [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36 ctx-55955b26) (logid:bad79d5a) Rethrow exception java.lang.NullPointerException
2018-06-06 15:26:10,163 DEBUG [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36) (logid:bad79d5a) Done with run of VM work job: com.cloud.vm.VmWorkStart for VM 4, job origin: 35
2018-06-06 15:26:10,163 ERROR [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36) (logid:bad79d5a) Unable to complete AsyncJobVO {id:36, userId: 2, accountId: 2, instanceType: null, instanceId: null, cmd: com.cloud.vm.VmWorkStart, cmdInfo: rO0ABXNyABhjb20uY2xvdWQudm0uVm1Xb3JrU3RhcnR9cMGsvxz73gIAC0oABGRjSWRMAAZhdm9pZHN0ADBMY29tL2Nsb3VkL2RlcGxveS9EZXBsb3ltZW50UGxhbm5lciRFeGNsdWRlTGlzdDtMAAljbHVzdGVySWR0ABBMamF2YS9sYW5nL0xvbmc7TAAGaG9zdElkcQB-AAJMAAtqb3VybmFsTmFtZXQAEkxqYXZhL2xhbmcvU3RyaW5nO0wAEXBoeXNpY2FsTmV0d29ya0lkcQB-AAJMAAdwbGFubmVycQB-AANMAAVwb2RJZHEAfgACTAAGcG9vbElkcQB-AAJMAAlyYXdQYXJhbXN0AA9MamF2YS91dGlsL01hcDtMAA1yZXNlcnZhdGlvbklkcQB-AAN4cgATY29tLmNsb3VkLnZtLlZtV29ya5-ZtlbwJWdrAgAESgAJYWNjb3VudElkSgAGdXNlcklkSgAEdm1JZEwAC2hhbmRsZXJOYW1lcQB-AAN4cAAAAAAAAAACAAAAAAAAAAIAAAAAAAAABHQAGVZpcnR1YWxNYWNoaW5lTWFuYWdlckltcGwAAAAAAAAAAXBzcgAOamF2YS5sYW5nLkxvbmc7i-SQzI8j3wIAAUoABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAAAAAAFxAH4ACnBwcHEAfgAKcHNyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAABdAAKVm1QYXNzd29yZHQAHHJPMEFCWFFBRG5OaGRtVmtYM0JoYzNOM2IzSmt4cA, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 7251750357085, completeMsid: null, lastUpdated: null, lastPolled: null, created: Wed Jun 06 15:26:09 UTC 2018}, job origin:35
java.lang.NullPointerException
at org.apache.cloudstack.storage.configdrive.ConfigDriveBuilder.buildOpenStackMetaData(ConfigDriveBuilder.java:294)
at org.apache.cloudstack.storage.configdrive.ConfigDriveBuilder.createFileInTempDirAnAppendOpenStackMetadataToJsonObject(ConfigDriveBuilder.java:255)
at org.apache.cloudstack.storage.configdrive.ConfigDriveBuilder.createJsonObjectWithVmData(ConfigDriveBuilder.java:226)
at org.apache.cloudstack.storage.configdrive.ConfigDriveBuilder.writeVmMetadata(ConfigDriveBuilder.java:188)
at org.apache.cloudstack.storage.configdrive.ConfigDriveBuilder.buildConfigDrive(ConfigDriveBuilder.java:103)
at com.cloud.network.element.ConfigDriveNetworkElement.createConfigDriveIso(ConfigDriveNetworkElement.java:350)
at com.cloud.network.element.ConfigDriveNetworkElement.addPasswordAndUserdata(ConfigDriveNetworkElement.java:204)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareElement(NetworkOrchestrator.java:1323)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareNic(NetworkOrchestrator.java:1629)
at org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1563)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:1111)
at com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:4930)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
at com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5093)
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:581)
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:529)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2018-06-06 15:26:10,167 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (Work-Job-Executor-5:ctx-2636e2ba job-35/job-36) (logid:bad79d5a) Complete async job-36, jobStatus: FAILED, resultCode: 0, result:
@blueorangutan package |
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2096 |
@PaulAngus @DaanHoogland @rhtyd after the fix for config drive, I can see the iso gets created but somehow not available through deployed VM:
|
@nvazquez can you try listing using blkid -o list instead. It's possible that the cdrom is not always at the device you're trying to mount/access. It sometimes can be on /dev/sr1 etc. |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
@@ -286,7 +286,7 @@ private static void buildOpenStackMetaData(JsonObject metaData, String dataType, | |||
if (!NetworkModel.METATDATA_DIR.equals(dataType)) { | |||
return; | |||
} | |||
if (StringUtils.isNotBlank(content)) { | |||
if (StringUtils.isEmpty(content)) { |
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.
This could be isBlank to return, but isEmpty is okay too.
@nvazquez /cc @PaulAngus |
Checked Paul's exception, with Nicolas's NPE fix I could not reproduce it now.
Merging this based on code reviews and manual testing, as well as travis and smoketests/trillian. Some of the smoketests failings are not caused by this PR but are env caused. |
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2100 |
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2105 |
Description
Prevent creation of L2 network offerings with conserve mode = false. As conserve mode is irrelevant for L2 networks as there are no resources to conserve, we do not send the Conserve mode parameter to network offering creation, as it will be True by default. Conserve mode = false caused that L2 network offerings in a zone were not listed, as described in the issue below.
Types of changes
GitHub Issue/PRs
This fixes the issue #2690
Screenshots (if appropriate):
No Conserve mode checkbox when L2 is selected:
List zone L2 network offerings:
How Has This Been Tested?
Create an L2 network offering (check that Conserve mode checkbox is not visible). Check that conserve mode is true for the created offering
Checklist:
Testing