Brainspiritus

Funkenflug aus flammenden Synapsen.

The day in brief.

17-year-old man pulls an axe in a regional train, four seriously wounded, more hurt, attacker shot dead by police. Codenames wins Spiel des Jahres award. I lost a dear friend.


When German meets Microsoftian, you win at Scrabble.

Richtlinienergebnissatz-Planungsmodus: Im Planungsmodus für den Richtlinienergebnissatz können Sie vorhandene Gruppenrichtlinienobjekte (Group Policy Objects, GPOs) für alle anwendbaren Richtlinieneinstellungen abfragen

Richtlinienergebnissatz is not a word, I'm sorry.


I guess that means there's a market for it somewhere?

Wait, what? Never has any household item before been that motion-activated. I'm sure they must have a pretty serious backlog in QA, too, before they prune the worst cases.
(Any excuse for an illuminated rectum flashback?)


In case I ever need this again, part 437

Medium-complex Plone Python scripts (looking at request), here: iterating over all plone instances and showing pending upgrade steps.

# Import a standard function, and get the HTML request and response objects.
from Products.PythonScripts.standard import html_quote
request = container.REQUEST
response =  request.response

# Return a string identifying this script.
print "<html><body><h1>Mass update steps</h1>"

doit = request.form.get('act',None)
if doit:
    print "<b>Updating now, cross your fingers and hold on to your hats</b>"
    print "<dl>"
    for pth in request.form.keys():
        if not '/' in pth:
            continue # this is the "act" variable?
        print "<dt>%s</dt>" % (pth,)
        plo = container.restrictedTraverse(pth)
        pst = plo.portal_setup
        for profile in request.form[pth]:
            print "<dd>%s ..." % (profile,)
            pst.upgradeProfile(profile)
            print " done</dd>"

    print "</dl>"
    return printed

instances=container.PrincipiaFind(container, 
                      obj_metatypes="Plone Site", search_sub=0)
mountpoints=container.PrincipiaFind(container, obj_metatypes="Folder", search_sub=0)

for (name, folder) in mountpoints:
  instances += folder.PrincipiaFind(folder,obj_metatypes="Plone Site", search_sub=0)

print "<form method='POST'><dl>"
for (name, site) in instances:
    pending = site.portal_setup.listProfilesWithPendingUpgrades()
    if not pending:
        continue
    print """<dt>%s</dt>""" % (name,)
    for step in pending:
        print """<dd><label><input name='%s:list' value="%s" type='checkbox' />%s</label></dd>""" % ('/'.join(site.getPhysicalPath()),step, step,)

print "</dl><input name='act' type='submit' value='Perform Upgrade Steps' /></form>"

return printed

Progress.

Way back in November, I lost about six weeks of lifetime to a six-hour physical migration of database servers. It did go without a hitch: the fact that there were intermittent downtimes was due to ARP caches and the like that I have no control over, but it was very… interesting, in the chinese proverb sense.
Today, I (somewhat secretly) moved the production database for our pages from one running server to another. The software update we have done in December meant that I could zig-zag from primary DB to read-only failover, copy the primary DB to the new server, change the config, and fail-back to the new locaiton of the primary server, all the while serving pages (at least read-only).
Dude.
Took me about thirty minutes, because my config automation isn't really good at handling change of IP, so I boggled why the new primary wouldn't come up. At the same time, this is much less of a cause for panic when you're still serving pages. Go me.


OK, this day is not the best ever.

I'm supposed to have a phone meeting with the head of our graduates' office re: websites, but half her department is spontaneously ill and things are a bit frantic over there. So this may or may not happen in the next hour. So I'm sitting here, working an hour of overtime, doing easily-interruptible jobs. Can y'all imagine how few easily-interruptible jobs I actually have?
M'colleagues are modernizing our backup system. Modernizing in a way that on Friday, my monitoring checks stopped working, because they configured an error into a central config file. (/etc/sudoers for the Unixy among you.). On Sunday, I find four dozen error notifications that the backup is trying to run as a user which is not privileged to run the backup. (They didn't change the username in all the appropriate places.) This is fixed easily enough by me. Then today, we get hit with ~30 automated mails "you know those 8 weeks of backups we promised oyu we'd keep? errrr, sorry, guys and gals, we accidentally destroyed the last six of those." This is really not a good day to be our backup guy.
Oh, and last Thursday/Friday was a department head meeting re: reorganisation. So it looks like I'll take over the mantle of IT security paperwork and policy ("and they don't have a plan B"); furthermore, our little part of the department (roughly seven people, Unix-only) will take over maintenance of the MS SQL servers from the formerly-Windows-now-Enduser group. And Sharepoint. Cause that's got Intarwebs in it. And maybe the middle slice of IIS that sits between "this is the server people's business" and "this is the highly specialized business app that does X". Which would at least mean I can renew their outdated encryption certificates.


BOM BOM BOM of DOOOOOM!

Yes chicken, Plone4's CSS manglifier will happily concatenate files that have Unicode Byte-Order Markers without stripping those out. For a change, I can't say I blame it.


Dear phantom.js,

C++, Ruby, Perl and Python? Surely, you're joking? (And no packages? Webspacken?)