This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goserver. from fd34858 x2goserver.spec: fix EPEL build failures new 69da432 Fix gramma in error message (in x2goresume-session). new 7f0b260 x2gocleansessions: Call x2gormforward also on terminated sessions. This will make sure that re-assigned ports are really available on new session startup. new f2ca618 x2golistsessions(_root): Only update session state in session DB if x2goagent's state file really exists. This addresses a problem that occurs when x2golistsessions gets called via an x2gobroker-agent. The x2golistsessions script may show session states (--all-servers) of sessions on other servers that have session states files on their remote /tmp dirs. These files are not accessible for that x2golistsessions script and should simply be ignored. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: X2Go/Server/Agent/NX.pm | 12 ++++++++++++ debian/changelog | 11 +++++++++++ x2goserver/bin/x2golistsessions | 4 ++-- x2goserver/bin/x2goresume-session | 2 +- x2goserver/sbin/x2gocleansessions | 4 ++++ x2goserver/sbin/x2golistsessions_root | 4 ++-- 6 files changed, 32 insertions(+), 5 deletions(-) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 69da4320c0f4e60e68fc61c3491a72eb90bff7f5 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 17 10:30:47 2014 +0200 Fix gramma in error message (in x2goresume-session). --- debian/changelog | 1 + x2goserver/bin/x2goresume-session | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3711a19..7dffcee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -153,6 +153,7 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium SUSE system recognition). - x2gosqlitewrapper.c: Fix rpmlint error: no-return-in-nonvoid-function. Return the exitcode of execve(). + - Fix gramma in error message (in x2goresume-session). * debian/control: + Add D (x2goserver): libfile-which-perl. * x2goserver.spec: diff --git a/x2goserver/bin/x2goresume-session b/x2goserver/bin/x2goresume-session index e7a4e37..b4930d9 100755 --- a/x2goserver/bin/x2goresume-session +++ b/x2goserver/bin/x2goresume-session @@ -84,7 +84,7 @@ do i=$(($i+1)) if [ $i -gt 45 ] then - echo "Error: taking too long to suspend session. Possible session is damaged" + echo "Error: taking too long to suspend session. It is possible that the session is damaged." exit -1; fi STATE=`$X2GO_LIB_PATH/x2gogetagentstate "$SESSION_NAME"` -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 7f0b260577df3dfa666294833610d4a1c02fdb9d Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 17 10:32:15 2014 +0200 x2gocleansessions: Call x2gormforward also on terminated sessions. This will make sure that re-assigned ports are really available on new session startup. --- debian/changelog | 3 +++ x2goserver/sbin/x2gocleansessions | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7dffcee..85a5ebc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -154,6 +154,9 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium - x2gosqlitewrapper.c: Fix rpmlint error: no-return-in-nonvoid-function. Return the exitcode of execve(). - Fix gramma in error message (in x2goresume-session). + - x2gocleansessions: Call x2gormforward also on terminated sessions. This + will make sure that re-assigned ports are really available on new session + startup. * debian/control: + Add D (x2goserver): libfile-which-perl. * x2goserver.spec: diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions index 5fad4b2..1ee636d 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -178,6 +178,8 @@ elsif ($pid == 0 ) } syslog('debug', "@sinfo[1]: unmounting all shares"); system( "su", "@sinfo[11]", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]"); + #remove port forwarding + system("su", "@sinfo[11]", "-c", "$x2go_lib_path/x2gormforward @sinfo[1]"); } elsif (! check_pid (@sinfo[0],@sinfo[1],@sinfo[12])) { @@ -230,6 +232,8 @@ elsif ($pid == 0 ) system("su", "@sinfo[11]", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]"); system("su", "@sinfo[11]", "-c", "x2goterminate-session @sinfo[1]"); syslog('debug', "@sinfo[1] has been requested for termination via the session DB"); + #remove port forwarding + system("su", "@sinfo[11]", "-c", "$x2go_lib_path/x2gormforward @sinfo[1]"); } } } -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit f2ca618e13ef9dbca9a0eba2147908f0301de13a Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 17 11:17:42 2014 +0200 x2golistsessions(_root): Only update session state in session DB if x2goagent's state file really exists. This addresses a problem that occurs when x2golistsessions gets called via an x2gobroker-agent. The x2golistsessions script may show session states (--all-servers) of sessions on other servers that have session states files on their remote /tmp dirs. These files are not accessible for that x2golistsessions script and should simply be ignored. Conflicts (resolved by Mike Gabriel): x2goserver/bin/x2golistsessions x2goserver/sbin/x2golistsessions_root --- X2Go/Server/Agent/NX.pm | 12 ++++++++++++ debian/changelog | 7 +++++++ x2goserver/bin/x2golistsessions | 4 ++-- x2goserver/sbin/x2golistsessions_root | 4 ++-- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/X2Go/Server/Agent/NX.pm b/X2Go/Server/Agent/NX.pm index 308eff0..eca431c 100644 --- a/X2Go/Server/Agent/NX.pm +++ b/X2Go/Server/Agent/NX.pm @@ -71,6 +71,18 @@ sub session_is_running return 0; } +sub has_agent_state_file +{ + my $sess=@_[0]; + my $user=@_[1]; + my $stateFile = "/tmp/.x2go-".$user."/C-".$sess."/state"; + if ( -e $stateFile ) + { + return 1; + } + return 0; +} + sub get_agent_state { my $sess=@_[1]; diff --git a/debian/changelog b/debian/changelog index 85a5ebc..b913469 100644 --- a/debian/changelog +++ b/debian/changelog @@ -157,6 +157,13 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium - x2gocleansessions: Call x2gormforward also on terminated sessions. This will make sure that re-assigned ports are really available on new session startup. + - x2golistsessions(_root): Only update session state in session DB if + x2goagent's state file really exists. This addresses a problem that occurs + when x2golistsessions gets called via an x2gobroker-agent. The + x2golistsessions script may show session states (--all-servers) of + sessions on other servers that have session states files on their remote + /tmp dirs. These files are not accessible for that x2golistsessions script + and should simply be ignored. (Fixes: #638). * debian/control: + Add D (x2goserver): libfile-which-perl. * x2goserver.spec: diff --git a/x2goserver/bin/x2golistsessions b/x2goserver/bin/x2golistsessions index 91dedfa..fa21f7b 100755 --- a/x2goserver/bin/x2golistsessions +++ b/x2goserver/bin/x2golistsessions @@ -25,7 +25,7 @@ use Sys::Hostname; use Sys::Syslog qw( :standard :macros ); use X2Go::Server::DB qw(db_listsessions db_listsessions_all db_changestatus); -use X2Go::Server::Agent qw(session_is_suspended session_is_running); +use X2Go::Server::Agent qw(session_is_suspended session_is_running has_agent_state_file); use X2Go::Log qw(loglevel); use X2Go::Utils qw( system_capture_stdout_output is_true ); @@ -70,7 +70,7 @@ for (my $i=0;$i<@outp;$i++) { print "@outp[$i]\n"; } - else + else if (has_agent_state_file(@sinfo[1], @sinfo[11])) { if (@sinfo[4]eq 'R') { diff --git a/x2goserver/sbin/x2golistsessions_root b/x2goserver/sbin/x2golistsessions_root index 5cbff3d..87149be 100755 --- a/x2goserver/sbin/x2golistsessions_root +++ b/x2goserver/sbin/x2golistsessions_root @@ -25,7 +25,7 @@ use Sys::Syslog qw( :standard :macros ); use X2Go::Log qw(loglevel); use X2Go::Utils qw(system_capture_stdout_output); -use X2Go::Server::Agent qw(session_is_suspended); +use X2Go::Server::Agent qw(session_is_suspended has_agent_state_file); my $x2go_lib_path = system_capture_stdout_output("x2gopath", "libexec"); openlog($0,'cons,pid','user'); @@ -51,7 +51,7 @@ for (my $i=0;$i<@outp;$i++) { print "@outp[$i]\n"; } - else + else if (has_agent_state_file(@sinfo[1],@sinfo[11])) { if (@sinfo[4]eq 'R') { -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git