From mike.gabriel@das-netzwerkteam.de  Fri Oct 17 10:46:51 2014
Received: (at 638) by bugs.x2go.org; 17 Oct 2014 08:46:52 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from freya.das-netzwerkteam.de (freya.das-netzwerkteam.de [88.198.48.199])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id AAD725DBC9
	for <638@bugs.x2go.org>; Fri, 17 Oct 2014 10:46:51 +0200 (CEST)
Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [78.46.204.98])
	by freya.das-netzwerkteam.de (Postfix) with ESMTPS id 66CCC160B;
	Fri, 17 Oct 2014 10:46:51 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 489CD3BAD8;
	Fri, 17 Oct 2014 10:46:51 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de
Received: from grimnir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (grimnir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id ZS8EjPrcGpHm; Fri, 17 Oct 2014 10:46:51 +0200 (CEST)
Received: from grimnir.das-netzwerkteam.de (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTPS id 1165D3B8F0;
	Fri, 17 Oct 2014 10:46:51 +0200 (CEST)
Received: from m-031.informatik.uni-kiel.de (m-031.informatik.uni-kiel.de
 [134.245.254.31]) by mail.das-netzwerkteam.de (Horde Framework) with HTTP;
 Fri, 17 Oct 2014 08:46:51 +0000
Date: Fri, 17 Oct 2014 08:46:50 +0000
Message-ID: <20141017084650.Horde.UQ-MPzuyDBASoKVt2c6o2Q8@mail.das-netzwerkteam.de>
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: 638@bugs.x2go.org
Cc: Stephan Diehl <stephan.diehl@opensolutions.net>
Subject: Re: [X2Go-Dev] Bug#638: broker agent in LOCAL mode cannot find
 state file
In-Reply-To: <20141011090348.Horde.cSPXl7mT4EdtTMtded6DRg1@mail.das-netzwerkteam.de>
User-Agent: Internet Messaging Program (IMP) H5 (6.2.2)
Accept-Language: en,de
Organization: DAS-NETZWERKTEAM
X-Originating-IP: 134.245.254.31
X-Remote-Browser: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101
 Firefox/32.0 Iceweasel/32.0
Content-Type: multipart/signed; boundary="=_hl_r7ieggyCXruNJ0sbD8g7";
 protocol="application/pgp-signature"; micalg=pgp-sha1
MIME-Version: 1.0

This message is in MIME format and has been PGP signed.

--=_hl_r7ieggyCXruNJ0sbD8g7
Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Control: reassign -1 x2goserver
Control: found -1 4.0.1.18

Hi Stefan,

On  Sa 11 Okt 2014 11:03:48 CEST, Mike Gabriel wrote:

> Package: x2gobroker
> Severity: important
> Version: 0.3.0.0
>
> Since X2Go Server 4.0.1.16, all session relevant files moved to=20=20
>=20/tmp/.x2go-<user>. In $HOME/.x2go there only is a symlink to the=20=20
>=20session dir on /tmp.
>
> This change breaks x2gobroker-agent in LOCAL mode (evoked on the=20=20
>=20broker host itself, assuming all session files are available).
>
> In LOCAL mode, x2gobroker-agent is evoked on the X2Go Broker host=20=20
>=20itself and assumes that it can access all session files in=20=20
>=20$HOME/.x2go/C-<session>.
>
> But what it finds is a dangling symlink to a non-existent=20=20
>=20C-<session> dir in /tmp/.x2go-<user>.
>
> The wanted session dir, of course, can only be found on
>
>   X2Go-Server-node-N:/tmp/.x2go-<user>/C-<session>

This issue should actually be silenced (not really fixed, as it is not=20=
=20
fixable)=20in X2Go Server.

Most of the session manipulation happens via the X2Go Server node's=20=20
x2gocleansessions=20daemon script.

The x2golistsessions command (evoked by x2gobroker-agent), which=20=20
triggers=20the observed bug, does not necessarily need access to the=20=20
session=20state file. If it can gain access, it will check the session=20=
=20
state,=20and update the session DB, if the DB value differs from the=20=20
actual=20state in the session state file (the session state file should=20=
=20
be=20more up-to-date).

If we omit this DB update in x2golistsessions, we need to rely on a=20=20
working=20x2gocleansessions daemon, which should still be enough.

Thus, I will test for the existence of the state file in=20=20
x2golistsessions=20first and then execute the DB update code. If there=20=
=20
is=20no session state file, we should be clear, as well (and need to=20=20
rely=20on x2gocleansessions on the X2Go Server nodes).

Mike


--=20

DAS-NETZWERKTEAM
mike=20gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.x=
fb

--=_hl_r7ieggyCXruNJ0sbD8g7
Content-Type: application/pgp-signature
Content-Description: Digitale PGP-Signatur
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIbBAABAgAGBQJUQNd6AAoJEJr0azAldxsxZhoP+LD6WbV4tTP07iqh94RrNPMb
wvpb+ZXXGRrzFhM0MmGIFg0un9KCk/36PkdyRfhICdnApm3+ZJG/SGpA6P1UAUps
jiKiD+Qit2q3DBGEyMx4ItDWPz+MCZmQ6L6uU6/q3PpiPEaIicZuAxTHrE2eNl5W
WlDgyMPyEyGAwwsXJfUhryl9y3g9gHSbLaErL6sdIWpJLjXP6M3TE28taMybVYm9
ZXfB+CbfGbMHftH0uUoWS3wvqr9HdKpV9U2TeCxx72Lb9nzJwMgiTFFfm6etqS1w
TuwmJFvy7Dn780hG/XzBLB6FYjUA3iwuW484xREajqhw5EWA7VC0DTsqmR7Q4XUg
NbE/0TOE4RYoP8MFFWiHyNUIbTpLmP+sBeMyFDk2P4KHvPLrQauFfOIzaxxdY6tC
vIl9pO6Fmk2ah1SUaDNaHb1Zfr1aon6FUyGi6v3rt7XDrpAgeOMbtyLYeHr3UxJI
ZQCGYgsV4iJaftR6HJ23/XL3RHEW1WipEE+38mgj1LLWRiHqLShFxRVX6E02iqWy
yLAw/2iL17K199as6cEidAnF25AXmaJgI1eooV3tFW5YbAtvCY9i6c0Eis0+gH/f
yKyvYDzc7U14VPfPzCY0b3iYpiJdmBgzZviDftO7mlfnuoG392Cl7PVbfWo1hPnC
w7Fp4w05C1oC/fQZO/c=
=U1DU
-----END PGP SIGNATURE-----

--=_hl_r7ieggyCXruNJ0sbD8g7--

