28 May 2020

Rather Closer to the End

Well, the beginning was a good long time ago. And one thing I can always take away from the Drake Equation is that a primary reason that we’re alone is because civilizations just don’t last long enough to get past the deeply stupid stage that follows the enlightenment. Whether we do it to ourselves, or Giant Asteroid ’20 does the job for us, the bell is tolling.

I know, I’m a cheery sort of bloke, eh? You look at the news. I’ll go back to the small shit that I have control over. Like …

The garden is alive. Almost two weeks and nothing’s dead yet. On Saturday I’ll take off the bird netting, weed out the beds, and set the tomato plant cages. Yay!

SSH Agent Persistence vs CSH/TCSH

Y’all can skip this part if you want. It’s here as much for me to find it again if I ever need it as for anyone in Greater OutThereLandia.

The problem is “simple”. I have a group of systems I’m responsible for. The developers have a whole suite of scripts and processes based on the fact that they use the modern incarnation of the C shell, tcsh. I’m migrating them to newer platforms, and newer code repositories, remote code repositories. Access to these repositories requires SSH access. SSH key pairs are the answer to the problem, but the private key requires a passphrase to meet our security requirements.

Persistence across multiple login sessions is the key for the developers. Once they have an active login session on the platform, they want to leverage their SSH authentication without re-entering the passphrase each time it’s needed, or even each time they login (simulateous sessions) on the system.

All the tools I have laying about for managing persistent SSH keys across multiple sessions are pretty much Bourne shell based, and mostly I use a tool called keychain, written a while back by Daniel Robbins of Gentoo fame. I needed to find out how other people are solving this problem for csh/tcsh users.

What I learned is that not very many people are using csh/tcsh anymore. BUT. But, I found Mark A. Hershberger, who many moons ago wrote a page about managing SSH Agent via scripts, with a link to a sub-page with solutions for alternate shells (like tcsh/csh) – http://mah.everybody.org/docs/ssh-agent-startup … yes, that’s a plain HTTP link, no SSL, and your browser will hate it. Don’t worry, you’re not logging in or doing any banking there.

This was an awesome find for someone like me that spends little or no time in tcsh, but knows that it’s a bit of a janky environment for scripting things. I read, understood, and implemented the script as written. It didn’t work. Sigh. After a couple of hours complete with gnashing of teeth and pulling of hair, it turns out I was getting clobbered by a default feature of the environment called noclobber, which effectively prevented me from overwriting a file that already exists via redirection. So, if noclobber is set (which is part of the environment for these devs), then this code won’t work, if the target file, /tmp/blue.txt, already exists:

echo "I\'ve got the blues!" > /tmp/blue.txt

Once I learned about noclobber, and determined that I could not unset it and leave it unset because of user expectations, I found that I could force the overwrite with the judicious application of a ‘!’ character to decorate the redirection. This works, whether or not /tmp/blue.txt exists:

echo "I\'ve got the blues!" >! /tmp/blue.txt

With that problem out of the way, I was able to get the code to run at login. Then I started piecing together the logic I wanted to actually apply for these development users. For login, look for a file that defines an existing SSH Agent session. If that file doesn’t exist, or if it contains information about a defunct session, it will start a new SSH Agent session. IF there’s a running SSH Agent session, it’ll check to ensure the key is loaded, and prompt to load it if needed. So, this code goes into the users .login file in their home directory:

set sshAgent=/usr/bin/ssh-agent
set sshAgentArgs="-c"
set tmpFile=~/.ssh/ssh-agent-info
#
Check for existing ssh-agent process
#
if ( -s $tmpFile ) source $tmpFile
  echo $SSH_AGENT_PID
  if (! $?SSH_AGENT_PID ) then
    # echo "No $tmpFile, starting new agent…"
    $sshAgent $sshAgentArgs | head -2 >! $tmpFile
    source $tmpFile
    echo "ssh agent started [${SSH_AGENT_PID}]"
    ssh-add
else
  # the tmpfile was present with data, check it…
  # echo "Found $tmpFile, check data"
  set this=`ps -elf | grep ${SSH_AGENT_PID} | grep ssh-agent`
  # start ssh-agent if status is nonzero
  if (( $? != 0 ) && ( -x "$sshAgent" )) then
    # tmpFile exists, but stale data
    $sshAgent $sshAgentArgs | head -2 >! $tmpFile
    source $tmpFile
    echo "ssh agent started [${SSH_AGENT_PID}]"
    ssh-add
  else
    # Agent running, ensure a key is present
    set sa_data=`ssh-add -l`
    if ( $? != 0 ) then
      # need to add key
      ssh-add
    endif
  endif
endif

The original script for exiting the session would kill the SSH Agent outright. This is not so useful if you still have other login sessions running. So I wrote a few lines to attempt to ensure that only when the last running login was being exited, would the SSH Agent be reaped. This code goes in the user’s .logout file in their home directory:

set tmpFile=~/.ssh/ssh-agent-info
set sessCount=`w | grep $user | wc -l`
if ( $sessCount == 1 ) then
  # last user, clear out the ssh-agent
  eval `ssh-agent -c -k`
  /bin/rm $tmpFile
endif

And the solution works. The developers are minimally unhappy about the increased security wrapped around access to the code base, because they know I worked to make it as painless as possible while meeting policy requirements. It could always be more robust, but I tried to get all the common failure cases, and mostly the resolution to something I didn’t catch is for the user to log out of all of their sessions, then log back in again to reset.

Winding Down

Our condolences to the family and friends of 1st Lt. Trevarius Ravon Bowman, 25, from Spartanburg, South Carolina, who died on May 19, 2020, in Bagram Air Force Base, Afghanistan, from a non-combat-related incident.

Our hearts go out the families who have lost loved ones to COVID-19. Y’all, socially distance, wear a mask when you need to (indoors around other people for sure), and WASH YOUR DAMNED HANDS way more often.

Please don’t be one of the people who want to go into retail (or any other) businesses without a mask. Don’t be one of the people trying to up your chances of being DEAD by the time the General Election rolls around. Even if you don’t care for yourself, do you want to get ill, pass it on to an elderly parent (or a young child) and have them DIE because you’re behaving like a petulant child yourself? No, no, I understand that your role model in this case does indeed behave much like a petulant child. Don’t follow that particular lemming off the cliff. Stop. Think. Listen to medical professionals and keep safe.

I love you ALL.

17 May 2020

Spring, huh?

So, since we last were here together, we had several more overnight freezes. Sadly, at least one of them was a surprise. So one night I didn’t tarp the garden beds, and everything died. Yup, all of it. So I started over. Rototilled again, raked it all out flat again, bought new plants again, and got ready to put them in the ground, again:

Two garden beds ready for planting... again. Tomatoes and peppers in ready for transplanting into the soil.
Two garden beds ready for planting… again.

We’re not due for anything below 48F in the next ten days, so I expect that we’re actually done with overnight frosts. (Famous last words). But the plants look good, and since I did that work yesterday, everything is still alive:

Plants in the ground
Plants in the ground

Right now I’ve just got a variety of tomatoes and peppers, since those are what I want most. I’ll probably pick up some herbs and some beans to go in, in the next few days.

Lexi the mutt at my office window (Lexi TV)
Lexi at my office window (Lexi TV)

While it remains spring-ish, Lexi likes watching “Lexi TV”, quivering and growling at the vicious bushy-tailed rats (squirrels) invading her back yard.

Winding Down

Our condolences to the family and friends of Sgt. Christopher Wesley Curry, 23, from Terre Haute, Indiana, who died on May 4, 2020 in Erbil, Iraq, from a non-combat-related incident.

Marcia has been baking up a storm, and, well, I love it. I’m ordering some double doors to install in all the door frames, and getting pricing information on the necessary permits…. but it’s all delicious!

We continue, reasonably healthy, mostly home-bound, wondering what the idiots are going to say next.

The bright spot is that our state, in the process of putting off the primary, did so to ensure that this was a vote-by-mail election. We received our ballots, and our instructions in Spanish, completed and mailed them. Yesterday, the instructions in English arrived. Ah, well. We were able to figure it out. Pleased that unlike some Republican-led states, ours was sane enough to ensure that people didn’t have to stand in close proximity to each other to exercise their constitutional right to vote. Yay, Maryland!

Be safe, stay home as much as possible, mask and socially distance when you must be out. Please. If not for yourself, then for the people who love you and will miss you when you die of covid-19, with complications of politics and lack of sanity.

April 13, 2020

Health and Safety

We’re continuing on the bored, stir-crazy, and physically healthy trend here. We hope that all is well with you and yours.

Yard Work

Aside from working from home, and some indoor chores, most of my “spare” time has been given over to further yard work. During the week, I took half a day off. The first hour of that was conveying the dog to her second round of annual shots at the veterinary clinic. The rest involved picking up some veggies and a tray of flowers, then getting the veggies into the raised beds.

I started by removing last year’s landscape fabric and preparing the beds for tilling:

Two garden beds ready for tilling

Turning over the soil in those two beds, with a bit of amendment in the form of sterilized manure, was a matter of barely 15 minutes. That was followed by raking out and leveling the beds, and getting the plants installed.

Veggies installed in garden beds.

I haven’t yet setup the watering – it really isn’t needed at this time of year. And from today’s vantage, several of those tomato seedlings (in the near box) are already failing. I’ll have to pick up some more robust ones soon.

On the weekend, I continued working on the front yard. My primary focus was making that bed where the extracted tree once lived nice again. So on Saturday, I used the pick axe to turn over the soil in large chunks, and remove as many of the roots as I might. Then I used the tiller to turn the soil over and make it manageable. I raked and shaped the bed, then covered the back section with landscape fabric to keep the weeds down. Finally I mulched the whole bed. I continued with a few more bedding sections, with the eventual goal of getting the front yard in shape. I’m about half done. But here’s how that mound came out:

Mound, made pretty

Winding Down

DoD announced no new casualties in the last week.

Side note – I was up for a few hours during the night, comforting a dog terrified by the intermittent thunder. She’d just start to settle down, then another boom would wind her up again. Now, of course, I’ve got to work, and she’s curled up in a ball beside my chair, asleep and snoring. Sigh.

5 April 2020

Spring Chores

Turns out that the seasons roll by regardless of stay at home orders… Late last fall, during the cleanup, it was clear that the spruce that adorned the left side of the front yard was just about done.

The failing spruce

By February this year, there was no green left to it. This weekend: last rites were administered. Using the pole saw and the small electric chainsaw, I took the tree and both small shrubberies out, along with doing a fair bit of other spring front yard cleanup.

Today, my big hope was that the odd angle of lean was indicative of a shallow, shoddy root system. My hopes were fulfilled.

Stump removal

I first weeded out the bed, preserving the tiger lilies. Then I dug out stumps, starting with the two shrubs, then attacking the spruce stump. I trenched around that with the pickaxe, to a depth of about a foot, then started undercutting it. After a couple of hours of work just on this stump, I got a long 2×4 underneath one edge and broke it free of the remaining roots. Then I worked it up on it’s side onto a couple of short lengths, and was ready to knock the dirt out before hauling that off. I filled in the shallow hole and called it a day.

Our schedule remains the same – mostly home. I’ll go to the office for half a day this week, and on Wednesday there are two outings – in the morning, we’ll take the dog for the rest of her annual shots, then in the afternoon, we’ll go to pick up the groceries that we ordered on Friday.

Winding Down

Our condolences to the family and friends of Sgt. 1st Class John David Randolph Hilty, 44, from Bowie, Maryland, who died on March 30, 2020 in Erbil, Iraq, of a non-combat related incident.

3 November 2019

Take Two

I was four paragraphs into the first pass on this post when I managed to hit a stupid combination of keys on the Apple keyboard and moved backwards three links. Whoops, I thought, and went looking for the auto-saved draft. Um, not there? Sigh. Okay, take two – I wonder how much this iteration is going to vary from the last?

Fallen

Fall is finally, properly, here. Six weeks in, and we finally got two consecutive nights below freezing. We’re due for another frost tonight before it warms up just a shade. Also, for the first time, the snow icon made it into the long range forecast on my phone. Of course, “long range forecast” is just an effusive waste of characters when what you want to say is “lie.”

I got the outdoor water delivery systems winterized today. Yesterday, I repaired the motion detecting light outside the garage door. Wait, did I say “repair?” I mean replaced, with modifications. The old fixture wasn’t new when we bought this house in 2003. And it was hardwired. And it was positioned badly, in the far corner of the front of the garage, where it was partially blocked by the substantial crepe myrtle. Additionally, a moderate wind would use that tree to continuously fire the motion detection. So, due for work even before I learned that the plastics were going and one of the two light sockets was gone, on Hallowe’en evening.

In replacing the fixture, I moved it to front and center on the garage. I mounted a switch in the garage so that we could turn it off entirely without going to the breaker panel in the basement. And bonus – the LEDs draw 25 watts when active, as opposed to the dual 100 watt halogens that were continuously cycling in the elder unit.

Kitchen progress

Little progress, but: I’m going to be fabricating one new bank of cabinets whole, and I’ve got the measurements for those, so I can do some sketches and gin up a material’s list in prep for purchasing, then fabrication.

Bookish

I’ve been reading the Liaden Universe books from Sharon Lee and Steve Miller. I’d read some of them in the past, out of order. I now have ALL of the books (21 of them, I think), and I’m following one of the many suggested reading orders (this one’s from Baen, and probably originates with the authors, so there’s that. I like them a lot.

Winding Down

Our condolences to the family and friends of Sgt. Nathaneil G. Irish, 23, of Billings, Montana, who died on Oct. 27, 2019, of a non-combat related incident at Camp Taji, Iraq.

28 July 2019

A Brief Respite

As far as I can tell, June and July weren’t as wet as last year, but we’ve had at least a bit of rain each week. Additionally, for most of the last week, we had mornings that were a lot more like mid-September than late July – temps in the morning in the low 60’s instead of the mid 70’s, and highs in the 80’s instead of high 90’s. I will note that, botanically, we got nearly four weeks out of our tiger lily bloom this year, instead of the usual two-ish weeks. The picture below is from about the peak of blooming. There are only seven blooms left now.

Tiger lilies in mid-July

The veggie garden, however, has been a bit disappointing. We only worked two of the six beds this year, and the zucchini only lived a few weeks. The tomatoes are a bit sad, but still doing better than the peppers, from which I expected a bit more robustness.

I’ve been busy with work, and relaxing in between. Friday I was off work, so I got caught up on the yard work and mowing before the heat returned properly (on Saturday). With luck, and a lack of rain, the lawns shouldn’t need much mowing for a couple of weeks – the one true upside of these hot days.

I cleaned the coffee roaster, and got a pound of Columbian from Sweet Maria’s roasted in the Behmor 1600+ today. I also managed to finish up the important work of reading, ordering, and placing my votes for the Hugo Awards, to be celebrated at WorldCon 2019, in Dublin, Ireland. Where I won’t be. So have fun, y’all!

Winding Down

  • Nothing new from DoD: good.
  • Plans for the upcoming week: stay in air conditioned comfort where possible.
  • Goal: wish an early, disfiguring disease upon the kids who ruined our early AM hours on Thursday with a 45 minute session of loud fireworks, terrifying Lexi (which keeps me awake in the night, and exhausted in the day).

20 May 2019

Whew!

There are pictures, but I haven’t downloaded them yet. The weekend was full of yardwork. Saturday was a full front/back mowing and some other front yard tasks. Sunday both Marcia and I worked on fully preparing two of the raised beds for pepper, tomato, and zucchini plants. This year, we’re lining the beds with weed block fabric to attempt to make the fight a bit fairer to us.

In and around the yardwork, we had a game night over at Linda and Mike’s place, where much laughter accompanied a session of Cards Against Humanity. Sunday night was 80’s music Cabaret night at Annapolis Shakespeare. What fun.

Still so tired, though. I’ll try to catch up with y’all later.

15 August 2018

Busy times – I managed a fair bit of yardwork this last weekend, and we wrapped with Sunday at the Annapolis Shakespeare Company’s August Cabaret Night, featuring Christine Asero. What a talented, lovely lady. From show tunes to her own country songs, she put on a hell of a show.

Marcia got herself a pasta accessory for our Kitchen Aid stand mixer. She put it to good use yesterday:

Homemade pasta, garden tomato and chili

Homemade pasta, garden tomato and chili

Marcia made the fettuccine pasta, we got the sauce out of a jar, adding sauteed chicken. A tomato from the garden, shared, and a serrano chili for me. Yum!

Note to self – arrange to go to WorldCon someday. Today, however, is not that day.

*      *      *

Our condolences to the family and friends of Staff Sgt. Reymund Rarogal Transfiguracion, 36, from Waikoloa, Hawaii, who died on Aug. 12, 2018, of wounds sustained when an improvised explosive device detonated near him while he was conducting combat patrol operations in Helmand Province, Afghanistan.

1 August 2018

We still have a few of the Tiger Lily blooms extant in the front yard beds, which is unusual. They’re often utterly gone by the third week in June. I’ll put it down to a generally cooler summer here (so far), and a couple of weeks of rain. All flowers generally get along with more water and less heat. Note that I was watering them weekly during the 4 weeks of little-to-no rain from late June through late July. Here they are from a couple of weeks ago:

Tiger Lilies in bloom

Tiger Lilies in bloom

20 May 2018

Howdy. A full work week, followed by chores and theatre on Saturday, and mowing a wet, wet, tall set of lawns today. We had just one rainy stretch – it lasted from Saturday the 12th until this morning. All in, according to my still-poorly-sited rain gauge, we got just under 5″ of rain in that period of time. Not too shabby.  The abbreviated garden hasn’t drowned or died from lack of direct sunlight, either … yet.

I’ve been working my way through some Python (programming language) training, and I’ve reached once again the point where I spend more time fighting to understand how to solve the problem as poorly-posed, than I do on solving the problem. The underlying issue is that the specification and sample code in the exercises end up displaying only a passing resemblance to the solution code. If I make my best guess about just what the author of the tutorial wants, I end up with either slightly or dramatically different code, sometimes solving problems that clearly aren’t as described in the text. Maybe that’s part of the lesson – do the best you can with incomplete specifications and remember that it’s not permissible to kill the stakeholders. Harumph!

*      *      *

DoD reported no new casualties in the last week. US school districts did, sadly. Our elected representatives should be doing more to address that than their corporate donors would prefer.