<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font size="4" face="monospace">Following up on xfs and reflinks,
it appears they are enabled on my out-of-box RHEL9.0. Fwiw, this
is a VBox VM however so if the FC34 system which works
correctly, but is using btrfs.<br>
</font></p>
<p><font size="4" face="monospace">As always, appreciate any
help/references.</font></p>
<p><font size="4" face="monospace">TIA</font></p>
<p><font size="4" face="monospace">-Tom<br>
</font></p>
<p><font size="4" face="monospace">[toma@localhost ~]$ xfs_info /<br>
meta-data=/dev/mapper/rhel-root isize=512 agcount=4,
agsize=4185600 blks<br>
= sectsz=512 attr=2,
projid32bit=1<br>
= crc=1 finobt=1,
sparse=1, rmapbt=0<br>
= reflink=1 bigtime=1
inobtcount=1<br>
data = bsize=4096 blocks=16742400,
imaxpct=25<br>
= sunit=0 swidth=0 blks<br>
naming =version 2 bsize=4096 ascii-ci=0,
ftype=1<br>
log =internal log bsize=4096 blocks=8175,
version=2<br>
= sectsz=512 sunit=0 blks,
lazy-count=1<br>
realtime =none extsz=4096 blocks=0,
rtextents=0<br>
[toma@localhost ~]$ <br>
<br>
</font></p>
<div class="moz-forward-container"><br>
<br>
-------- Forwarded Message --------
<table class="moz-email-headers-table" cellspacing="0"
cellpadding="0" border="0">
<tbody>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Subject:
</th>
<td>Re: systemd-devel Digest, Vol 148, Issue 2</td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Date: </th>
<td>Thu, 4 Aug 2022 11:22:32 -0400</td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">From: </th>
<td>Thomas Archambault <a class="moz-txt-link-rfc2396E" href="mailto:toma@TPArchambault.com"><toma@TPArchambault.com></a></td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Reply-To:
</th>
<td><a class="moz-txt-link-abbreviated" href="mailto:toma@TPArchambault.com">toma@TPArchambault.com</a></td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">To: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:systemd-devel-request@lists.freedesktop.org">systemd-devel-request@lists.freedesktop.org</a></td>
</tr>
</tbody>
</table>
<br>
<br>
Thank you Lennart. Very much appreciate the quick and clear
response.<br>
<br>
You're absolutely correct about the btrfs/xfs difference between
the working FC34 system and the problematic RHEL9.0 system:<br>
<br>
<blockquote type="cite">/dev/mapper/rhel-root on / type xfs </blockquote>
(rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)<br>
<br>
My strace output did indicate that there are copying going on but
I did not know if that that was a problem or not. Obviously it can
be in terms of start-up time and UX w/xfs.<br>
<br>
- Tom<br>
<br>
<br>
On 8/4/22 08:00, <a class="moz-txt-link-abbreviated" href="mailto:systemd-devel-request@lists.freedesktop.org">systemd-devel-request@lists.freedesktop.org</a>
wrote:<br>
<blockquote type="cite">Send systemd-devel mailing list
submissions to<br>
<a class="moz-txt-link-abbreviated" href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a class="moz-txt-link-abbreviated" href="mailto:systemd-devel-request@lists.freedesktop.org">systemd-devel-request@lists.freedesktop.org</a><br>
<br>
You can reach the person managing the list at<br>
<a class="moz-txt-link-abbreviated" href="mailto:systemd-devel-owner@lists.freedesktop.org">systemd-devel-owner@lists.freedesktop.org</a><br>
<br>
When replying, please edit your Subject line so it is more
specific<br>
than "Re: Contents of systemd-devel digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. systemd-nspawn container not starting on RHEL9.0<br>
(Thomas Archambault)<br>
2. Re: systemd-nspawn container not starting on RHEL9.0<br>
(Lennart Poettering)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 3 Aug 2022 15:40:21 -0400<br>
From: Thomas Archambault <a class="moz-txt-link-rfc2396E" href="mailto:toma@TPArchambault.com"><toma@TPArchambault.com></a><br>
To: <a class="moz-txt-link-abbreviated" href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
Subject: [systemd-devel] systemd-nspawn container not starting
on<br>
RHEL9.0<br>
Message-ID:
<a class="moz-txt-link-rfc2396E" href="mailto:2d4567ae-f0e5-9e6a-10fe-9592498c6c6e@TPArchambault.com"><2d4567ae-f0e5-9e6a-10fe-9592498c6c6e@TPArchambault.com></a><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
Good day everyone on the dev list,<br>
We are adding an analysis tool to our application that uses the
host's<br>
rootfs as one of its inputs.<br>
<br>
As a proof of concept, we used systemd-nspawn on Fedora 34 to
create an<br>
isolated container environment using the host's rootfs as the<br>
container's rootfs and things worked correctly and as expected.
The<br>
host's rootfs is analyzed with tmp and results files generated
within<br>
the container without persistent modifications affecting the
host's<br>
rootfs. Since RHEL is our ultimate target platform, I've been
trying to<br>
duplicate our work over RHEL9.0 without success with the
container not<br>
being instantiated.<br>
<br>
I've tried to boil down the duplication code to the simplest
example,<br>
which is also an example in the man page $ sudo systemd-nspawn
-xbD/. As<br>
with my prototyping, the container does not seem to be
instantiated.<br>
Any help with troubleshooting, or specific known issues, or
requests for<br>
more data would be appreciated.<br>
<br>
TIA<br>
tparchambault<br>
ps: Regarding security - selinux is in Permissive mode. I do not
know if<br>
seccomp filters are getting in the way or not; This is an
out-ot-the-box<br>
RHEL9.0 base workstation install. In the FC34 prototype, I did
need to<br>
allow certain syscalls via --system-call-filter in order to get
a daemon<br>
within the container to run correctly but afaik that should have
no<br>
bearing on the instantiation of the container.<br>
<br>
<br>
==== On a RHEL9.0 host bash session ====<br>
<br>
[toma@localhost ~]$ systemctl --version<br>
systemd 250 (250-6.el9_0)<br>
+PAM +AUDIT +SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT
+GNUTLS<br>
+OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN -IPTC
+KMOD<br>
+LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE
+BZIP2 +LZ4<br>
+XZ +ZLIB +ZSTD -BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT<br>
default-hierarchy=unified<br>
<br>
[toma@localhost ~]$ uname -a<br>
Linux localhost.localdomain 5.14.0-70.17.1.el9_0.x86_64 #1 SMP
PREEMPT<br>
Tue Jun 14 11:32:10 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux<br>
[toma@localhost ~]$<br>
<br>
[toma@localhost ~]$ sudo time systemd-nspawn -D / -xb<br>
^C^C^C^C^CCommand terminated by signal 15<br>
40.81user 298.75system 6:29.72elapsed 87%CPU (0avgtext+0avgdata<br>
8524maxresident)k<br>
205032inputs+0outputs (0major+3287minor)pagefaults 0swaps<br>
[toma@localhost ~]$<br>
<br>
==== In another bash session on the same host ====<br>
[toma@localhost ~]$ sudo machinectl list<br>
[sudo] password for toma:<br>
No machines.<br>
[toma@localhost ~]$ sudo pkill nspawn<br>
[toma@localhost ~]$<br>
<br>
== In the original host bash session, w/increased logging and
strace<br>
capture ==<br>
<br>
[toma@localhost ~]$ sudo SYSTEMD_LOG_LEVEL=debug strace -o<br>
Development/nspawn.strace.rhel90.out systemd-nspawn -D / -xb<br>
[sudo] password for toma:<br>
Setting RLIMIT_CPU to infinity.<br>
Setting RLIMIT_FSIZE to infinity.<br>
Setting RLIMIT_DATA to infinity.<br>
Setting RLIMIT_STACK to 8388608:infinity.<br>
Setting RLIMIT_CORE to 0:infinity.<br>
Setting RLIMIT_RSS to infinity.<br>
Setting RLIMIT_NPROC to 14657.<br>
Setting RLIMIT_NOFILE to 1024:524288.<br>
Setting RLIMIT_MEMLOCK to 65536.<br>
Setting RLIMIT_AS to infinity.<br>
Setting RLIMIT_LOCKS to infinity.<br>
Setting RLIMIT_SIGPENDING to 14657.<br>
Setting RLIMIT_MSGQUEUE to 819200.<br>
Setting RLIMIT_NICE to 0.<br>
Setting RLIMIT_RTPRIO to 0.<br>
Setting RLIMIT_RTTIME to infinity.<br>
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy<br>
Terminated<br>
[toma@localhost ~]$<br>
<br>
As with the first run, killed via pkill from the other terminal
session.<br>
<br>
Fwiw, on Fedora 34, the log debug output shows the instantiation
of the<br>
container after the "Found csgroup2..." line, with the container
working as<br>
documented eventually presenting the login prompt, i.e.<br>
<br>
...<br>
Setting RLIMIT_RTTIME to infinity.<br>
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy<br>
Spawning container fedora-1aabc34e0a52a82b on
/.#machine.6e49b8aa974c6f37.<br>
Press ^] three times within 1s to kill container.<br>
Outer child is initializing.<br>
Mounting / (MS_REC|MS_SLAVE "")...<br>
...<br>
<br>
[? OK? ] Finished Update UTMP about System Runlevel Changes.<br>
<br>
Fedora 34 (Workstation Edition)<br>
Kernel 5.11.12-300.fc34.x86_64 on an x86_64 (console)<br>
<br>
fedora-1aabc34e0a52a82b login:<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL:
<a class="moz-txt-link-rfc2396E" href="https://lists.freedesktop.org/archives/systemd-devel/attachments/20220803/359f5243/attachment-0001.htm"><https://lists.freedesktop.org/archives/systemd-devel/attachments/20220803/359f5243/attachment-0001.htm></a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 4 Aug 2022 09:30:26 +0200<br>
From: Lennart Poettering <a class="moz-txt-link-rfc2396E" href="mailto:lennart@poettering.net"><lennart@poettering.net></a><br>
To: Thomas Archambault <a class="moz-txt-link-rfc2396E" href="mailto:toma@tparchambault.com"><toma@tparchambault.com></a><br>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
Subject: Re: [systemd-devel] systemd-nspawn container not
starting on<br>
RHEL9.0<br>
Message-ID: <Yut1kq+IsLkSYdeg@gardel-login><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
On Mi, 03.08.22 15:40, Thomas Archambault
(<a class="moz-txt-link-abbreviated" href="mailto:toma@TPArchambault.com">toma@TPArchambault.com</a>) wrote:<br>
<br>
<blockquote type="cite">Good day everyone on the dev list,<br>
We are adding an analysis tool to our application that uses
the host's<br>
rootfs as one of its inputs.<br>
<br>
As a proof of concept, we used systemd-nspawn on Fedora 34 to
create an<br>
isolated container environment using the host's rootfs as the
container's<br>
rootfs and things worked correctly and as expected. The host's
rootfs is<br>
analyzed with tmp and results files generated within the
container without<br>
persistent modifications affecting the host's rootfs. Since
RHEL is our<br>
ultimate target platform, I've been trying to duplicate our
work over<br>
RHEL9.0 without success with the container not being
instantiated.<br>
<br>
I've tried to boil down the duplication code to the simplest
example, which<br>
is also an example in the man page $ sudo systemd-nspawn
-xbD/. As with my<br>
prototyping, the container does not seem to be instantiated.<br>
Any help with troubleshooting, or specific known issues, or
requests for<br>
more data would be appreciated.<br>
</blockquote>
"-x" is ephemeral mode. This means nspawn will make a copy of
the OS<br>
tree before booting into it, and remove it afterwards.<br>
<br>
"-x" on btrfs is very fast and space efficient, because btrfs
supports<br>
both snapshots and reflinks. nspawn will make a subvol snapshot
if the<br>
root you specify is a subvol. It will make reflink-based file
copies<br>
otherwise.<br>
<br>
Other file systems have a more 1990's feature set, i.e. no
reflinks<br>
nor snapshots. (modern xfs on very new kernels can support
reflinks if<br>
this is opt-in'ed to.) In that case we have to copy the data
files<br>
with their contents, and that's slow.<br>
<br>
Hence, what backing fs do you use?<br>
<br>
if you use non-btrfs it might hence simply be that we are busy<br>
individually copying all files...<br>
<br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Berlin<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
<br>
<br>
------------------------------<br>
<br>
End of systemd-devel Digest, Vol 148, Issue 2<br>
*********************************************<br>
<br>
</blockquote>
</div>
</body>
</html>