New Country and New Job

I thought when I moved my website to WordPress, I’d blog more. If anything, I’ve blogged less. But hey, I have a good reason. About 4 months ago, I moved to Dublin, Ireland. This was to start my job at The Search Engine company. Today I finish 4 months in Dublin. It feels like much more. It’s been an interesting and stressful few months. All the research we did for the months before we moved helped out. It came in especially handy while house hunting.

Ever since I got here, I feel like I’ve been trying to get things done to get my life stable. The first task was finishing up all my paperwork and initial setup tasks. So, registering with immigration, getting my PPS number, and getting setup with a phone. Once I had the essentials, the next step was finding an apartment. The Dublin rental scene is particularly stressful but thankfully, I had relocation assistance. We’re often better at research and we actually found the apartment ourselves. We used the relocation folks to negotiate the lease and help with the initial tasks of moving in.

We now live in a quiet North Dublin suburb. It’s so quiet that the loudest noise is often the sound of our ears ringing from the sheer silence. The beach is a short walk away, but we can’t see it from the apartment. My morning commute is a comfortable 45 mins by bus and train or about 25 mins by bicycle. On a good weather day, I cycle in to work. Living here, I realise how people run in the afternoon. The weather in the afternoon is actually often pleasant and not the kind that tries to kill you.

The job itself is interesting. I’m in a role that I have enjoyed a lot in the past. It’s a mix of doing ops work as a sysadmin and a bit of doing automation. The idea is to automate as much away as possible from our day to day ops work. My team has 10 of us in two different time zones who manage to do way more work than it should be possible for us. The biggest different from my previous jobs is that I work with Windows more often. It’s fun to learn new things. Everything is different and sometimes, things don’t work because Windows.

Hanging up my red fedora

Feb 12th was my last day at Red Hat. I sent a very similar version of this blog post as a note to my colleagues as well. It’s been a fun nearly 3 years working at Red Hat and wearing the Red Hat fedora[1]. I’ve had a wonderful time working for Red Hat both from the New Delhi and the Mumbai offices. I’ve enjoyed the odd visits to Bangalore over the last few years. I’m very grateful for my time here and it’s time to move onto bigger adventures elsewhere.

In 2015, I did not think that a chance conversation with Sankarshan at FUDCon Pune would lead to interviewing at Red Hat 6 months down the line and subsequently working here. Over my 11-year career, this is the first time I’ve had a fantastic manager who has been both a friend and a mentor. Remote work is challenging in general. I could not have pulled off dealing with the various challenges if it weren’t for Sankarshan’s help and encouragement. I’m grateful for the office mangers in Delhi and Mumbai for giving me a second home for when I wanted to meet people[2].

I’m leaving here with great memories, friendships, and great lessons learned. I’ve had the opportunity to help stabilise Gluster infrastructure. When I look back to how things looked, I’m grateful that it’s a sea of change. I could not have been successful at Red Hat without the help of folks in my team in Gluster and in other parts of Red Hat. In particular, I’m grateful to Sankarshan, Alfredo, Amye, Atin, Jeff Darcy, John Strunk, Nithya, and Shyam.

The fondest and funniest memory of my time at Red Hat is going to be about that time when Jenkins started speaking French. If you don’t remember or you don’t know about this, you should read the post-mortem[3] for that failure. I wrote a blog post about it last week as well.

I will no longer be a Red Hat employee, but I’m still going to be a Gluster community member. I’ve been on Freenode for than 10 years and I suspect I’ll continue to be there for many years to come. If you want to stay in touch, IRC is going to be the best way to reach me and have me respond.

[1]: I didn’t actually get my Red Hat Fedora, but let’s not get into semantics 😛
[2]: Or just sit in air conditioning.
[3]: Unless you want to talk to me about an infra issue, in which case, file a bug 😀

The Funniest Incident Postmortem

Recently, I had a chance to think about an outage that I debugged and fixed a few years ago that involves Jenkins and systemd (or in this case lack thereof!).

Generally, if you want to run a task at the end of every Jenkins job whether the job has passed or failed, you have two options. You could use trap and write a clean up function. I would highly recommend that you use trap. Or you could be like me and write a post-build publisher that would run a script if it finds the line “Building remotely” in the console output. It’s quite hacky, but since the first line of every job is “Building remotely“, it works. I used to depend on this for clean up on a couple of Jenkins jobs a while ago and later removed it because of this infamous outage.

The Problem

Let me preface this by stating and this happened due to a combination of factors that I don’t expect to repeat. We were using an old version of Jenkins on an old version of CentOS. This means, it was still using init scripts and not systemd. The init file is just a shell script.

If you didn’t already know, SSH tends to forward your LANG information to the environment you connect to and force that environment to be similar to your current locale. I use en_US, but my French sysadmin colleague uses fr_FR locale. Which mean if I connect to a server, I would have English errors messages and if he did, he would have French ones.

When my colleague restarted Jenkins on that fateful day, his environment leaked into the Jenkins init script possibly due to a bug. Voila! Jenkins now speaks French. This meant my clean up didn’t work anymore. Instead of “Building Remotely” we had “Construction à distance“. Obviously, all the jobs failed.

The Solution

I had to stop and start Jenkins again so it spoke English. We made plans to upgrade both the OS and Jenkins so we didn’t run into this specific bug again. Aside from making sure that Jenkins didn’t accidentally speak French again, we also removed the clean up script.

In this case, the the job was creating rpms using mock. We would run mock with sudo and that meant the rpms were owned by the root user and the jenkins user could not delete the rpms. My solution back then was to use ACLs to give the jenkins user write access to files in the Jenkins workspace folder irrespective of the real owner. You can read my original postmortem on the gluster-infra mailing list archives.

We are currently in the process of changing hosting providers. The fix with ACLs always seemed hacky to me and I wanted to take this chance to remove the ACLs entirely. I’ve just added the jenkins user to the mock group and we build rpms without using sudo. That solves all the problems much more cleanly.

But hey, it brings me great joy to say we had a bug where Jenkins spoke French and thus caused a fun day of debugging and fixing.

Getting rpcbind to work without IPv6

This advice is going to be useful to a small subset of folks. But it’s useful nonetheless. With us being nearly exhausted of IPv4 addresses, we should probably not be disabling IPv6, but there are some rare situations where some tests depend on IPV4 only. The Glusterfs regression test framework makes a lot of assumptions. One of them is that the network is always an IPV4 network. Gluster does work with IPv6. However our tests and related regular expressions haven’t yet moved to IPv6.

We’re in the process of moving cloud providers. Every time we move, we run into some trouble with server setup. There’s some setup that’s different in base images across the spectrum. Every time, we run into a trouble with rpcbind refusing to start. Every time, we think we have it figured out and automated it away. This time we found a new way it could break!

Generally, this is how you disable IPV6:

  • Add IPV6INIT=noline in /etc/sysconfig/network-scripts/ifcfg-eth0
  • Add NETWORKING_IPV6=noline in /etc/sysconfig/network
  • Run sysctl net.ipv6.conf.all.disable_ipv6=1
  • Run sysctl net.ipv6.conf.default.disable_ipv6=1

After you disable IPv6, rpcbind will fail with the following error:

rpcbind.socket failed to listen on sockets: Address family not supported by protocol

To fix the error you need to reboot with dracut -v -f and reboot. This process is described on the Red Hat Knowledgebase and has worked for us in the past.

In the new provider, we ran into the same error despite doing that. What we discovered is that we need also remove all /etc/hosts entry that have ::1 in them. Because, if a reverse DNS entry converts to an IPV6 entry, that causes rpcbind to try to make IPv6 connections and the error looks just as though you did not run the dracut -v -f command.

My Personal Productivity System

With everyone having a phone, there’s a whole bunch of online todo lists and tools that help you keep track of your life and improve your productivity. I’ve tried a whole bunch of them. I’ve actually cycled through the entire lot. I’ve used almost all the tools, I’ve done a bunch of paper methods and the one that’s stuck so far is a modified version of Bullet Journal + Chunk Scheduling my day according to the strategies that Deep Work suggests. It’s still a challenge to do it every day and to get it right.

I’m serial procrastinator. I need some system to make my life work. The bit I’m most likely to put off is when it involves needing to talk to someone else. Especially more so when it involves having to go to a government office, talk to someone, and get a task done. This makes for fun when I want to travel, because all the visa stuff requires me to do a series of in-person interactions to make happen.My bullet journal notebook and schedule notebook

My systems works with my listing down the tasks I want to do at the start of the day. Then I schedule it into one of the 2-hour blocks I’ve divided my day into. Some blocks are fixed and will always have the same things. The first 2-hour block after I wake up is when I meditate and write. This is also the block where I workout. The next 2h block is where I shower, have breakfast, and start work. Then the work blocks begin. At some point I take a 30 min lunch break and after lunch, I sit down and look at what I’ve done so far and rejig my day around if it needs to happen.

During the day, any incoming requests gets added to my Backlog on Google Keep. I decide after my current task if I’m doing it today, this week, or later. I will then catch it during a weekly review.

I’ve been using this system for a few months now. It’s worked great on days when I’m at a 100%. On some days, I’m sleep deprived or I wake up really late. That throws a spanner into the whole thing. I end up not being able to focus or really get anything done. At that point, I usually start with a Pomodoro timer. I like using it for about 2h, after which I can focus.

Pomodoro does not work for me throughout the day because if I’m coding or debugging, I’d rather not step away from the problem. It helps to be in that state of mind throughout, rather than take breaks. If I’m doing a task that I find tedious, I find Pomodoro very useful. In September, when I was working on submitting assignments for my degree program, I found having a Pomodoro timer made sure that I would have structured breaks in my schedule.

I’m still learning and tweaking this system. At the end of the year, I’ll write another review of how well this has been going for me.