help-guix
[Top][All Lists]
Advanced

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

Re: Packaging Slurm


From: Jean-Christophe HAESSIG
Subject: Re: Packaging Slurm
Date: Fri, 18 Mar 2022 16:05:28 +0000

On 17/03/2022 19:25, Ludovic Courtès wrote:
> Hello,
Hi,

> Can you try with:
> 
>    GUIX_EXECUTION_ENGINE=fakechroot ./bin/sulrmbdb …
> 
> assuming you’re using a -RR pack?

Yes, there's the relevant output :

# strace -f -E GUIX_EXECUTION_ENGINE=fakechroot -E 
LD_LIBRARY_PATH=/opt/slurm/gnu/store/j417whqiy5gz2rbmlnknla3wl43jgk1z-profile/lib/
 
/opt/slurm/sbin/slurmdbd -D

newfstatat(AT_FDCWD, 
"/gnu/store/ygljcnlacasf5vc164pm4dp9ysc5ddbq-slurm-mysql-19.05-19.05.8/sbin//slurmdbd",
 
0x7ffdaf6e4f60, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
mkdir("/tmp/guix-exec-5lyvIe", 0700)    = 0

[...]

[pid 10534] connect(6, {sa_family=AF_UNIX, 
sun_path="/tmp/guix-exec-5lyvIe/run/mysqld/mysqld.sock"}, 46) = 0
[pid 10534] fcntl(6, F_SETFL, O_RDONLY) = 0
[pid 10534] setsockopt(6, SOL_SOCKET, SO_RCVTIMEO, 
"\36\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
[pid 10534] setsockopt(6, SOL_SOCKET, SO_SNDTIMEO, 
"\36\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
[pid 10534] setsockopt(6, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP 
(Operation not supported)
[pid 10534] setsockopt(6, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
[pid 10534] recvfrom(6, "b\0\0\0\n5.5.5-10.1.37-MariaDB-0+deb"..., 
16384, MSG_DONTWAIT, NULL, NULL) = 102

[...]

[pid 10630] setgroups(2, [3000, 51692]) = 0
[pid 10630] getegid()                   = 0
[pid 10630] setgid(3000)                = 0
[pid 10630] getuid()                    = 0
[pid 10630] setuid(100020)              = 0
[pid 10630] prctl(PR_SET_DUMPABLE, 1)   = 0

[...]

[pid 10534] connect(7, {sa_family=AF_UNIX, 
sun_path="/tmp/guix-exec-5lyvIe/run/mysqld/mysqld.sock"}, 46) = -1 
EACCES (Permission denied)
[pid 10534] close(7)                    = 0

[...]

[pid 10534] newfstatat(2, "", {st_mode=S_IFIFO|0600, st_size=0, ...}, 
AT_EMPTY_PATH) = 0
[pid 10534] write(2, "slurmdbd: error: mysql_real_conn"..., 131slurmdbd: 
error: mysql_real_connect failed: 2002 Can't connect to local MySQL 
server through socket '/run/mysqld/mysqld.sock' (13)
) = 131
[pid 10534] poll([{fd=2, events=POLLOUT}], 1, 5000) = 1 ([{fd=2, 
revents=POLLOUT}])
[pid 10534] newfstatat(2, "", {st_mode=S_IFIFO|0600, st_size=0, ...}, 
AT_EMPTY_PATH) = 0
[pid 10534] write(2, "slurmdbd: error: Problem getting"..., 47slurmdbd: 
error: Problem getting cache of data
) = 47

[...]

[pid 10534] newfstatat(2, "", {st_mode=S_IFIFO|0600, st_size=0, ...}, 
AT_EMPTY_PATH) = 0
[pid 10534] write(2, "slurmdbd: error: unable to re-co"..., 59slurmdbd: 
error: unable to re-connect to as_mysql database
) = 59
[pid 10534] futex(0x7fa53885f910, 
FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, 10535, NULL, 0xffffffff 
<unfinished ...>
[pid 10536] <... clock_nanosleep resumed> 0x7fa53875dd90) = 0
[pid 10536] clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=5, tv_nsec=0}, 
0x7fa53875dd90) = 0
[pid 10536] clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=5, tv_nsec=0}, 
0x7fa53875dd90) = 0
[pid 10536] clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=5, tv_nsec=0}, 
0x7fa53875dd90) = 0
[pid 10536] clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=5, tv_nsec=0}, 
slurmdbd: error: We need a connection to run this

The program hangs from there and is inoperative. The socket to the 
database, which is in mode ugo+rwx is successfully used once, then the 
program fiddles with its groups, gid, uid and then can't open it 
anymore. I see that the /tmp/guix-exec-xxxx directory is created with 
0700 rights, which means it cannot be traversed anymore when the uid of 
the program has changed.


> Here we could have a separate output maybe:
> 
>    
> https://guix.gnu.org/manual/devel/en/html_node/Packages-with-Multiple-Outputs.html

I'll give it a try

> 
> Where “battle from /gnu/store” is the chicken-and-egg when booting,
> right?  (That is, if /gnu/store is on NFS, then how do you boot.)

Sure, it is even a problem with guix on a foreign distro, if you need 
some of the software to be managed locally and the rest by shared nfs.
My best bet would be to have guix recompiled to use an alternate 
location as the store and the statedir, have it manage the local system 
and let regular users take advantage of substitutes. I don't feel this 
would be straightforward however.

Thanks,
JCH

reply via email to

[Prev in Thread] Current Thread [Next in Thread]