www.cendio.com
Bug 4699 - be more robust against failing to remove session directories
: be more robust against failing to remove session directories
Status: CLOSED FIXED
: ThinLinc
VSM Agent
: trunk
: PC Unknown
: P2 Normal
: 4.5.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2013-06-12 10:07 by
Modified: 2015-09-25 14:01 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2013-06-12 10:07:22
We cannot be 100% certain that we will be able to remove an old session
directory (#.ended). If we fail to remove the old one, then tl-session will in
turn fail to rename the current session to #.ended.

We can avoid the breakage if we rename the #.ended directory before we start to
remove it. E.g. #.cleanup.XXXXXX. It is important that there are some random
characters in the name in case this happens multiple times.

Note that this still means that crud will be left on disk for the administrator
to deal with. That is the case today as well though, just that we generally get
more breakage in ThinLinc when we fail to move directories out of the way like
expected.



At the same time, we might want to have a look at the cleanup routine to make
it more robust against files that cannot be removed. E.g. it shouldn't abort on
the first file that fails, but continue and remove as many as possible.

We should also log failures better/more.
------- Comment #1 From cendio 2015-08-12 13:53:06 -------
This won't work as the user cannot rename those directories (for security
reasons).

Changing summary to something more generic.
------- Comment #2 From cendio 2015-08-12 13:53:31 -------
(In reply to comment #0)
> 
> At the same time, we might want to have a look at the cleanup routine to make
> it more robust against files that cannot be removed. E.g. it shouldn't abort on
> the first file that fails, but continue and remove as many as possible.
> 

This is being done on bug 5110.
------- Comment #3 From cendio 2015-08-12 13:54:32 -------
A different idea is to stop using the simple <display>.ended naming. We could
do <display>.<time>.ended. A slightly longer and more confusing name, but the
risk of conflicting names is basically zero.
------- Comment #4 From cendio 2015-08-12 14:52:19 -------
Fixed in r30659.

Tester should put an unremovable file/dir in a session directory and make sure
the system gracefully works around that directory.
------- Comment #5 From cendio 2015-08-14 08:50:14 -------
(In reply to comment #4)
> Fixed in r30659.
> 
> Tester should put an unremovable file/dir in a session directory and make sure
> the system gracefully works around that directory.

Reproduced issue using ThinLinc 4.4.0, and verified that the problem is solved
using build 4857.