Francesco Romani has uploaded a new change for review.

Change subject: core: device: add specParams for console devices
......................................................................

core: device: add specParams for console devices

Add the 'enableSocket=True' specParam to instruct
instruct VDSM to bind the vm virtual serial console to an Unix
Domain Socket.

This patch enables the last link to make the Serial Console
feature to actually work.

We inconditionally do this way because this one being implemented
was the original intent of the console device proper, so it doesn't
make much sense to have different operational mode for Console
Devices.

Please note that only console devices created after this
patch is applied do have the needed specParam set.
Older VM will not be conformant, even though they have the console
device.

Note about the upgrade path
Unfortunately, the specParams are stored as text, so it is not
easy to provide a robust solution in the upgrade script.
A good workaround could be just edit existing VMs, to remove
and add again the console device. This will trigger the creation
of the device, adding the right specParam.

This operation should be easily automated using Engine SDK.

Feature wiki page: http://www.ovirt.org/Features/Serial_Console

Bug-Url: https://bugzilla.redhat.com/1223671

Change-Id: I42c1134728dee4b42fc38f13763dac5f7e5b7314
Signed-off-by: Francesco Romani <from...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
1 file changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/42216/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
index 887a4f1..33a5564 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
@@ -320,11 +320,23 @@
                 new VmDeviceId(Guid.newGuid(), vmId),
                 VmDeviceGeneralType.CONSOLE,
                 VmDeviceType.CONSOLE,
-                EMPTY_SPEC_PARAMS,
+                getConsoleDeviceSpecParams(),
                 true,
                 false);
     }
 
+    /**
+     * Returns console device spec params.
+     *
+     * @return
+     */
+    private static Map<String, Object> getConsoleDeviceSpecParams() {
+        Map<String, Object> specParams = new HashMap<>();
+        specParams.put("enableSocket", "true");
+        return specParams;
+    }
+
+
     /*
      * VirtIO-SCSI controller
      */


-- 
To view, visit https://gerrit.ovirt.org/42216
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42c1134728dee4b42fc38f13763dac5f7e5b7314
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <from...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to