Some notes on Grafana relative time ranges
I recently read Grafana's Pro tip: How to use semi-relative timeranges in Grafana and discovered a new feature in Grafana's time range controls ,which is that you can get time ranges rounded off to, for example,days. This is what Grafana uses to implement time range choiceslike 'yesterday', but the exact behavior is not well covered in thedocumentation. So here is what I've worked out.
To start with, the current documentation says this:
The minus operator allows
The hassles today of having servers with disks that can't be hot-swapped
We had a disk failure today in one of our 1U servers with disksthat aren't hot-swappable , and the resultingdiscussion over what to do about it made me start thinking of howdisks that can't be hot-swapped are an extra hassle these days . Some of theseextra problems weren't obvious to me until now, so it's time forsome things learned.
The direct problem when you have a disk failure in a server with disksyou can't hot-swap
Disk drives can have weird SMART values for their power on hours
Disk drive SMART attributes famously have meanings that are relatively drive andmaker specific, which can make for fun misinterpretations if youdon't have an up to date database of what they mean . However, some SMART attributesare old enough and well established enough that their meaning ispretty well established. One of those is SMART attribute ID 9,"Power on hours" (sometimes it has more precise units). For reasonsbeyond the scope of this entry I was recently looking at this across our fleet's disks
The likely long-term result of good on-host (host-based) firewalls
A while back I read j. b. crawford's host firewalls , which invokesa bright alternate future where we had good, smart host basedfirewalls on our machines that acted to (try to) limit nasty programsand their bad habits. One problem with this vision is the "why"problem , where you really want to knownot just what a program is connecting to but why. You can imaginea future where programs have to tell you something about this, andthere is social pressure for programs to
Git 2.34 has changed how you configure fast-forward only pulls and rebasing
I'll start with the conclusion and give you the story afterward.Before Git 2.34, if you were tracking upstream repositories andperhaps carrying local changes on top ,it was sensible to configure ' pull.ff only ' globally (in your~/.gitconfig) to stop ' git pull ' from warning you and then set' pull.rebase true ' in repositories that you had local changes in.As of Git 2.34, this causes a plain ' git pull ' to abort
A thesis: most websites are implicitly designed with a short lifetime
Over on Twitter I said something :
Thesis: most websites and their technical design are designedfor the short term and implicitly for short lifetimes. Fiveyears? Maybe. Ten years? Most people aren't thinking about that sortof lifetime. Fifteen or twenty years? Forget it, it'll be plowed underby then.
An organization and its website may live for a long time (and manypeople hope for that). The visual design and interaction of thewebsite is likely to change and turn over more
The reason Unix has the argv[0] issue (and API)
Famously, Unix passes arguments to programs in the argv[] array,and the first entry in the array is the 'name' of the program beingrun (the 0th element, since C arrays index starting from 0, hence'argv[0]'). Recently, a whole bunch of people have found out thatargv[0] doesn't even have to be there due to CVE-2021-4034 .One thing you could reasonably ask in the wake
Some things on Django's CSRF protection, sessions, and REMOTE_USER
We have a Django application where we'vehad mysterious CSRF problems in the past,which I've theorized was partly because we use it behind ApacheHTTP Basic Authentication . As part ofrecovering my understand of Django and Apache HTTP BasicAuthentication , I've been digging into howDjango's CSRF protection works and how it interacts with all ofthis.
Our starting point is Django's documentation on Cross Site RequestForgery protection . How it works isthat Django sets a CSRF cookie and then embeds a hidden
The Linux kernel, simultaneous multithreading, and process scheduling
Back in an earlier entry on simultaneous multithreading , I said that I expected operating systems,Linux included, to generally schedule processes on to a single CPUof each core before it started doubling up processes on two CPUsof a single core. This raises the question of whether the Linuxprocess scheduler is SMT-aware and what it seems to do in practice.
The answer to the first question is that it clearly is SMT aware,although I haven't traced through the code to see exactly whateffects it has.
Django and Apache HTTP Basic Authentication (and REMOTE_USER)
We have a Django application , and partof it exists behind Apache HTTP Basic Authentication . For reasons beyond the scope of thisentry, I was recently rediscovering some things about how Djangointeracts with Apache HTTP Basic Authentication, and so I want towrite them down for myself before I forget them again.
First, the starting point in the Django documentation for this isnot to search for 'HTTP Basic Authentication' or anything like that,but for the howto on authenticating with REMOTE_USER ,which is the environment variable