-
polyex
anyone have docker fully running on freebsd?
-
lognull
rwp: whassup dude? Hey, that high CPU load was really related to memory consumption. More precisely with swap activation.
-
polyex
i wanna make a freebsd server that can run docker images so linux schmucks can run crap on my box
-
lognull
polyex: you mean natively ?
-
polyex
dunno, just any way where it's actually usable
-
polyex
semi competitive with a linux host
-
lognull
well, there's already the o'good jails. I'm not sure if docker will work on FreeBSD the same way as linux. I think there's components deeply tied with linux kernel features
-
polyex
so what it's just hit or miss lognull?
-
polyex
there should be a docker testsuite that can fully run on freebsd to show that it's working or not
-
thedaemon
ironwail quake compiles just fine for anyone that plays quake 1.
-
polyex
in docker?
-
lognull
polyex: have you tried those examples from wiki? (
wiki.freebsd.org/Docker )
-
VimDiesel
Title: Docker - FreeBSD Wiki
-
lognull
While typing with you I made a quick read of this page and I must tell you that I was surprised with the reported progress... :o
-
polyex
it's very exciting
-
polyex
freebsd hosting docker is big
-
lognull
If I had the opportunity to chose, I would stick with jails ( with bastille ).
-
polyex
well ofc but sometimes someone wants to pay us to run a docker img whatever tf it is
-
lognull
s/chose/choose/
-
polyex
wanna do that with freebsd instead of lowering myself to linux
-
lognull
polyex: hey, you got a point there :o
-
polyex
so you use bastille btw? thoughts?
-
lognull
Not yet. But I can't wait to have a good hardware to test it.
-
polyex
seen runj?
-
lognull
I just have tried bhyve for small labs
-
polyex
another freebsd container thing
-
polyex
ya bhyve virt is tops
-
lognull
bhyve is one of my reasons to stick with FreeBSD. I mean OpenBSD and NetBSD hypervisors seems pretty good, but bhyve seems to have learned with big players. Not just the very basic virt like vbox.
-
lognull
and mixing it with ZFS is really a charm
-
polyex
ya and maybe it can take some inspiration from firecracker vm too
-
polyex
ya it is
-
polyex
and jails too
-
polyex
so you go for pf or ipfw?
-
lognull
I have no experience with ipfw TBH
-
polyex
so then pf
-
polyex
i use pf but ipfw is the native fw so thinking of changing to that
-
lognull
I moved from OpenBSD to FreeBSD because of the improvements of desktop stuff on FreeBSD
-
lognull
I was used to iptables stuff , but pf rules are way to simplier to read, you know ?
-
polyex
ya
-
polyex
if i use ipfw do i gotta use iptables too?
-
lognull
No , no. iptables is linux fw stuff. ( nowadays they have iptables and firewalld )
-
polyex
ah so you went from linux to bsd
-
rwp
lognull, Memory consumption? Swapping? How much RAM does your x220 have? Mine has 8GB. More is always better!
-
rwp
With 8GB one can surf but one must keep things contained. :-)
-
lognull
rwp: I have 16GB here.
-
lognull
rwp: I still not discovered yet the main reason, but my system was allocating all available memory even with a low value for ZFS ARC ( as mentioned before ).
-
lognull
I'm testing some adjustments in vm.kmem_size and vm.kmem_size_max. After set values to a limit lower than total RAM and higher than vfs.zfs.arc_max things seems under control now.
-
polyex
k maybe this doesn't make sense but every time i wanna add another bhyve vm slot i gotta add another tap# cloned_interfaces entry to rc.conf. any way a wildcard thing could eliminate that?
-
polyex
like cloned_interfaces="tap*"
-
polyex
kinda like how we can set skip tap in pf config and it applies to the whole tap group meaning any tap#
-
kevans
do you have to, though?
-
kevans
i note that tun/tap supports the magical devfs cloning so that just trying to access /dev/tapN will create tapN
-
polyex
oh so maybe i don't even need a cloned_interfaces entry for the tap stuff?
-
kevans
i suspect not
-
polyex
that would be amazing. gonna try it now
-
polyex
leave bridge0 in there tho right?
-
kevans
yes
-
kevans
oh, you probably add it to the bridge in rc, huh?
-
polyex
well i got autobridge interfaces having bridge0, and autobridge bridge0 has igb0 foo and tap*
-
polyex
but then i also got the cloned_interfaces with bridge0 then a ton of tap#
-
polyex
0+
-
rwp
lognull, I have no idea! Good hunting to find the root cause.
-
polyex
i can still get rid of the tap# entries from cloned interfaces prolly?
-
kevans
maybe
-
kevans
it depends on how exactly autobridge is implemented
-
kevans
i have a suspicion that it will need rc to create the tap to do the necessary autobridging... I don't really see any devd magic that could be handling interfaces spontaneously created
-
polyex
trying now
-
kevans
yeah, it's cheap enough to just try it and see, at least
-
polyex
just commented the line out in rc.conf and rebooting
-
polyex
gonna start vm up and see if networking is normal
-
polyex
ah damn. i see in ifconfig the tap interfaces created lazily on demand, but trying to rdp to vm fails
-
polyex
fails to connect
-
polyex
we were so close
-
kevans
yeah, so autobridge needs the rc framework to actually handle the tap
-
polyex
i wonder how ppl handle unbounded vms on a host and all their taps. they run ifconfig and see 30,000 entries?
-
lognull
rwp: thx! :D
-
rtprio
you can ifconfig by class
-
polyex
?
-
rtprio
only show physical interfaces or whatnot
-
polyex
would that help my situation?
-
rtprio
it would hide the 29997 tun interfaces
-
rtprio
or you could use a framework (like vm-bhyve) which cleans up and clones them for you
-
polyex
how do i do ifconfig by class then? to hide the endless tap# in cloned_interfaces in rc.conf?
-
rtprio
ifconfig -a -G tap
-
polyex
can it be done permanently in rc.conf?
-
rtprio
how often are you running ifconfig -a and visually acting on it?
-
rtprio
and how many tap interfaces do you have?
-
polyex
tbh not often, and i'm up to a few dozen by now
-
rtprio
huh, i have 11, and i guess i never considered it to be a problem
-
polyex
every vm i make i have to provision a tap# to assign to the vm
-
rtprio
once it scrolls off the terminal, it's kinda all the same
-
polyex
so how can i fix it in rc.conf?
-
rtprio
polyex: do you have a shell script that runs `bhyve -c -m 4G ....` dozens of times or what
-
polyex
i have 1 script per vm that starts it up
-
polyex
passes its assigned tap# etc
-
polyex
so a few dozen
-
rtprio
i have 3 lines for bhyve in my rc.conf
-
polyex
what are they?
-
rtprio
vm_enable="yes"
-
rtprio
vm_dir="/vm"
-
rtprio
vm_list="dorn sirtis steward wheaton burton"
-
polyex
what's vm_dir for?
-
polyex
i guess where you put all the bhyve vms?
-
rtprio
they're all for sysutils/vm-bhyve
-
polyex
are your vms all auto started when the host boots?
-
rtprio
there are other vms that do not autostart
-
rtprio
interface is cloned and bridged automatically
-
polyex
ah nice. i do everything manually still
-
polyex
might change later not sure
-
rtprio
i don't think i have the patience to do it your way
-
rtprio
check it out; you could provision one vm on it and see how it feels alongside your scheme
-
polyex
tyvm
-
polyex
what do you think of runj?
-
rtprio
i haven't used it
-
Grell
Hello
-
Grell
I'm having problems with portmaster using multiple cores when compiling ports
-
Grell
it's under utilizing my hardware and it takes forever to compile ports
-
Grell
I have MAKE_JOBS_NUMBER=13 in make.conf
-
Grell
I have 6 cores
-
Grell
when I do htop, it looks like I have 12 threads
-
Grell
Only one is being used when I compile ports
-
meena
Grell: some ports specify MAKE_JOBS_UNSAFE.
-
Grell
I have MAKE_JOBS_UNSAFE=yes in my make.conf as well
-
nerozero
hi there
-
nerozero
how to test process with id: xxxx is alive or not
-
nerozero
for scripting
-
nerozero
the exit code "ps -p xxxx" doesn't depends on pid alive or not
-
nerozero
never mind it does
-
polyex
what do i gotta put in a installerconfig file for a bhyve vm to set up zfs? the bhyve host runs zfs and makes a dataset or whatever for the bhyve vm to use
-
polyex
sorry i meant volume
-
polyex
so host runs zfs and it creates a zfs volume for a bhyve vm to use
-
polyex
zfs host gives a zfs volume to bhyve vm, bhyve boots bsdinstall, then at partitioning i select auto zfs. the zfs configuration options need to get translated into bsdinstall script at /etc/installerconfig
-
polyex
in the context of the bhyve guest, what value should i use for ZFSBOOT_DISKS?
-
DarkUranium
I've a question. I'm trying to figure out why `jail_set` within a jail is failing with "Operation not permitted" (i.e.: nested jail); I was wondering if there was a way to get some more detail as to *why* it's not permitted?
-
DarkUranium
I know I'm probably missing some setting in the outer jail, but.
-
DarkUranium
FTR, this is `jail_set` being called by podman.
-
DarkUranium
(and I'm on 13.2-REL)
-
DarkUranium
I also have a 2nd question (VNET-related), but one problem at a time :D
-
DarkUranium
Oh right, correction, it's `buildah run` calling the `jail_set`.
-
DarkUranium
If it helps, here's the params to `jail_set` (extracted via gdb):
codepad.org/ETciFkkq
-
VimDiesel
Title: Plain Text code - 42 lines - codepad
-
DarkUranium
Basically `$iov[$i]`, `(char*)$iov[$i]`, and `*(int*)$iov[$i]`, respectively. Hence 3 lines for each.
-
RhodiumToad
the parent jail was created with children.max greater than 0?
-
spine-o-saurus
i just tried to setup ufs with 2M blocksize and it says the filesystem doesn't support that size?
-
RhodiumToad
well duh
-
spine-o-saurus
which is bullshit because more than half the files on disk are <2M
-
spine-o-saurus
so I've got double overhead on the disk space
-
RhodiumToad
huh?
-
RhodiumToad
the limits for ufs are that the fragment size must be a multiple of the disk sector, the block size must be 1,2,4 or 8 frags (should always be 8), the block size must be large enough for a superblock and no larger than MAXBSIZE (default 64k) which must be no larger than MAXPHYS
-
RhodiumToad
4k/32k is the current standard
-
DarkUranium
RhodiumToad, yup, 24.
-
DarkUranium
And I've tried setting securelevel to -1, enforce_statfs to 0, all that (out of, frankly, desperation)
-
RhodiumToad
what are those set to in the parent jail?
-
RhodiumToad
child jail's securelevel can't be lower than parent's, child's enforce_statfs can't be lower than parent's, etc.
-
RhodiumToad
child's devfs ruleset must be same as parent
-
RhodiumToad
(same ruleset number, that is)
-
DarkUranium
RhodiumToad: those are numbers in the parent jail.
-
DarkUranium
Hm, devfs ruleset in the child is different.
-
RhodiumToad
that's one of the code paths that returns EPERM
-
DarkUranium
Unrelated question, as I just ran into this error. I upgrade from 12.4 to 13.2, and I'm having some weird trouble with ports being "semi-installed". E.g. `php82` is installed, but it won't show up in `pkg info`. But it *does* show up as a conflict on `pkg install php83`.
-
DarkUranium
RhodiumToad: must be it, will try that.
-
RhodiumToad
that's probably a result of being present but with the wrong ABI.
-
DarkUranium
Yeah. How do I list all such ports, though? (so that I can upgrade them "properly")
-
DarkUranium
(also, my bad: devfs_ruleset *does* match up: it's `4` in both jail and subjail)
-
RhodiumToad
does it show up in pkg query -a '%n %q'
-
RhodiumToad
is the child jail's children.max <= the parent's?
-
DarkUranium
It does show up in there, it seems.
-
DarkUranium
As for the jail, correct: `1 <= 24`, respectively.
-
RhodiumToad
do any allow.* flags differ between parent and child jail?
-
RhodiumToad
try pkg query -e '%q ~ FreeBSD:12*' '%n %q' to see what needs updating
-
DarkUranium
No, the child jail doesn't seem to have any `allow.*` flags. At least according to what I could extract via gdb.
-
DarkUranium
The parent does have a bunch of `allow.*`, but I don't imagine that would be a problem, since it's more permissive than the child.
-
DarkUranium
RhodiumToad: interesting, no `php82`.
-
DarkUranium
Even though `php-fpm` is definitely missing. Or at least its rc script.
-
DarkUranium
I only have `vim-console` in there.
-
DarkUranium
(which is a simple enough fix)
-
RhodiumToad
what abi did php82 show up with in the pkg query -a output?
-
DarkUranium
Oh. It's gone completely. My bad, I could've sworn I saw it earlier.
-
RhodiumToad
are you sure it's installed?
-
DarkUranium
It definitely *was* before the 12->13 upgrade. But it seems like it got removed during it.
-
RhodiumToad
it could show up as a conflict on pkg install if some port is trying to install it as a dependency while some other port is trying to install a conflicting version
-
DarkUranium
Who knows. Either way, that part's fixed.
-
veg
is networking in a Debian jail supposed to work like a regular jail?
-
veg
I have it configured with its own IP on the same subnet as the host's, sharing the bge0 interface, I can connect to it over ssh from host/local network
-
veg
but I can't seem to be receiving data through the connexions I initiate
-
RhodiumToad
vnet or non-vnet jail?
-
veg
non-vnet
-
veg
I can ssh out & ssh in
-
veg
but I'm trying to use rtorrent, it initiates outbound connexions but nothing is being downloaded
-
veg
net.inet.ip.forwarding = 1 & security.jail.allow_raw_sockets = 1
-
veg
sockstat -4 on host shows a bunch of connexions from jail:port but no data transfer happens after the handshake
-
tercaL
-
VimDiesel
Title: FreeBSD - a lesson in poor defaults
-
polyex
making a scripted bsdinstall, in the context of the bhyve guest, what value should i use for ZFSBOOT_DISKS?
-
BillyJoeBob
What the heck? Why can't find find pdf files? If I do an "ls | grep -i pdf" it shows pdf files in the directory I'm searching but "find /*path to same dir* -iname pdf" shows no results.
-
meena
BillyJoeBob: that's not how find works
-
meena
find /path/to/dir -iname \*.pdf
-
polyex
i have 2 options, ada0 bhyve sata disk, and vtbd0 virtio block device, for my guest vm zfs stripe disk to use
-
polyex
not sure which
-
rtprio
polyex: for vm-bhyve?
-
polyex
no i'm doing it manually
-
polyex
my client is bugged brb
-
rtprio
that freebsd-defaults dude certainly has some opinions
-
BillyJoeBob
meena: thanks. I'm trying to force myself more into cli stuff so I'm new to that and I wasn't making much sense of the man page.
-
polyex
wtf is my isp doing
-
nerozero
hi, testing unix socket file for existence, and getting false-positive
-
nerozero
#!/bin/sh script, [ ! -f "/var/run/mysocket.socket" ] && echo "socket not exists"
-
nerozero
outputs "socket not exists" while socket is there
-
nerozero
sometimes this works as intended
-
rwp
BillyJoeBob, I share this reference with anyone who takes an interest in the find command and why it is unique.
doc.cat-v.org/unix/find-history
-
VimDiesel
Title: The History of the Design of Unix's Find Command
-
rwp
The find command is definitely worth learning to use and using it because it is a very powerful concept.
-
polyex
i shouldn't give any swap to a freebsd bhyve guest right? it's running zfs on both host and guest
-
scoobybejesus
maybe not freebsd-specific, but related to our shell it seems, anyone know why cron running `script.sh >> logfile 2>&1` kicks back with "Ambiguous output redirect." ? Maybe cron is running csh, so i need to do `script.sh >>& logfile`. Hm. Seems like that worked. Thanks for being a rubber duck.
-
polyex78
wew my isp taking a dump today
-
psionic
why dont u use devuan that is at least without a jail :>
-
polyex78
who
-
antranigv
can someone review this? :))
wiki.freebsd.org/Scientific any feedback is appreciated.
-
VimDiesel
Title: Scientific - FreeBSD Wiki
-
qmr
Can I get some handholding unfucking my iohyve / bhyve networking? I think the issue might stem from moving server / interface name changing. I tried redoing iohyve setup net= bit with new interface name but it's still not working
-
qmr
I can tcpdump tap0 and see traffic but it doesn't seem to make it to the lan. so something tapN <-> bridge0 is wrong perhaps?
-
qmr
or could also be the bridge is not connected to igb0 my new interface. old interface was ... em0 maybe?
-
rtprio
well ifconfig the bridge and see what members it has
-
qmr
that was actually it ... saw addm blah blah then saw that in man page and added tap0 now things maybe work
-
qmr
but why was it not added automatically by iohyve magic or bhyve or whatever
-
qmr
anyway next issue: serial console is all fucked up when trying to boot linux guest? characters not echoed properly, can't use backspace, enter doesn't make a newline, console is also extremely slow
-
qmr
bsd guest seems fine ish? haven't messed with it much but I could boot and install freenas
-
rtprio
and it used to work ok on the old system?
-
qmr
the networking bit yes. I'm just now trying to do linux guests though. I don't think that's related to the system change
-
rtprio
just console enough to get ssh up and do that
-
antranigv
rtprio cool username!
-
qmr
I need the console to install the goddamn thing
-
rtprio
well, not entirely true, but i understand
-
qmr
alternatively , how can I get docker working on freebsd? oooorrrr is there a native nvr? trying to get frigate nvr or another nvr working that's the larger overall goal here
-
rtprio
i don't know, i don't use iohyve
-
rtprio
you can use podman on freebsd, but of course you can't use any of the images on dockerhub
-
rtprio
so you'll need to build it all yourself
-
qmr
what about ... bastille?
-
rtprio
i don't know anything about that
-
antranigv
qmr do you want Docker, or Docker images
-
antranigv
because Docker doesn't work and will never work. but you can get Docker images running as Linux Jails
-
qmr
hmm bastille seems to be jails only
-
antranigv
qmr it can run Linux Jails, but it doesn't boot them
-
antranigv
you can use it to run commands, not services
-
antranigv
if you want, I have a blog post on how to boot a complete devuan system in a Jail
-
rtprio
-
VimDiesel
Title: Containers - FreeBSD Wiki
-
qmr
antranigv: I need *something* to use as a security camera NVR, that's the bigger goal here. frigate looks cool, which lead me to trying to boot a coreos guest so I can run docker to run frigate
-
antranigv
-
VimDiesel
Title: FreeBSD Jail booting & running Devuan GNU+Linux with OpenRC | Freedom Be With All
-
antranigv
what's frigate? any link to that please?
-
rtprio
qmr: i run docker in debian in bhyve and it works... just about as well as you could expect
-
antranigv
I do that too, but for me it works flawlessly
-
antranigv
qmr as far as I can tell, frigate needs to run on bare-metal inside docker. which means that Linux Jails will not work for you. sorry
-
qmr
any suggestions for security camera software? I have found some cheap cameras I can de shittify with an alternative firmware but now I need to catch the video and have recordings and configurable alerts
-
qmr
hmm maybe I can run frigate on kodi machine
-
polyex
antranigv what's the difference between docker and docker images?
-
polyex
how much overhead is there, if any, running docker through a linux guest in bhyve?
-
antranigv
polyex docker is a program/daemon that you run, to manage containers on Linux. Docker images are based on the OCI spec and can be run without docker, for example with Podman. and can also be converted to, say, tarball with rootfs, that you can technically run as a Linux Jail :)
-
polyex
oh wow so any docker image can be run on freebsd!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
antranigv
"any" is a bit much. most, yes
-
antranigv
but if it relies on very linux-y things, such as frigate relies on the GPU, then no
-
antranigv
or, NextCloud's Docker image for example relies on the Docker actually being available, it's not just an image
-
antranigv
(it hijack's the host's Docker to run other containers)
-
polyex
ah
-
antranigv
and regarding your question of overhead. if you setup everything as a bridge (if_bridge + tap + veth on Docker) then it will all work fine.
-
antranigv
altho Docker + NAT works fine too
-
polyex
how's the performance relative to running debian directly on hardware?
-
antranigv
my machines are powerful, so personally I've never felt anything being slow, but I never run Linux on the host, so how would I know? :)))
-
polyex
ahh
-
polyex
can bhyve guest vms running zfs have zfs disk encryption enabled if it's a server that should be able to start up without entering a pw on boot? how would that even work?
-
antranigv
it doesn't. you need to decrypt/load-key before booting the VM
-
polyex
ok so freever servers everywhere that are running zfs are NOT using disk encryption, right?
-
polyex
freebsd*
-
antranigv
well. most computers are not using disk encryption :D
-
antranigv
I guess macOS is the exception
-
antranigv
however, it would not be hard to setup key loading during boot
-
antranigv
say, from a USB key, or something similar
-
polyex
desktops can because you give pw and login beore using it
-
polyex
btw tyvm antranigv for working on freebsd in the scientific computing realm
-
antranigv
out of the... I wanna say 500 servers that I manage... I say only 10 of them use some kind of disk encryption
-
polyex
store credit cards or why do those 10 use disk encryption?
-
antranigv
PII -- personal identifiable information
-
antranigv
even things like DNA
-
qmr
recently discovered a shitty "roommate" or their friend stole some parts from my desktop. the drive that had all my phones synced to it. so yea disk encryption is a good thing.
-
polyex
ya i run disk encryption on all desktops. not yet on any servers. need to figure that out
-
polyex
storing the key on a connected usb drive isn't a fix imo
-
polyex
someone hacks into server, they just read the key info off
-
polyex
someone steals server, steals usb key with it
-
qmr
well yea
-
polyex
i shouldn't give any swap to a freebsd bhyve guest right? it's running zfs on both host and guest
-
qmr
that's up to you. swap lets the machine make better use of real ram
-
polyex
but host machine runs SSDs and what i read was swap on a guest results in excessive host SSD/NVME i/o and burns them out
-
qmr
I hear driving your car puts miles on the engine transmission and tires too