Skip to content
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

Merged
merged 2 commits into from Jun 7, 2018

Conversation

nvazquez
Copy link
Contributor

@nvazquez nvazquez commented Jun 6, 2018

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

  • 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)

GitHub Issue/PRs

This fixes the issue #2690

Screenshots (if appropriate):

No Conserve mode checkbox when L2 is selected:
image
List zone L2 network offerings:
image

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:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
    Testing
  • I have added tests to cover my changes.
  • All relevant new and existing integration tests have passed.
  • A full integration testsuite with all test that can run on my environment has passed.

@nvazquez nvazquez added this to the 4.11.1.0 milestone Jun 6, 2018
@nvazquez
Copy link
Contributor Author

nvazquez commented Jun 6, 2018

@blueorangutan package

@blueorangutan
Copy link

@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2092

@nvazquez
Copy link
Contributor Author

nvazquez commented Jun 6, 2018

@blueorangutan test

@blueorangutan
Copy link

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

Copy link
Member

@rohityadavcloud rohityadavcloud left a 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.

@blueorangutan
Copy link

Trillian test result (tid-2726)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 25692 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2694-t2726-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermitten failure detected: /marvin/tests/smoke/test_host_maintenance.py
Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 62 look OK, 5 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestDeployVirtioSCSIVM>:setup Error 0.00 test_deploy_virtio_scsi_vm.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 163.80 test_privategw_acl.py
test_01_secured_vm_migration Error 1.15 test_vm_life_cycle.py
test_02_not_secured_vm_migration Error 1.16 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 1.16 test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration Error 1.15 test_vm_life_cycle.py
test_08_migrate_vm Error 6.37 test_vm_life_cycle.py
test_01_cancel_host_maintenace_with_no_migration_jobs Failure 0.15 test_host_maintenance.py
test_02_cancel_host_maintenace_with_migration_jobs Error 41.44 test_host_maintenance.py
test_hostha_enable_ha_when_host_in_maintenance Error 2.64 test_hostha_kvm.py

Copy link
Contributor

@DaanHoogland DaanHoogland left a 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

@DaanHoogland
Copy link
Contributor

@nvazquez can you add screenshots to show that it works?

@nvazquez
Copy link
Contributor Author

nvazquez commented Jun 6, 2018

Sure @DaanHoogland, I've added them to the PR description.

Copy link
Member

@PaulAngus PaulAngus left a 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:

@nvazquez
Copy link
Contributor Author

nvazquez commented Jun 6, 2018

@blueorangutan package

@blueorangutan
Copy link

@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2096

@nvazquez
Copy link
Contributor Author

nvazquez commented Jun 7, 2018

@PaulAngus @DaanHoogland @rhtyd after the fix for config drive, I can see the iso gets created but somehow not available through deployed VM:

2018-06-07 00:22:06,885 DEBUG [o.a.c.e.o.NetworkOrchestrator] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Asking ConfigDrive to prepare for Nic[12-8-13e0ae61-72f5-4471-983b-060574212266-null]
2018-06-07 00:22:06,899 DEBUG [c.c.n.e.ConfigDriveNetworkElement] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Creating config drive ISO for vm: i-2-8-VM
2018-06-07 00:22:06,901 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=service-offering, content=Small Instance
2018-06-07 00:22:06,901 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=availability-zone, content=trl-1430-k-cs411-nvazquez
2018-06-07 00:22:06,902 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=local-hostname, content=cfg-drv-2
2018-06-07 00:22:06,902 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=local-ipv4, content=null
2018-06-07 00:22:06,902 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=public-ipv4, content=null
2018-06-07 00:22:06,902 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=public-hostname, content=null
2018-06-07 00:22:06,902 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=instance-id, content=b899c153-e3d6-4e00-af46-2721bc7afc92
2018-06-07 00:22:06,902 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=vm-id, content=b899c153-e3d6-4e00-af46-2721bc7afc92
2018-06-07 00:22:06,902 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=public-keys, content=null
2018-06-07 00:22:06,902 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) [createConfigDriveIsoForVM] dataType=metadata, filename=cloud-identifier, content=CloudStack-{8a11dd95-c350-4f99-9bdb-78bc17a8e9fc}
2018-06-07 00:22:06,903 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Executing config drive creation command: /usr/bin/genisoimage -o /tmp/configdrive8808714705692880737/configdrive.iso -ldots -allow-lowercase -allow-multidot -cache-inodes -l -quiet -J -r -V config-2 /tmp/configdrive8808714705692880737 
2018-06-07 00:22:06,904 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Executing: /usr/bin/genisoimage -o /tmp/configdrive8808714705692880737/configdrive.iso -ldots -allow-lowercase -allow-multidot -cache-inodes -l -quiet -J -r -V config-2 /tmp/configdrive8808714705692880737 
2018-06-07 00:22:06,906 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Executing while with timeout : 300000
2018-06-07 00:22:06,915 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Execution is successful.
2018-06-07 00:22:06,915 DEBUG [o.a.c.s.c.ConfigDriveBuilder] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Warning: creating filesystem that does not conform to ISO-9660.

2018-06-07 00:22:06,938 DEBUG [c.c.a.t.Request] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Seq 3-5477503046789366214: Sending  { Cmd , MgmtId: 6819703490805, via: 3(s-1-VM), Ver: v1, Flags: 100011, [{"com.cloud.agent.api.HandleConfigDriveIsoCommand":{"isoFile":"configdrive/i-2-8-VM/configdrive.iso","create":true,"destStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"NFS://10.2.0.16/acs/secondary/trl-1430-k-cs411-nvazquez/trl-1430-k-cs411-nvazquez-sec1","_role":"Image"}},"wait":0}}] }
2018-06-07 00:22:07,314 DEBUG [c.c.a.t.Request] (AgentManager-Handler-20:null) (logid:) Seq 3-5477503046789366214: Processing:  { Ans: , MgmtId: 6819703490805, via: 3, Ver: v1, Flags: 10, [{"com.cloud.agent.api.Answer":{"result":true,"details":"Successfully saved config drive at secondary storage","wait":0}}] }
2018-06-07 00:22:07,314 DEBUG [c.c.a.t.Request] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Seq 3-5477503046789366214: Received:  { Ans: , MgmtId: 6819703490805, via: 3(s-1-VM), Ver: v1, Flags: 10, { Answer } }
2018-06-07 00:22:07,314 DEBUG [c.c.a.m.AgentManagerImpl] (Work-Job-Executor-2:ctx-5bf307a3 job-47/job-48 ctx-9e793f3b) (logid:28315433) Details from executing class com.cloud.agent.api.HandleConfigDriveIsoCommand: Successfully saved config drive at secondary storage

image

@rohityadavcloud
Copy link
Member

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

@blueorangutan
Copy link

@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)) {
Copy link
Member

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.

@rohityadavcloud
Copy link
Member

@nvazquez /cc @PaulAngus
I did a manual end to end testing of the config drive feature with this PR, LGTM. To mount on the default centos5 template, use -o loop, such as mount -o loop /dev/cdrom /mnt. I also tested the primary vs secondary storage to host config drive isos.
screenshot from 2018-06-07 11-13-32

@rohityadavcloud rohityadavcloud dismissed PaulAngus’s stale review June 7, 2018 05:44

Checked Paul's exception, with Nicolas's NPE fix I could not reproduce it now.

@rohityadavcloud
Copy link
Member

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.

@rohityadavcloud rohityadavcloud merged commit 99ca81a into apache:4.11 Jun 7, 2018
@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2100

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2105

@nvazquez nvazquez deleted the l2offeringslist branch April 6, 2020 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants