[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] could not make temporary directory: `/var/lib/condor/execute/dir_ Re: Fw: Xvfb | Docker Universe | Can't open display | (but works with docker run)



Hell Greg,

Thank you for your kind and clear answer.

I had sorted out the Xvbfâ problem as a typo (as I reported in the email.) I am not sure if it would be possible to use the xvbf-runâ program within the perlâ script that we inherited...

I surmised at some point that the problem is probably indeed just with Xmgrace.pm  because Ghostscript (also in that long perl script) did not complain at all until I fiddled around with the /tmp directory reassignment.

I will try your suggestion to add unset TMPDIRâ (I assume within the run.shâ executable that is transferred.)We had an electrical shut down (!) and I'll try as soon as I can connect again to the cluster!

In a later email I reported trying to use Singularity, as suggested buby Dima, but it failed and I am not clear about why, possibly because Singularity did not inherit or see the material installed within the Image.. or perhaps it is not seeing the internal PATH in the container that is created.

If the TMPDIR solution works that would be great!

THanks
Jean-Yves




From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of gthain@xxxxxxxxxxx <gthain@xxxxxxxxxxx>
Sent: Monday, November 1, 2021 4:13 PM
To: htcondor-users@xxxxxxxxxxx <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] could not make temporary directory: `/var/lib/condor/execute/dir_ Re: Fw: Xvfb | Docker Universe | Can't open display | (but works with docker run)
 

Hello:

A couple of things.  The Xvfb package is very useful to run programs that must start a gui on machines without screens.  This package usually comes with a very helpful starter program which takes care of starting the (virtual) graphics server, waiting until it is ready, setting the appropriate environment variables, running the actual user program, and shutting everything down at the end.  This is named

xvfb-run

and you can start your user problem under xvfb by simply running

xvfb-run my_gui_program some arguments

This may be easier and more reliable than setting DISPLAY manually.

Now, as far as the temporary directory problem, there's a pretty glaring bug in the Xmgrace.pm module when the environment variable TMPDIR is set, which condor does set.

Try adding the following to your startup script before perl runs:

unset TMPDIR

-greg

On 10/29/21 6:02 PM, htcondor-users@xxxxxxxxxxx wrote:
Hello again,

The error message: could not make temporary directory: `/var/lib/condor/execute/dir_33779/Graph_Xmgrace_23' etc

only appears on HTcondor when the perl script contains more than one call to xmgrace.
Adding permission changes before the perl script is called:

chmod g+w $TEMP
chmod g+w $TMPDIR
chmod a+rw ${PWD}
Assuming that ${PWD} is in fact the temporary /var/lib/condor/execute/dir_*

has no effect on the error even though it does change the permissions:

drwxrw-rw-. 2 390870428 390800513  202 Oct 29 22:48 .

But still the error persists.

It is rather strange... and the error does not occur on a the Mac when using docker runâ

Any idea?
JYS

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of htcondor-users@xxxxxxxxxxx <htcondor-users@xxxxxxxxxxx>
Sent: Friday, October 29, 2021 3:53 PM
To: htcondor-users@xxxxxxxxxxx <htcondor-users@xxxxxxxxxxx>
Cc: JEAN-YVES SGRO <jsgro@xxxxxxxx>
Subject: Re: [HTCondor-users] Fw: Xvfb | Docker Universe | Can't open display | (but works with docker run)
 
Hello Dima,

Thank you very much for taking the time to answer so promptly.
I am just an "end user" trying to make things work. (i tried many things before replying...)

I found the Display problem:  the following line is necessary to have Xvfb active (on DISPLAY named :99) and can be added to the script or source from /etc/bashrc
Xvfb :99 -ac &

However, I encounter another problem reported in the error output:

could not make temporary directory: `/var/lib/condor/execute/dir_33779/Graph_Xmgrace_23' at /usr/local/share/perl5/Chart/Graph/Xmgrace.pm line 136.

The directory name varies. This time it ends with 23â but another time it ended with 21â so it's not predictable.

Lines 135 and 136 from the Xmgrace.pm file say:
   135    # create tmpdir
   136    _make_tmpdir("_Xmgrace_"); # grace files should be saved for user tweaking
 
Is there a way to fix this permission issue?

I don't have these issues when running on the Mac: I "pushed" the image onto the hub, and it is available to test. I included the simple test.plâ file into the /homeâ directory on the image. In that case there is no need for -vâ to test:

This is what I can do on my Mac from a Terminal:

docker run -it --rm -w /home  jysgro/xmgrace-c7

This creates a new container, with interactive Terminal, which will be removed when using exitâ and goes directly into the /homeâ directory. There is a single file called test.plâ which can then be executed within the container with: perl test.plâ
When this is done, the /homeâ directory will contain 3 files:
test.pl  xmgrace1.agr  xmgrace1.png
and that means that the program worked fine.

If there is a temporary directory to create it is not a problem there but it is on HTCondor.
Is there a permission to be given so that temporary directories can be created ?

THank you!

Jean-Yves


From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of dmitri.maziuk@xxxxxxxxx <dmitri.maziuk@xxxxxxxxx>
Sent: Friday, October 29, 2021 12:52 PM
To: htcondor-users@xxxxxxxxxxx <htcondor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] Fw: Xvfb | Docker Universe | Can't open display | (but works with docker run)
 
On 2021-10-29 12:07 PM, JEAN-YVES SGRO via HTCondor-users wrote:

> Problem1: Docker Universeâ does not provide the same environment as docker runâ within the container.
> Problem2: Xvfb works fine within a docker runâ container but does not work when running as a Docker Universeâ job.
> Question: is there a way to make Xvbfâ work on HTcondor?

How does it "work fine" outside of condor?

Access to host XVfb is via a socket in /tmp/.X11-unix, are you mounting
it with `-v` for the non-condor runs? Or are you firing up Xvfb inside
the container?

For the former, my guess is you should be able to mount the socket as
per
https://htcondor.readthedocs.io/en/latest/admin-manual/setting-up-vm-docker-universes.html#the-docker-universe


Dima
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/