@cks@mastodon.social avatar

cks

@cks@mastodon.social

That cks. Overcommitted sysadmin, photographer, bicyclist, and other multitudes. I write a lot of words for a programmer. he/him

This profile is from a federated server and may be incomplete. Browse more on the original instance.

gnomon, to random
@gnomon@mastodon.social avatar

Is there an idiomatic SQL (sqlite3) way of mapping a subset of selected records from a large table ("users") to unique values in a smaller table ("coupons")? It's easy enough to select all the user records not yet mapped, and to select all as-yet unmapped coupons, but then what's a nice clean way of mapping one to the other? Order doesn't matter, only that the mapping once established can be queried again in the future.

My brain is stuck thinking sequentially about this, frustratingly.

cks,
@cks@mastodon.social avatar

@gnomon My intuition is that a truly stable mapping is impossible with purely read access; you have to write back some sort of thing to freeze it. I don't know if there's some clever way with left or right or outer/inner/upside down joins to get some sort of thing with unmapped users matched up to unmapped coupons, but it feels like probably not if there's not necessarily the same number of them on each side.

dan, to random
@dan@discuss.systems avatar

currently attempting to use an ethernet interface called "enp8s0f0npf0vf1" and cannot help but think

STATEMENTS DREAMED UP BY THE UTTERLY DERANGED

THEY HAVE PLAYED US FOR ABSOLUTE FOOLS

cks,
@cks@mastodon.social avatar

@Doomed_Daniel @vees @dan The extra challenge round is that people want to be able to pull a network card, replace it with an identical spare one, and get the same interface names rather than new ones (or swap system disks into a new set of identical hardware, for motherboard ports). This makes MACs and other serial numbers bad. Unfortunately PCIe enumeration isn't stable if there are any hardware changes (not just the network card), for reasons.

And now you're mostly stuck.

cks,
@cks@mastodon.social avatar

@Doomed_Daniel @vees @dan Server environments don't necessarily do MAC registration, and not all DHCP environments do authentication by MAC (but a machine may still want to keep a stable NIC name for eg its own firewall config).

Broadly: writing the new MAC somewhere is doable but it makes a stressful situation (hardware failure and replacement) worse. I once ran systems that needed this and it was a pain in the rear.

cks,
@cks@mastodon.social avatar

@Doomed_Daniel @vees @dan If you burn the MAC into the network device name, every system has a different name for its network interface, even on the same hardware, which is a sysadmin pain in the rear. If you freeze a simple network name based on the MAC and add a new network name if you see a new MAC, systems can wind up with network names depending on their history; reinstalling the system will give it different network names (because old MACs won't be claiming the good ones any more).

cks,
@cks@mastodon.social avatar

@Doomed_Daniel @vees @dan In many situations you don't want to keep the mapping file, because it creates differences between identical hardware based on the history of a particular server. One out of your eight hardware-identical fileservers having a different network name because you had to move it to the spare chassis (or swap its add-on network card) at one point is a special sort of hell.

(Also, not all reinstalls are planned in advance. Sometimes the disk blows up.)

cks,
@cks@mastodon.social avatar

@Doomed_Daniel @vees @dan I believe systemd creates aliases, or at least lets you set naming policies for devices, so if you want to use MAC-based names you can fairly easily. And the default PCIe based names are mostly stable, and sometimes systemd can actually detect that a network port is a motherboard port and give it a truly stable name.

(This depends on vendors getting various BIOS data right, which is rather variable.)

cks, to random
@cks@mastodon.social avatar

Why yes unnamed cloud vendor, I do appreciate you making the tiny system disk of my dinky, basically as cheap as possible VM be your "premium SSD" offering. I am sure I will need all those more expensive IOPS for (checks notes) automated Ubuntu package updates.

Also, no. I'm not surprised, I'm just disappointed at cloud vendor practices. It sure is nice to feel like they're out to ruthless exploit me.

cks, to random
@cks@mastodon.social avatar

It's certainly better to discover that my commuter bike has a flat rear tire on a Sunday afternoon than on, say, a Tuesday morning when I'm about to commute with it. But I'd rather not have the flat.

(You know how the bike mechanic at your local bike shop can change your flat tire in no time at all and make it look like magic? Me with flat tires is the exact reverse of that. I will forever be the last place finisher in any flat-changing competition.)

cks, to random
@cks@mastodon.social avatar

Well, that was a learning experience not just about where DNS servers put information when you query them with 'what are the NS records for this subdomain', but also on how some of our local DNS servers are configured. (In a way that kind of surprises me, for one of them.)

TIL that if you ask a parent authoritative server for NS records for a subdomain, they show up in the 'authority' section of the reply, not the 'answer' section. For (perfectly good) DNS reasons.

cks, to random
@cks@mastodon.social avatar

Half formed hot take: the Linux kernel CVE situation is the tip of an emerging iceberg as OSS people push back and refuse to do supply chain/security work for free just because third parties want it.

(AFAIK, the ultimate trigger was third party maintainers of old kernels wanting the mainstream kernel to note all changes that turned out to be security fixes so the 3rd parties could backport them and only them. Identifying what is actually a security fix is non-trivial extra work (& fallible).)

cks, to random
@cks@mastodon.social avatar

We used to operate one of the university's authoritative secondary DNS servers for all of the university's domains. Many years ago, we ceased doing this, reducing the server to just being authoritative for our own domains. Today I learned that there are a lot of people on the Internet still querying us for other people's domains that we haven't been NS records for for years. Where are they picking this up from? It is a mystery.

cks,
@cks@mastodon.social avatar

Bonus: some of the people still querying our DNS server for domains we aren't authoritative for appear to be (other people's) within-university DNS servers. All I can say is WHAT.

cks,
@cks@mastodon.social avatar

This is my face when I pull the name server statistics from our 'used to be an authoritative secondary and no longer is' DNS server and discover that more than 80% of the queries are for things we don't serve any more. This is also my face when I pull a tcpdump to look at the sources of this traffic and they are all over the place, including from eg 'DNS-8-0-10-3.Chicago1.Level3.net'. And a lot of AWS machines.

What.

cks, to random
@cks@mastodon.social avatar

Great moments in dry (Go) commit comments[1]:

runtime: remove note about goid reuse

Goids are designed to be big enough that they will never be reused: a uint64 is enough to generate a new goroutine every nanosecond for 500+ years before wrapping around, and after 500 years you should probably stop and pick up some security updates.

[...]

1: https://go.googlesource.com/go/+/8f71c7633fd70fffc5fa65e7865e763238fa6f46

cks, to random
@cks@mastodon.social avatar

This is my face when people think it is a good idea to make your computer make bubble-popping noises when you change the sound volume. I AM LISTENING TO MUSIC YOU GOONS, IT IS NOT IMPROVED BY RANDOM BUBBLE POPS.

filippo, to random
@filippo@abyssdomain.expert avatar

Strong agree that sudo is dogma, and logging in as root is just fine, actually.

I think @fanf is even more right about this than he claims.

For single-user workstations, who cares about administrative access. The only real security boundary is the TPM/SEP. really(8) without any further authentication would be just fine.

The flip side is that I don't actually care about sudo's complexity or security, because it's not protecting a security boundary I care about.

https://dotat.at/@/2024-05-02-sudo.html

cks,
@cks@mastodon.social avatar

@filippo @fanf I sort of care about administrative access on my single-user workstations because I really don't want to spent all my time being one errant typo away from deleting /usr/bin. (Or having a makefile be etc etc.)

cks,
@cks@mastodon.social avatar

@filippo @fanf I actually want the forced tty interaction, because that makes it very hard for random scripts/Makefiles/etc to put in 'really ...' and surprise me in a very unpleasant way.

(Based on sudo logs at (university CS department) work, with our population of postdocs, graduate students, etc fetching and using random research software, there is clearly a lot of instructions and possibly scripts that already use sudo this way.)

fanf, to random
@fanf@mendeddrum.org avatar
cks,
@cks@mastodon.social avatar

@fanf I think sudo is a good replacement for setuid programs, especially setuid programs that you don't intend to make accessible to everyone, just to a restricted group. You could do that with other mechanisms, but sudo is very simple to set up and it's everywhere already.

GeePawHill, to random
@GeePawHill@mastodon.social avatar

No, wait, what?

It's pronounced "roo-bee"?

I been calling it rub-ee this whole time.

cks,
@cks@mastodon.social avatar

@GeePawHill I was going to think it weird but then I remembered that it originated from Japan.

(I have a lot of casual exposure to Japanese phoneme rules through anime (and manga), since sooner or later one winds up trying to understand how non-Japanese words wind up being pronounced the way they are in the Japanese dialog. Sometimes this leads to comedy with translating into/back to English, as people try to work out the correct English/Latin-alphabet version of some non-Japanese name.)

cks,
@cks@mastodon.social avatar

@GeePawHill For example, one (human) person in a manga I am very fond of has a special supernatural status. The Japanese for it transliterates to 'surei bega' and the term was expected to be some English language term that had been transliterated into Japanese by the manga creator. It took a rather long time (and in the end the word of the creator) to work out exactly what English term it was.

fanf, to random
@fanf@mendeddrum.org avatar

on my blog!

https://dotat.at/@/2024-04-30-wireguard.html

my wireguard IPv6 tunnel

cks,
@cks@mastodon.social avatar

@fanf Possibly relevant to your interests on this, my Fedora and Ubuntu 22.04 based version: https://utcc.utoronto.ca/~cks/space/blog/linux/Ubuntu2204WireGuardIPv6Gateway

cks, to random
@cks@mastodon.social avatar

In re Canonical and Ubuntu: at work we are still using Ubuntu LTS (and we're going to start using 24.04), but this is on servers where we don't have to deal with snaps (we turn them off, they don't work in our environment). But the Canonical monetization drive is obvious and the end point is inevitable, so I expect we'll wind up on Debian before too many more years (depending on what Canonical does to LTS releases). 2026? 2028? Who knows.

wrt: https://oldbytes.space/@feoh/112337886575696195

cadey, to random
@cadey@pony.social avatar

RPM and Fedora really aren't that bad tbh

cks,
@cks@mastodon.social avatar

@bitprophet @cadey I like RPM as a package format (especially for source packages) but I think Debian has consistently made better decisions about things like how to split up configuration files for programs and so on. (Oh Fedora, your Apache setup is terrible, or was the last time I looked.)

Apparently I am too picky for my own good.

misc, to random
@misc@mastodon.social avatar

There are so many map-based apps that should be pretty simple to implement and yet haven't been (afaik)

  • Chances of rain along your bike route for different start times
  • Given a route, best rated restaurants that don't take you far away from that route, for pick up orders
  • Best restaurant to meet up for two parties, that requires them to travel a roughly equal amount
cks,
@cks@mastodon.social avatar

@misc @irenes On iOS there's an "Epic Ride Weather" app that will show you forecast weather for a route for a particular time, I think including relatively granular rain chances. The drawback with it is that apparently all weather API sources are paid, so it has to charge you to cover its back-end access costs. (I haven't played with it because of that so I'm not sure how readily you can vary the start times and so on.)

whitequark, to random
@whitequark@mastodon.social avatar

it's surprisingly difficult to get a linux machine to communicate to itself using a pair of network adapters

cks,
@cks@mastodon.social avatar

@whitequark I think it might work with network namespaces if you detach one interface from the default network namespace and stuff it into another one. But I haven't actually tested this particular case (although I once did use network namespaces for separate routing tables).

Failing that, you can go all the way to not configuring one interface then attaching that interface to a virtual machine with its own IP. That definitely works! (... and is so annoying to need.)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • normalnudes
  • tsrsr
  • DreamBathrooms
  • Durango
  • magazineikmin
  • mdbf
  • Youngstown
  • tacticalgear
  • slotface
  • osvaldo12
  • rosin
  • thenastyranch
  • kavyap
  • PowerRangers
  • Leos
  • ngwrru68w68
  • vwfavf
  • GTA5RPClips
  • everett
  • cisconetworking
  • cubers
  • hgfsjryuu7
  • InstantRegret
  • ethstaker
  • modclub
  • tester
  • khanakhh
  • anitta
  • All magazines