A Django gotcha with Python 3 and the encoding of CharFields
We have a long standing Django web application ,which has been static for a long time in Python 2. I've recentlyre-started working on moving it to Python 3 ( an initial round ofwork was done some time ago ), and in theprocess of this I ran into a surprising issue involving text encodingand database text fields (a ' CharField ' inDjango terminology).
As part of one database model, we have a random key , which for various reasons is representedin the database model
Notes on the Linux kernel's 'irq' pressure stall information and meaning
For some time, the Linux kernel has had both general and per-cgroup' Pressure Stall Information ', whichis intended to tell you something about when things on your systemare stalling on various resources. The initial implementationprovided this information for cpu usage, obtaining memory, andwaiting on IO, as I wrote up in my notes on PSI .In kernel 6.1, an additional PSI file was added, 'irq' (if yourkernel is built with CONFIG_IRQ_TIME_ACCOUNTING, which
Some interesting metrics you can get from cgroup V2 systems
In my roundup of what Prometheus exporters we use , I mentioned that we didn't havea way of generating resource usage metrics for systemd services,which in practice means unified cgroups (cgroup v2) . Thisraises the good question of what resource usage and performancemetrics are available in cgroup v2 that one might be interested incollecting for systemd services.
You can want to know about resource usage of systemd services (ormore generally, systemd units) for a variety of reasons. Our reasonis generally to
What Prometheus exporters we use (as of the end of 2023)
We have a fairly basic andstraightforward Prometheus and Grafana setup , but over time we've drifted intousing a number of Prometheus exporters ,which is the Prometheus term for things that provide or generatemetrics. Today I feel like listing them off as a snapshot of ourcurrent practices and what we've found useful in our particular andsomewhat peculiar environment.
- node_exporter is thestandard Prometheus host agent. We run the latest binary release on ourLinux machines and the packaged OpenBSD version on our OpenBSD machines.
We
How we monitor that our wireless network is still there in places
We have a departmental wifinetwork that exists in six buildings on campus (I think, perhapsmore) and uses access points that are operated by other people(the university wifi people use enterprise access points that supportmultiple SSIDs). This leaves us with a little bit of a wifi monitoringproblem, since all we see is basically the very top level of our wifinetwork activity (as it's all brought to into our wifi networkgateway). If there's some problem with our SSID on an access
Git branches as a social construct
Over on the Fediverse, I had a half-baked thesis :
A half-baked thesis: branches in Git are a social construct, somewhatenabled by technical features. We talk about things having been doneon a branch or existing on a branch, or what branches are what on anintertwined tree of them, even when this is not something you can findin the Git repository.
(This is since commits aren't permanently associated with a branch;they are merely currently reachable from one or more branches.
Indexed archive formats and selective restores
Recently we discovered first that the Amanda backup system hasto read some tar archives all the way to the end when restoring afew files from them andthen sometimes it can do quick restores from tar archives . What is going on isthe general issue of indexed (archive) formats , and also thepotential complexities involved in them in a full system.
To simplify, tar archives are a series of entries for files anddirectories . Tararchives contain no inherent index of their contents (unlike somearchive formats, such as
What we use ZFS on Linux's ZED 'zedlets' for
One of the components of OpenZFS is the ZFS Event Daemon ('zed') .Old ZFS hands will understand me if I say that it's the OpenZFSequivalent of the Solaris/Illumos fault management system as appliedto ZFS; for other people, it's best described as ZFS's system forhandling (kernel) ZFS events such as ZFS pools experiencing diskerrors. Although the manual page obfuscates this a bit, what ZEDdoes is it runs scripts (or programs in general) from a particular
An old Unix mistake you could make when signaling init (PID 1)
Init is the traditional name for the program that is run to beprocess ID 1, which is the ultimate ancestor of all Unix processesand historically in charge of managing the system .Process ID 1 is sufficiently crucial to the system that either itcan't be killed or the system will reboot if it exits (or both, and this reboot is a hack ). These days onLinux, PID 1 often isn't literally a binary and process called'init', but the *BSDs have stuck with
MFA today is both 'simple' and non-trivial work
Over on the Fediverse I said something a while back :
I have a rant bubbling around my head about 'why I'll never enable MFAfor Github'. The short version is that I publish code on GH becauseit's an easy and low effort way to share things. So far, managingMFA and MFA recovery is neither of those; there's a lot of hassles,worries, work to do, and 'do I trust you to never abuse my phonenumber in the future?'