-
BaloneyGeek
So mason, I'm happy to report back that my jails are working just fine with neither the prestop ifconfig -vnet hack nor having a sacrifical epair (although the second one might be down to just using a realtek card)
-
BaloneyGeek
mason: In fact, my jail is even IPv6 only and it Just Worked (TM)
-
mason
BaloneyGeek: nice nice - I haven't had a chance to amend the docs but that's good to hear. I'm hoping maybe tomorrow.
-
mason
nice
-
BaloneyGeek
So how do I send you my new config in a private-ish way?
-
BaloneyGeek
mason: Also, (a) it's static IP, since my hoster doesn't do DHCP, and (b) I was wondering if I could get rid of the $ep var entirely and use jid, but jail complains ${jid} variable not found
-
mason
BaloneyGeek: mason⊙bo if you want to email it
-
BaloneyGeek
Yes, that would be the sanest option I think
-
mason
BaloneyGeek: looking, half a sec
-
mason
Hrm, yeah, I don't see the jail ID available right off the bat. Looking.
-
mason
BaloneyGeek: How about using the name?
-
mason
Unless you wanted to use the jail ID as part of the address.
-
mason
BaloneyGeek: Something you can do (and I used to) is have the jails all use DHCP, also.
-
BaloneyGeek
mason: Actually the name would be fine, but I'll email you my old (ep) based config as a base
-
mason
Ideally I want to get the config to do its set-up using the in-jail system start-up scripting.
-
mason
kk
-
mason
I forget what wall I hit on the way there but I'll be tackling it again before long.
-
mason
I'd ideally like to simply drop out the start and prestop sections here, aside from launching /etc/rc:
bpa.st/CNGWM
-
VimDiesel
Title: View paste CNGWM
-
mason
Another thing that interests me is the notion of more modular config, and I believe someone's been working on /etc/jail.conf.d or similar.
-
BaloneyGeek
mason: I sent you the email, but probably check your spam as well. I do my own email server but even though SPF, DKIM and DMARC are all correct email still ends up in spam from time to time
-
mason
I bet it goes right through. I don't think it'll make my bayesian filter blink.
-
BaloneyGeek
I mean I got rid of the net config in jail.conf and used rc.conf
-
BaloneyGeek
The exec.{pre,post}stop just creates, renames and tears down the epairs
-
BaloneyGeek
I even tested tearing down the jail with a netcat connection open, worked just fine
-
BaloneyGeek
(the point of this server and jail is to host my very public mastodon instance so I want to do it properly)
-
BaloneyGeek
Well - "properly" would involve using netgraph and not epairs but oh well
-
mason
Ah, so, rc.conf used to be the way you'd do it, but that's deprecated now.
-
BaloneyGeek
Oh, tell me more
-
BaloneyGeek
I'm still struggling with a modular network configuration on freeebsd. Here I actually miss systemd-networkd somewhat
-
» mason twitches.
-
BaloneyGeek
hehe
-
mason
BaloneyGeek: I don't know if configuring the jails via rc.conf will ever actually go away, but the notion is that it's not the desired method for configuring jails now.
-
BaloneyGeek
Oh so on a host I'd still configure the network using rc.conf this way?
-
mason
(I spent the last several years on the team at Red Hat that fielded major problems customers had with systemd.)
-
BaloneyGeek
mason: So how would I configure the network inside a jail?
-
mason
BaloneyGeek: Ideally, you'd make the interface available, and then have a config in rc.conf inside the jail.
-
mason
This should just work but my last run at it saw rc finish up with no network, and I didn't see anything sufficient logged to get a handle on why.
-
mason
More effort debugging it will crack it, but I moved on. This week I'll poke at it agian.
-
mason
again*
-
gman999
i dont really use jails much for a while..
-
gman999
but i was from the 'school' of those who manually started jails
-
gman999
since if it was broke, you dont want it doing the same thing after a reboot
-
gman999
but it's been a whle... like 8.x days maybe
-
mason
gman999: This cropped up even with manual starts. I need to just get some debugging output saved to see what's happening.
-
mason
set -x a few places, say
-
gman999
easier to trouble shoot when it's manual..
-
gman999
yes.. in shell
-
mason
Yeah.
-
gman999
imagine it was remote and kept breaking on reboots without console?
-
mason
Well. So, set -x and some sort of capture to a file. I'll figure out something reasonable.
-
mason
ah, exec.consolelog
-
mason
BaloneyGeek: Your config is nice and clean. Good stuff.
-
BaloneyGeek
Thanks, I tend to err on the side of over organizing :-P
-
mason
Alright, heading off for the night, but thanks for the inspiration. I'll get some time in massaging the config this week. o/
-
BaloneyGeek
o/
-
Setesh
mason: I ran into a lot of issues with jail networking due to issues with trying to use rc confs with NOJAILS options, like dhclient. Kept having to use the jail.conf to execute that stuff instead of getting it to just work via rc. Is that going to be changing in the future?
-
Setesh
Ah nevermind, I misread the convo a bit. My bad.
-
richz
help
-
richz
exit
-
richz
quit
-
rtprio
lol
-
meena
Setesh: I can use dhclient in jails. why can't you?
-
MrA
I've been searching for some unix/linux scripts for my dedicated server, i need get-psybnc get-eggdrop get-znc command which when the user types it into ssh it will prompt him to install the psybnc porcess on his shell account, same thing would need for eggdrop and bnc, also a command to start all bouncers would also be usefull.
-
mictty
what's the different between hooking a commercial console and hooking a plain monitor on a server?
-
meena
mictty: what's a commercial console?
-
msiism
The ~/.shrc file coming with a FreeBSD installation has two lines in it that I cannot make sense of:
paste.debian.net/plainh/2f8849b4
-
msiism
I mean, I know /home is a symlink to /usr/home.
-
msiism
But I can't make sense of the condition in that code.
-
msiism
What I find particularly confusing is `[ "$PWD" -ef "$HOME" ]`.
-
Helper
omg I finally got Waimea window manager working.
-
» msiism finds out about the -ef primary.
-
idwer
meena: IPMI/iLO, probably
-
otis
or lantronix
-
mictty
meena: terminal device
-
mason
Setesh: No worries. I'll document what I find, probably alongside the existing config. I want to include some innovations BaloneyGeek is using.
-
meena
mason: oh? what innovations?
-
mason
meena: The one that jumped out was setting a consistent name for the in-jail-side epair, so I can address it without having to do anything funny to find the interface name.
-
mason
I had some ugly machinery to poke the right name into rc.conf, but this is cleaner/better.
-
meena
ah, yeah. so how are epairs named then like the jail itself?
-
mason
Well, just "net0" internally, for instance.
-
mason
So the jail's internal rc.conf can just reference that, no hocus-pocus required.
-
meena
ah, yeah
-
meena
but outside?
-
mason
Outside doesn't matter as much, because I can specify the right thing in jail.conf.
-
meena
(i used to call them vnetX, but calling them all vnet0, unless you have more than one, makes vastly more sense)
-
meka
cbsd does that, too, and on the host the epair has jail name in interface description
-
mason
Yeah, that'd be fairly reasonable.
-
mason
I've been encoding part of the network address locally, but if I can cleanly go back to DHCP, which I suspect I can in the next iteration, I'll use name-based ... names.
-
meena
libioc did that too
-
meena
mason: main reason i'd love to get away from DHCP is so i can have slimmer jails and hosts
-
mason
Hm, do you trim out dhclient and/or other things?
-
meena
I don't install it, unless it's needed, but i mean the CPU and memory footprint more so than storage
-
mason
kk, fair enough
-
meena
I run my stuff on tiny cloud instances, and I'm poor / broke
-
mason
Eh, fewer cycles is a better carbon footprint, so that's reason all by itself.
-
meena
yupp, that too
-
mason
Even without DHCP I can have the network config entirely self-contained if I rename the inside NIC anyway.
-
mason
Then as the jail moves between hosts, it doesn't need to accomodate anything different in terms of NIC naming.
-
meena
another reason for SQLite, other than not wanting to become a DBA
thedailywtf.com/articles/Behavioral-Deficiencies-
-
VimDiesel
Title: Behavioral Deficiencies - The Daily WTF
-
mason
Heh: their development strategy had gone from “cutting edge” to “barely holding an edge,”
-
mason
meena: Thanks. We enjoyed that.
-
cracauer
Is there a way to go to a port's directory and have all build and run dependencies installed via pkg? I mean without awk acrobatics?
-
rtprio
yep
-
rtprio
make install-missing-packages
-
cracauer
What is it?
-
cracauer
Ah.
-
rtprio
man 7 ports
-
cracauer
Thank you.
-
cracauer
Building chromium now. With 4 Haswell cores :-/
-
meena
see also: poudriere bulk -b
-
cracauer
make install-missing-packages only fetched 2 packages and the build is now going into overdrive building dependencies from scratch. I'm still doing something wrong.
-
cracauer
Actually not that bad, just a couple python things.
-
meena
cracauer: do you have latest enabled? and why are you building chromium, if i may ask?
-
cracauer
Yes, latest pkg. No big deal, it was a quick build of a couple Python ports.
-
cracauer
I want/need pulseaudio in Chromium.
-
cracauer
Actually I want jackd support, but PA on top of jack is the next best thing.
-
meena
why isn't that on by default
-
cracauer
Apparently libsnd support, which is default, clashes with pa and alsa support. At least that is what the www/chrromium/Makefile says.
-
meena
cracauer: makes sense
-
cracauer
Not sure. Myself I would be more admissive to other sound options. And I wouldn't know why a libsnd module would disable the ability to use the others.
-
cracauer
Ah, it is because FreeBSD switches to the OpenBSD sound manager when SNDIO is being used. So it is not just another module, it is a different manager.
-
mictty
BSD desktop users are rare amongst rare
-
mictty
sound is the real factor, hard to notice as a non desktop user
-
cracauer
FreeBSD users are spoiled by the in-kernel mixer for OSS audio. So the pressure to use a sound demon is just not nearly as intense as on Linux.
-
mictty
spoiled sounds good in this context
-
meena
imagine iterating on seven subsystems for sound in twenty years, and this time, i hear, pipewire is going to be really good
-
meena
it better be, and if it does, we should port it
-
meena
oh, it already is
-
mictty
saas
-
cracauer
Pipewire looks good.
-
cracauer
Let's put it in the kernel!
-
meena
cracauer: as module?
-
BaloneyGeek
mason: I'm pinging you since you have some context on the jail networking I'm trying to do
-
BaloneyGeek
I just realised my jail loses all IPv6 connectivity after about an hour of starting up
-
BaloneyGeek
I did some tcpdump-ing, re0 and bridge0 on the host see ICMP packets addressed to the jail, but epair2a does not
-
mason
BaloneyGeek: I don't know IPv6 very well, but any chance it's related to auto_linklocal?
-
BaloneyGeek
mason: auto_linklocal should just create the fe80:: address and nothing else
-
BaloneyGeek
The fe80 address is autocalculated from the interface's MAC address, and is mandatory
-
mason
BaloneyGeek: Hrm, I'd recommend opening a bug for this. Anything in dmesg noting activity around the time you lose the addresses?
-
BaloneyGeek
I didn't really check, let me try
-
mason
BaloneyGeek: Randomly, this kind of thing comes up regularly and is why I'm constantly putting my FreeBSD projects on the back burner.
-
BaloneyGeek
What's interesting is that if I ping an external host from the jail, I see stuff flowing from the epair to bridge0 to re0 and out
-
BaloneyGeek
The reply gets stuck at bridge0 and never makes it to epair2a
-
mason
after the address is "gone"?
-
BaloneyGeek
Yes
-
mason
Or ... it's connectivity, you're not losing config?
-
mason
That'd be something different.
-
BaloneyGeek
Well, gone in the sense of connectivity
-
BaloneyGeek
Not config
-
BaloneyGeek
The config is fine
-
mason
I misunderstood.
-
BaloneyGeek
The routing tables are fine
-
mason
That's interesting. So, you see in pcaps where the reply comes in, and then it's just eaten?
-
BaloneyGeek
Precisely
-
BaloneyGeek
Well, tcpdump
-
mason
Can you crank up logging in your firewalling?
-
BaloneyGeek
sudo tcpdump -ni net0 'icmp6 and (ip6[40] == 128)'
-
mason
BaloneyGeek: Are you just looking at tcpdump textual output?
-
BaloneyGeek
I have no firewall
-
mason
BaloneyGeek: If you write tcpdump output to a file you'll actually capture a ton more data, which you can then peruse with wireshark, tshark, whatever.
-
BaloneyGeek
Unless there's something turned on by default
-
mason
I've noted things in a full capture that weren't summarized in the textual output.
-
BaloneyGeek
I'm way out of my depth here though, I have no idea what to look for and I have never used wireshark
-
BaloneyGeek
Is there a simpler way, or do I need to go to school now? :-P
-
mason
BaloneyGeek: Nah, do what you're doing, but write it out to a file.
-
mason
-w somefile
-
BaloneyGeek
Alright, let's see what comes up. I'll do this from the host and check re0, bridge0 and epair2a
-
mason
Then if you feed that into wireshark, you'll immediately benefit.
-
meena
BaloneyGeek: what's your config actually look like?
-
BaloneyGeek
meena: It's a standard VNET jail, re0 is the physical, bridge0 is a bridge joining everything and epair2{a,b} is to connect the jail to the bridge. I can share detailed configs in a bit, but I'd have to remove real IP info
-
BaloneyGeek
mason: maybe I should leave out the (ip6[40] == 128) and capture all ICMP packets
-
mason
BaloneyGeek: Yeah, if you aren't pumping through so much traffic that it's immediately painful, I find that I shoot myself in the foot by imposing too many filters.
-
BaloneyGeek
mason: Nope, it's just ICMP request/reply pairs in Wireshark
-
BaloneyGeek
Well, re0 and bridge0 have pairs, epair2a just has the request
-
BaloneyGeek
I'm thinking this is now actually an issue in FreeBSD itself. Why would IPv4 still work just fine but IPv6 not
-
mason
Yeah, definitely open a bug for it.
-
mason
I should migrate to IPv6 here but I've not had the free time to tackle it.
-
mason
(said most of the world in unison)
-
BaloneyGeek
mason: I think I found something
-
BaloneyGeek
The echo requests have a source MAC of the epair interface
-
BaloneyGeek
The echo replies have a destination MAC of the physical bridge0 interface
-
BaloneyGeek
Now I'm confused who's the naughty boy
-
uskerine
Hi, if I buy an old SuperMicro MicroBlade server, would it work with the latest FreeBSD if SuperMicro claims that it is compatible with FreeBSD 10.0?
-
uskerine
In general which is the level of support of datacenter rack servers?
-
mason
uskerine: I've run into bugs in SuperMicro firmware but it tends to be a safe bet.
-
cracauer
I use old SM servers with no problems.
-
cracauer
Just make sure they do 64 bits.
-
uskerine
is it just my impression or SuperMicro refurbished servers tend to be cheaper than HP or others?
-
uskerine
(that is a bit offtopic)
-
mason
They're fairly cheap.
-
uskerine
when I get the server with the caddies but not the HDs, can I use regular 3.5" HDD or do they have to be specific for servers? That is something I never fully understood in servers
-
thumbs
server-grade disks usually have more cache than more common non-commercial offerings.
-
thumbs
plus, the RPM of the commercial spinning disks is usually higher for commercial options
-
thumbs
that being said, if you're using this for a lab or personal use, you can get away with cheaper disks; the RAID controller can work fine with those.
-
uskerine
Yes I am looking to have this as my personal lab (professional but still intended to be used as a "workstation")
-
cracauer
Any old 3.5" is fine, except SAS when you don't have a SAS controller and backplane.
-
mason
uskerine: You can stick SATA in a SAS slot, but not vice versa.
-
uskerine
good to know, thanks a lot
-
BaloneyGeek
mason: I think it's definitely Hetzner's fault. I just rebooted the jail and tried tcpdump again, and now the ICMP replies have the correct destination MAC address and everything works
-
BaloneyGeek
Thanks for pointing me to Wireshark :-)
-
mason
Sure, enjoy. It's kind of fun.