public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH-SERIES qemu-server] fix #4522: vncproxy: always set environment variable for ticket
@ 2023-10-16 13:12 Fiona Ebner
  2023-10-16 13:12 ` [pve-devel] [PATCH qemu-server 1/2] api: vncproxy: update description of websocket parameter Fiona Ebner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2023-10-16 13:12 UTC (permalink / raw)
  To: pve-devel

Since commit 2dc0eb61 ("qm: assume correct VNC setup in 'vncproxy',
disallow passwordless"), 'qm vncproxy' will just fail when the
LC_PVE_TICKET environment variable is not set. Fix the vncproxy API
call, which previously, would only set the variable in presence of the
'websocket' parameter.


Fiona Ebner (2):
  api: vncproxy: update description of websocket parameter
  fix #4522: api: vncproxy: also set environment variable for ticket
    without websocket

 PVE/API2/Qemu.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.39.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] [PATCH qemu-server 1/2] api: vncproxy: update description of websocket parameter
  2023-10-16 13:12 [pve-devel] [PATCH-SERIES qemu-server] fix #4522: vncproxy: always set environment variable for ticket Fiona Ebner
@ 2023-10-16 13:12 ` Fiona Ebner
  2023-10-16 13:12 ` [pve-devel] [PATCH qemu-server 2/2] fix #4522: api: vncproxy: also set environment variable for ticket without websocket Fiona Ebner
  2023-10-16 14:45 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server] fix #4522: vncproxy: always set environment variable for ticket Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2023-10-16 13:12 UTC (permalink / raw)
  To: pve-devel

Since commit 3e7567e0 ("do not use novnc wsproxy"), the websocket
upgrade is done via the HTTP server.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 PVE/API2/Qemu.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index c8a87f3f..a31ddb81 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2267,7 +2267,7 @@ __PACKAGE__->register_method({
 	    websocket => {
 		optional => 1,
 		type => 'boolean',
-		description => "starts websockify instead of vncproxy",
+		description => "Prepare for websocket upgrade.",
 	    },
 	    'generate-password' => {
 		optional => 1,
-- 
2.39.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] [PATCH qemu-server 2/2] fix #4522: api: vncproxy: also set environment variable for ticket without websocket
  2023-10-16 13:12 [pve-devel] [PATCH-SERIES qemu-server] fix #4522: vncproxy: always set environment variable for ticket Fiona Ebner
  2023-10-16 13:12 ` [pve-devel] [PATCH qemu-server 1/2] api: vncproxy: update description of websocket parameter Fiona Ebner
@ 2023-10-16 13:12 ` Fiona Ebner
  2023-10-16 14:45 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server] fix #4522: vncproxy: always set environment variable for ticket Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2023-10-16 13:12 UTC (permalink / raw)
  To: pve-devel

Since commit 2dc0eb61 ("qm: assume correct VNC setup in 'vncproxy',
disallow passwordless"), 'qm vncproxy' will just fail when the
LC_PVE_TICKET environment variable is not set. Since it is not only
required in combination with websocket, drop that conditional.

For the non-serial case, this was the last remaining effect of the
'websocket' parameter, so update the parameter description.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 PVE/API2/Qemu.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index a31ddb81..9877ce24 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2267,7 +2267,8 @@ __PACKAGE__->register_method({
 	    websocket => {
 		optional => 1,
 		type => 'boolean',
-		description => "Prepare for websocket upgrade.",
+		description => "Prepare for websocket upgrade (only required when using "
+		    ."serial terminal, otherwise upgrade is always possible).",
 	    },
 	    'generate-password' => {
 		optional => 1,
@@ -2365,7 +2366,7 @@ __PACKAGE__->register_method({
 
 	    } else {
 
-		$ENV{LC_PVE_TICKET} = $password if $websocket; # set ticket with "qm vncproxy"
+		$ENV{LC_PVE_TICKET} = $password; # set ticket with "qm vncproxy"
 
 		$cmd = [@$remcmd, "/usr/sbin/qm", 'vncproxy', $vmid];
 
-- 
2.39.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] applied-series: [PATCH-SERIES qemu-server] fix #4522: vncproxy: always set environment variable for ticket
  2023-10-16 13:12 [pve-devel] [PATCH-SERIES qemu-server] fix #4522: vncproxy: always set environment variable for ticket Fiona Ebner
  2023-10-16 13:12 ` [pve-devel] [PATCH qemu-server 1/2] api: vncproxy: update description of websocket parameter Fiona Ebner
  2023-10-16 13:12 ` [pve-devel] [PATCH qemu-server 2/2] fix #4522: api: vncproxy: also set environment variable for ticket without websocket Fiona Ebner
@ 2023-10-16 14:45 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2023-10-16 14:45 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

Am 16/10/2023 um 15:12 schrieb Fiona Ebner:
> Since commit 2dc0eb61 ("qm: assume correct VNC setup in 'vncproxy',
> disallow passwordless"), 'qm vncproxy' will just fail when the
> LC_PVE_TICKET environment variable is not set. Fix the vncproxy API
> call, which previously, would only set the variable in presence of the
> 'websocket' parameter.
> 
> 
> Fiona Ebner (2):
>   api: vncproxy: update description of websocket parameter
>   fix #4522: api: vncproxy: also set environment variable for ticket
>     without websocket
> 
>  PVE/API2/Qemu.pm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 


applied series, thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-16 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-16 13:12 [pve-devel] [PATCH-SERIES qemu-server] fix #4522: vncproxy: always set environment variable for ticket Fiona Ebner
2023-10-16 13:12 ` [pve-devel] [PATCH qemu-server 1/2] api: vncproxy: update description of websocket parameter Fiona Ebner
2023-10-16 13:12 ` [pve-devel] [PATCH qemu-server 2/2] fix #4522: api: vncproxy: also set environment variable for ticket without websocket Fiona Ebner
2023-10-16 14:45 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server] fix #4522: vncproxy: always set environment variable for ticket Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal