Open vermaden opened 6 months ago
Same effect with regular poudriere-3.4.1 from 'latest' pkg(8) branch.
Only I have that problem?
Other interesting behavior ... I did the following:
/usr/local
is gone./var/db/pkg
dir.Now after these steps I deleted the 14.1-BETA1 Poudriere Jail and added it again - and this time /usr/local
was OK.
Investigating more ...
I can confirm!
I followed your guide and have been in the same situation, I thought I was doing something wrong at first so I tested with 13.3-RELEASE and 14.1-RELEASE just to be sure, but the result is the same.
Once the command poudriere jail -c -j ...
is invoked, everything in /usr/local is vanished except the dir zroot/usr/local/poudriere
and the sub directories, so the jail is correctly installed at least.
All packages installed previously are unusable, poudriere included, so in the end the system is messed up.
I did tried to set a VM with more space 50GB and more RAM 25G, but it didn't change anything. All I can say is I am glad the tests were only in VM.
Host: Filesystem is ZFS $: freebsd-version -kru ; uname -rms 13.3-RELEASE-p1 13.3-RELEASE-p1 13.3-RELEASE-p2 FreeBSD 13.3-RELEASE-p1 amd64
poudriere version: poudriere-3.4.1_1
@vermaden
Following your guide, in the file /usr/local/etc/poudriere.conf
both variables BASEFS and ZROOTFS point to the same location, that's where the problem is I think.
When ZROOTFS=/poudriere
,as it is by default, poudriere works normally.
I skipped that part too: zfs create -o mountpoint=/usr/local/poudriere zroot/poudriere
I came to that conclusion because I didn't notice any issue while using UFS and your guide minus the ZFS parts.
PS:
Just a quick note regarding your guide, the package ccache-memcached
isn't available anymore apparently, I install ccache
instead. Apart from that it was very helpful and well detailed, thank you!
Can you share Your /usr/local/etc/poudriere.conf
file? The one that DOES NOT make the /usr/local
deletion?
Sure, here it is:
root@vmp ~ : cat /usr/local/etc/poudriere.conf
ZPOOL=zroot
BASEFS=/usr/local/poudriere
ZROOTFS=/poudriere
FREEBSD_HOST=https://download.freebsd.org
POUDRIERE_DATA=/usr/local/poudriere/data
CHECK_CHANGED_OPTIONS=verbose
CHECK_CHANGED_DEPS=yes
PKG_REPO_SIGNING_KEY=/usr/local/etc/ssl/keys/poudriere.key
URL_BASE=http://192.168.3.129/
USE_TMPFS=yes
TMPFS_LIMIT=8
MAX_MEMORY=22
MAX_FILES=2048
DISTFILES_CACHE=/usr/ports/distfiles
KEEP_OLD_PACKAGES=yes
KEEP_OLD_PACKAGES_COUNT=3
CHECK_CHANGED_OPTIONS=verbose
CHECK_CHANGED_DEPS=yes
CCACHE_DIR=/var/ccache
RESTRICT_NETWORKING=no
Also zfs datasets:
root@vmp ~ : zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 5.11G 31.2G 96K /zroot
zroot/ROOT 2.30G 31.2G 96K none
zroot/ROOT/13.3-RELEASE_2024-06-06_021114 8K 31.2G 1.38G /
zroot/ROOT/default 2.30G 31.2G 2.05G /
zroot/poudriere 2.59G 31.2G 96K /zroot/poudriere
zroot/poudriere/jails 1.69G 31.2G 96K /zroot/poudriere/jails
zroot/poudriere/jails/13-3-R-amd64 1.69G 31.2G 1.69G /usr/local/poudriere/jails/13-3-R-amd64
zroot/poudriere/ports 924M 31.2G 96K /zroot/poudriere/ports
zroot/poudriere/ports/default 924M 31.2G 924M /usr/local/poudriere/ports/default
zroot/tmp 104K 31.2G 104K /tmp
zroot/usr 220M 31.2G 96K /usr
zroot/usr/home 128K 31.2G 128K /usr/home
zroot/usr/ports 219M 31.2G 219M /usr/ports
zroot/usr/src 96K 31.2G 96K /usr/src
zroot/var 768K 31.2G 96K /var
zroot/var/audit 96K 31.2G 96K /var/audit
zroot/var/crash 96K 31.2G 96K /var/crash
zroot/var/log 240K 31.2G 240K /var/log
zroot/var/mail 128K 31.2G 128K /var/mail
zroot/var/tmp 112K 31.2G 112K /var/tmp
Thank You - will look into that and test.
So ... it seams that this bug exists only if ZROOTFS
is set to the same value as BASEFS
in the /usr/local/etc/poudriere.conf
file.
Yes, it looks like the root of the issue.
Not a big deal once you aware of it, the workaround is pretty simple.
But the damage caused by this "issue" is surprising tough, I didn't expect that since it's my first round with poudriere
, so I am glad we found how to fix this :-)
Should I submit it somewhere else? Like submit a FreeBSD BUG also?
I don't know mate, I think we are in the right place, at the bottom of the manpage it refers to this very git repository for reporting issue. That being said there are few issues reported on bugzilla too
I am under the impression that everybody just go with the default variables ZROOTFS=/poudriere
and BASEFS=/usr/local/poudriere
, that's why no one is really affected by this issue yet.
But if it was working before (which I can't tell since I am new to this), and not anymore then I think it deserves to get a little attention, if it happened to us it will touch others too at some point.
Not sure also - then added PR here:
Regards, vermaden
Good job thank you ;)
Prerequisites
Describe
The /usr/local is (mostly) deleted after executing this command:
Reproduce
List of commands I have typed in fresh FreeBSD 14.1-BETA1 system inside Bhyve VM:
Messages on the screen:
After that the /usr/local is mostly done.
Environment
Other
I have gathered all executed commands during the
poudriere jail
withexecsnoop
fromdtrace-toolkit
like that.I also executed the
poudriere jail
withsh -x
prefix.Both files attached below. DTRACE.log POUDRIERE.log