Omer Frenkel has posted comments on this change. Change subject: engine: cannot set payload and cloud-init on same devices. ......................................................................
Patch Set 6: (5 comments) http://gerrit.ovirt.org/#/c/33318/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java: Line 684: getVm().setInitializationType(getParameters().getInitializationType()); Line 685: // If the user asked for sysprep/cloud-init via run-once we eliminate Line 686: // the payload since we can only have one media (Floppy/CDROM) per payload. Line 687: if (getParameters().getInitializationType() == InitializationType.Sysprep && Line 688: getVm().getVmPayload().getType() == VmDeviceType.FLOPPY) { getVm().getVmPayload() can be null, no? you can use the new isPayloadExists(deviceType) method here as well Line 689: getVm().setVmPayload(null); Line 690: } else if (getParameters().getInitializationType() == InitializationType.CloudInit && Line 691: getVm().getVmPayload().getType() == VmDeviceType.CDROM) { Line 692: getVm().setVmPayload(null); Line 909: if (getParameters().getInitializationType() != null) { Line 910: if (getParameters().getInitializationType() == InitializationType.Sysprep && getParameters().getVmPayload() != null && Line 911: getParameters().getVmPayload().getType() == VmDeviceType.FLOPPY) { Line 912: return failCanDoAction(VdcBllMessages.VMPAYLOAD_FLOPPY_WITH_SYSPREP); Line 913: } else if (getParameters().getInitializationType() == InitializationType.Sysprep && getParameters().getVmPayload() != null && should be InitializationType.CloudInit no? Line 914: getParameters().getVmPayload().getType() == VmDeviceType.CDROM) { Line 915: return failCanDoAction(VdcBllMessages.VMPAYLOAD_CDROM_WITH_CLOUD_INIT); Line 916: } Line 917: } http://gerrit.ovirt.org/#/c/33318/6/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties: Line 1064: ACTION_TYPE_FAILED_ONE_OR_MORE_BRICKS_ARE_DOWN=Cannot ${action} ${type}. One or more bricks are down. Line 1065: VMPAYLOAD_INVALID_PAYLOAD_TYPE=VM Payload only supported in CDROM or Floppy devices Line 1066: VMPAYLOAD_SIZE_EXCEEDED=Payload is limited to ${size}K Line 1067: VMPAYLOAD_FLOPPY_EXCEEDED=Payload Floppy cannot be used when using an additional Floppy Line 1068: VMPAYLOAD_FLOPPY_WITH_SYSPREP=Payload floppy deivce cannot be use with Sysprep via floppy device. typo: deivce->device , use -> used Line 1069: VMPAYLOAD_CDROM_WITH_CLOUD_INIT=Payload cdrom deivce cannot be use with Cloud-Init via cdrom device. Line 1070: ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_UP=Cannot ${action} ${type}. Gluster volume ${volumeName} is up. Line 1071: ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN=Cannot ${action} ${type}. Gluster Volume is down. Line 1072: ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME=Cannot ${action} ${type}. Cannot remove all the bricks from a Volume. Line 1065: VMPAYLOAD_INVALID_PAYLOAD_TYPE=VM Payload only supported in CDROM or Floppy devices Line 1066: VMPAYLOAD_SIZE_EXCEEDED=Payload is limited to ${size}K Line 1067: VMPAYLOAD_FLOPPY_EXCEEDED=Payload Floppy cannot be used when using an additional Floppy Line 1068: VMPAYLOAD_FLOPPY_WITH_SYSPREP=Payload floppy deivce cannot be use with Sysprep via floppy device. Line 1069: VMPAYLOAD_CDROM_WITH_CLOUD_INIT=Payload cdrom deivce cannot be use with Cloud-Init via cdrom device. same Line 1070: ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_UP=Cannot ${action} ${type}. Gluster volume ${volumeName} is up. Line 1071: ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN=Cannot ${action} ${type}. Gluster Volume is down. Line 1072: ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME=Cannot ${action} ${type}. Cannot remove all the bricks from a Volume. Line 1073: ACTION_TYPE_FAILED_GLUSTER_VOLUME_SHOULD_BE_STARTED=Cannot ${action} ${type}. Gluster Volume should be started. http://gerrit.ovirt.org/#/c/33318/6/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java: Line 136: VmDevice vmDevice = Line 137: new VmDevice(new VmDeviceId(Guid.newGuid(), vm.getId()), Line 138: VmDeviceGeneralType.DISK, Line 139: VmDeviceType.CDROM.getName(), Line 140: "", we need to keep the address in case the payload was in db and not run-once Line 141: 0, Line 142: vm.getVmPayload().getSpecParams(), Line 143: true, Line 144: true, -- To view, visit http://gerrit.ovirt.org/33318 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic5b701f058a2d87b2836d337f822d2f012d10bbe Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches