-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add missing DisplayType values #102
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ public enum DisplayType { | |
* @date 23 Apr 2017 | ||
* @status added | ||
*/ | ||
@Deprecated | ||
VNC, | ||
|
||
/** | ||
|
@@ -49,5 +50,49 @@ public enum DisplayType { | |
* @date 23 Apr 2017 | ||
* @status added | ||
*/ | ||
SPICE; | ||
@Deprecated | ||
SPICE, | ||
|
||
/** | ||
* Display of type CIRRUS | ||
* @author Jean-Louis Dupond <[email protected]> | ||
* @date 26 May 2023 | ||
* @status added | ||
*/ | ||
@Deprecated | ||
CIRRUS, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you're mixing video devices and graphic devices here - we intentionally didn't add the video devices to the API because they are represented differently There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Back in the early days, oVirt only had DisplayType. So now oVirt Engine itself has both types: The DisplayType (QXL/VGA/BOCHS/etc) And the GraphicsType (VNC/SPICE) But for some reason, you can't set the real DisplayType from the REST API. So we need to add the real DisplayTypes to the model, so we can then allow the REST API code to set the DisplayType. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
can you please elaborate on that? it should have been handled by making VGA the default video type - what cluster version do you use? how the blank template looks like in terms of video and graphic devices? and how do you provision the vm (from scratch, i.e., from the blank template or from an existing template - in case of the latter, how that template is set in terms of video and graphic devices?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
ah no, that's not the right one - @liranr23 do you remember how we managed to set the display type properly? was it by changing the osinfo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was not about new VM's. But to upgrade to CentOS 9, all VM's had to be changed to VGA - VNC (as QXL is gone in CentOS 9). So when trying to do that, we've noticed there was no way to set this, as there is no 'VGA' DisplayType in the API. You could use DisplayType.VNC, but it preferred QXL over VGA, and didn't change the display to VGA like we needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dupondje yeah, there's no VGA type in DisplayType since DisplayType should not have been used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
hard to recall. i think we change osinfo. but maybe we did something also on AsyncDataProvider/UnitVmModel or elsewhere, where we "preferred" something. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we set the DisplayType depending on the GraphicsType. With a preference for SPICE. In the UI you can just set the DisplayType, so why would we not want to have the functionality in the API? |
||
|
||
/** | ||
* Display of type QXL | ||
* @author Jean-Louis Dupond <[email protected]> | ||
* @date 26 May 2023 | ||
* @status added | ||
*/ | ||
@Deprecated | ||
QXL, | ||
|
||
/** | ||
* Display of type VGA | ||
* @author Jean-Louis Dupond <[email protected]> | ||
* @date 26 May 2023 | ||
* @status added | ||
*/ | ||
VGA, | ||
|
||
/** | ||
* Display of type BOCHS | ||
* @author Jean-Louis Dupond <[email protected]> | ||
* @date 26 May 2023 | ||
* @status added | ||
*/ | ||
BOCHS, | ||
|
||
/** | ||
* Display of type NONE | ||
* This is for headless VM's | ||
* @author Jean-Louis Dupond <[email protected]> | ||
* @date 26 May 2023 | ||
* @status added | ||
*/ | ||
NONE; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we had a long thread about this one back then - this couldn't work for specifying that we want a headless vm, we rather need to create the vm and then remove its video devices There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is how it's represented now: I think this should be fixable from the engine code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sgratch is there a chance you can find the discussion we had with Juan back then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dupondje @ahadas @liranr23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember we decided to have 2 phases to set the VM headless. |
||
} |
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.
why annotating VNC as deprecated?
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.
Because VNC is a GraphicsType, and not a DisplayType. This was used before the introduction of GraphicsType. But as we have both now, we deprecate the DisplayType.VNC as you need to use GraphicsType.VNC.
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.
so let's deprecate DisplayType entirely then..
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.
Well not at this moment I think. On CentOS 8 you would like to have DisplayType.QXL with GraphicsType.VNC for example. Like you can set both in the UI at this moment.
And for headless you might want to return DisplayType.NONE also.
So I wouldn't deprecate DisplayType ..
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.
or keep the current design - you can achieve this by removing the current video devices
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.
It's not a requirement as far as I see to have DisplayType.NONE indeed.
But does it hurt to have an additional way to make a VM headless by setting the DisplayType to NONE?