public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency
@ 2021-02-09 15:45 Aaron Lauterer
  2021-02-09 15:45 ` [pve-devel] [PATCH v2 docs] ha-manager: simulator: add note for xauth when installing Aaron Lauterer
  2021-02-09 18:21 ` [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency Dietmar Maurer
  0 siblings, 2 replies; 6+ messages in thread
From: Aaron Lauterer @ 2021-02-09 15:45 UTC (permalink / raw)
  To: pve-devel

When installing the ha-simulator on a PVE node to start it via ssh with
x11 forwarding, the xauth package helps to avoid `Unable to init server:
Could not connect: Connection refused` errors.

Placing it in the suggests to avoid possible dependency issues which
could pop up when installing this package on other systems with e.g.
wayland instead of x11.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
v2: making it a suggestion instead of a hard dependency

 debian/control | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/control b/debian/control
index 7b4ffb0..f1ec771 100644
--- a/debian/control
+++ b/debian/control
@@ -48,5 +48,6 @@ Depends: libclone-perl,
          liburi-perl,
          ${misc:Depends},
          ${perl:Depends},
+Suggests: xauth,
 Description: Proxmox VE HA Simulator
  This is a simple GUI to simulate the behavior of a Proxmox VE HA cluster.
-- 
2.20.1





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

* [pve-devel] [PATCH v2 docs] ha-manager: simulator: add note for xauth when installing
  2021-02-09 15:45 [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency Aaron Lauterer
@ 2021-02-09 15:45 ` Aaron Lauterer
  2021-02-10  7:19   ` Thomas Lamprecht
  2021-02-09 18:21 ` [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency Dietmar Maurer
  1 sibling, 1 reply; 6+ messages in thread
From: Aaron Lauterer @ 2021-02-09 15:45 UTC (permalink / raw)
  To: pve-devel

Installing the ha-simulator on a PVE node directly to start it via ssh
and x11 forwarding will need the 'xauth' package installed on the PVE
node as well.

Otherwise one is likely to encounter the following error when starting
the simulator: `Unable to init server: Could not connect: Connection
refused`

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
I added this patch as I think it might be good to have a hint in the
docs as well and not just a suggested package.


 ha-manager.adoc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ha-manager.adoc b/ha-manager.adoc
index 2162d25..f0a029a 100644
--- a/ha-manager.adoc
+++ b/ha-manager.adoc
@@ -505,6 +505,10 @@ pve-ha-simulator working/
 You can then start, stop, migrate the simulated HA services, or even check out
 what happens on a node failure.
 
+NOTE: Should you install the simulator on a {pve} node, it is possible that
+starting the simulator will fail at first. If that happens, consider installing
+the 'xauth' package on the {pve} node.
+
 Configuration
 -------------
 
-- 
2.20.1





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

* Re: [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency
  2021-02-09 15:45 [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency Aaron Lauterer
  2021-02-09 15:45 ` [pve-devel] [PATCH v2 docs] ha-manager: simulator: add note for xauth when installing Aaron Lauterer
@ 2021-02-09 18:21 ` Dietmar Maurer
  2021-02-10  7:29   ` Thomas Lamprecht
  1 sibling, 1 reply; 6+ messages in thread
From: Dietmar Maurer @ 2021-02-09 18:21 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

This is true for anything. X11 forwarding simply works that way. So I am quite unsure if we should add xauth here...

Or is this a common practice (I am unaware of)?

> 
> When installing the ha-simulator on a PVE node to start it via ssh with
> x11 forwarding, the xauth package helps to avoid `Unable to init server:
> Could not connect: Connection refused` errors.




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

* Re: [pve-devel] [PATCH v2 docs] ha-manager: simulator: add note for xauth when installing
  2021-02-09 15:45 ` [pve-devel] [PATCH v2 docs] ha-manager: simulator: add note for xauth when installing Aaron Lauterer
@ 2021-02-10  7:19   ` Thomas Lamprecht
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2021-02-10  7:19 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

On 09.02.21 16:45, Aaron Lauterer wrote:
> Installing the ha-simulator on a PVE node directly to start it via ssh
> and x11 forwarding will need the 'xauth' package installed on the PVE
> node as well.
> 
> Otherwise one is likely to encounter the following error when starting
> the simulator: `Unable to init server: Could not connect: Connection
> refused`
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> I added this patch as I think it might be good to have a hint in the
> docs as well and not just a suggested package.
> 

yeah, good idea. IMO that's even the better place to fix this than the
package control file.

> 
>  ha-manager.adoc | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/ha-manager.adoc b/ha-manager.adoc
> index 2162d25..f0a029a 100644
> --- a/ha-manager.adoc
> +++ b/ha-manager.adoc
> @@ -505,6 +505,10 @@ pve-ha-simulator working/
>  You can then start, stop, migrate the simulated HA services, or even check out
>  what happens on a node failure.
>  
> +NOTE: Should you install the simulator on a {pve} node, it is possible that
> +starting the simulator will fail at first. If that happens, consider installing
> +the 'xauth' package on the {pve} node.

IMO this is a bit weird wording. General failure can be much different things.
E.g., this sounds like it would help to install xauth for any error even if no
ssh X forwarding is involved at all.

Rather state the exact use case and requirements. Something short along the lines
of:

HINT: If you want to forward the simulator window over SSH, you need to install
the `xauth` package on the {pve} node.




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

* Re: [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency
  2021-02-09 18:21 ` [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency Dietmar Maurer
@ 2021-02-10  7:29   ` Thomas Lamprecht
  2021-02-10  7:42     ` Thomas Lamprecht
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Lamprecht @ 2021-02-10  7:29 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dietmar Maurer, Aaron Lauterer

On 09.02.21 19:21, Dietmar Maurer wrote:
> On 09.02.21 16:45, Aaron Lauterer wrote:
>> When installing the ha-simulator on a PVE node to start it via ssh with
>> x11 forwarding, the xauth package helps to avoid `Unable to init server:
>> Could not connect: Connection refused` errors.
>
> This is true for anything. X11 forwarding simply works that way. So I am quite unsure if we should add xauth here...> > Or is this a common practice (I am unaware of)?

Not really, but there are not much programs which are primarily run over
SSH forwarding I know either.

If one really wants an active warning one could do a check like:

defined($ENV{'SSH_CONNECTION'}) && !(-x /usr/bin/xauth || -x /bin/xauth)

A bit crude but could work, and could be used to print out a early warning.





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

* Re: [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency
  2021-02-10  7:29   ` Thomas Lamprecht
@ 2021-02-10  7:42     ` Thomas Lamprecht
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2021-02-10  7:42 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dietmar Maurer, Aaron Lauterer

On 10.02.21 08:29, Thomas Lamprecht wrote:
> On 09.02.21 19:21, Dietmar Maurer wrote:
>> On 09.02.21 16:45, Aaron Lauterer wrote:
>>> When installing the ha-simulator on a PVE node to start it via ssh with
>>> x11 forwarding, the xauth package helps to avoid `Unable to init server:
>>> Could not connect: Connection refused` errors.
>>
>> This is true for anything. X11 forwarding simply works that way. So I am quite unsure if we should add xauth here...> > Or is this a common practice (I am unaware of)?
> 
> Not really, but there are not much programs which are primarily run over
> SSH forwarding I know either.
> 
> If one really wants an active warning one could do a check like:
> 
> defined($ENV{'SSH_CONNECTION'}) && !(-x /usr/bin/xauth || -x /bin/xauth)
> 
> A bit crude but could work, and could be used to print out a early warning.

After short talk with Dietmar we came to the conclusion that this is far
harder to tell and neither configuring a dependency to xauth nor checking
if it's exist at runtime really guarantees anything and is not really
a hard coded must (you can allow unauthenticated forwarding where xauth
is not required).
At least `/etc/ssh/sshd_config` must also be configured correctly.

I'd add the latter to my proposed wording in the docs patch, IMO there's
really the best place to handle this.




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

end of thread, other threads:[~2021-02-10  7:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 15:45 [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency Aaron Lauterer
2021-02-09 15:45 ` [pve-devel] [PATCH v2 docs] ha-manager: simulator: add note for xauth when installing Aaron Lauterer
2021-02-10  7:19   ` Thomas Lamprecht
2021-02-09 18:21 ` [pve-devel] [PATCH v2 ha-manager] ha-simulator: add xauth dependency Dietmar Maurer
2021-02-10  7:29   ` Thomas Lamprecht
2021-02-10  7:42     ` 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