-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 restartability to sesman #3346
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bfa34f4
to
63c2e18
Compare
64b6d99
to
bdb4654
Compare
I'll try this next. |
I've added a minor update to this wiki page documenting the recovery directory used by this PR. https://github.com/neutrinolabs/xrdp/wiki/The-socketdir-directory |
This function does not need to have global scope.
The function sesexce_scp_data_in in sesexec.c is a development artefact and can safely be removed
This is used by sesman to connect to sockets in the restart directory.
bdb4654
to
b060cc0
Compare
Adds a module which can be used when sesman is restarting. This is initially used to rediscover sessions from a previous run.
Also add useful comment to session_send_term()
The module is a dummy to be filled in later Other structural changes to sesexec:- 1) A failure of sesman needs to be detected and handled without causing sesexec to exit 2) If sesexec exits, the session can never be rediscovered. sesexec must be robust enough to stay up for the lifetime of the session so that the discovery function always works. 3) There is a mechanism for sesexec to terminate the session, but it doesn't work, as SIGCHLD is not processed while we are waiting for the session to finish. This needs fixing.
These sesexec functions are needed for the discovery module to function.
Add functionality to sesexec discovery module to enable sesman restarts.
The KillMode of process allows an xrdp connection to survive a reatart of the xrdp process. This is of minimal benefit, as a user can always simply reconnect - the session will survive the restart. The downside is that xrdp will not benefit from any security fixes, and may well end up out-of-sync with sesman.
b060cc0
to
0220fa4
Compare
A log message has been added so that during session discovery a list of discovered sessions can be generated.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is now ready for review.
Fixes #800
Depends on #3328
See also #819
This PR allows for sesman to be restarted without losing sessions.
A restart of xrdp will still drop connections, but these can easily be restarted.
In brief, the design is this (I can add more details around this):-