Changing FreeBSD’s rcorder without patching

I was upgrading my jails, when I noticed that the WriteFreely instance for օրագիր.հայ was not running. I jexec’d into the jail and noticed that the writefreely process was not running at all, doing a simple service writefreely start made it work. Why?

Turns out that WriteFreely needs MySQL to be running during startup, and I assume it wasn’t. By running rcorder I was able to see the boot process.

# rcorder /usr/local/etc/rc.d/* 2>/dev/null
writefreely
rsyncd
mysql-server
garb

So, my first instinct was to patch the /usr/local/etc/rc.d/writefreely script and add mysql into the REQUIRE line, but then I thought to myself, I can’t be the only person who had this problem, right? I mean, I know that the script will be overwritten during the next upgrade. What’s the actual solution here?

After searching a bit, I found the article Override rc order in FreeBSD, so based on that, I created the following file: /usr/local/etc/rc.d/__writefreely which has the following content

#!/bin/sh

# PROVIDE: __writefreely
# REQUIRE: mysql
# BEFORE: writefreely

This is a much cleaner way to do things, let’s check the rcorder again

# rcorder /usr/local/etc/rc.d/* 2>/dev/null
mysql-server
rsyncd
garb
__writefreely
writefreely

Much, much better. After restarting the jail, however, I noticed that WriteFreely is still not running… huh?

Oh, of course, I just needed to do chmod +x __writefreely

And now it works.

Reply via email.

FreeBSD-Update and ~200 Jails

Initially, when I heard about freebsd-rustdate I was very skeptical. I have a fear of “Written in <new hip language>”. I thought, however, I’ll wait, and when the time comes, I will try and see how it works.

For the last couple of days I’ve been updating hosts and jails for my customers and my company, and one of the best resources I found was the FreeBSD Update page on FreeBSD’s Wiki, specially the “freebsd-update Reverse Proxy Cache” section. It has saved me hours when updating the hosts. For some hosts we even did an NFS mount of /var/db/freebsd-update/files directory.

But when it came to upgrading the jails, I realized that this is going to take a very long time. Each host has at least 15 jails, up to 50. There’s a host which has 100+ jails.

Upgrading all of them was going to take a very, very long time. So I ended up doing some research. Here were my options.

  • Build FreeBSD once and run make install everywhere else using NFS and DESTDIR (I used to do this years ago)
  • Migrate to PkgBase (we’ve started doing this, but we’re not done yet, and it will take a while)
  • Nuke the Jails, start fresh, and just move the data (this could work, and I will do that in the future, but now I need to update ~200 jails in the coming 3 days)
  • Somehow, make freebsd-update run faster.

As you have guessed, I went for the last option. Uncle Dave reminded me of freebsd-rustdate again, and I decided to give it a try. Even before starting, my good friend Daniel wrote in our group chat:

@dch my guy. You just saved me several hours per year of flipping back and forth between terminals waiting for the next part of a freebsd-update upgrades to finish running on a million systems.

I arrived to my parent’s house, installed freebsd-rustdate on a host, and tested it on a single jail. Here is my initial reaction

holy fuck freebsd-rustdate is fucking fast

Like I said, I hate “rewrite in <new hip language>”, but clearly, this time it’s a winner.

And frankly speaking, my Jail manager, jailer, does have the same problems that freebsd-update has. It’s much, much slower when you have to manage 100+ jails. I will, however, not rewrite it in another language (for now, and if I do, it will be in Oberon). Although I might end up spending some good amount of time optimizing it 🙂

Kudos to Matthew Fuller, amazing work. And I have to mention, when I was thinking about moving to FreeBSD more than a decade ago, his rant BSD for Linux Users was the deciding factor for me, and I’ve been using FreeBSD ever since.

That’s all folks…

Reply via email.

Antranig Vartanian

January 3, 2025

Here are some issues I had, which I fixed in the last three days

  • Email client not updating properly on phone. Fixed
  • Too many apps on phone and programs on computer. Deleted
  • Too many notes here and there. Collected and centralized
  • Too many packages outdated. Upgraded
  • Too many messages from friends left unanswered. Answered
  • Too many wires and cables in the cabinet. Organized
  • Too many cameras unused. Pictures Captured
  • Too many things on my TODO lists. Clarified.

Sometimes all you need is to sit down, clean up your laptop’s monitor and get to work.

Wish you all the best in the coming year. And if I ever missed your message, I’m sorry. If I ever texted too much, I am not.

That’s all folks…

Reply via email.

Antranig Vartanian

December 22, 2024

We’ve organized a CTF (again), but this time it was way more interesting than the previous years, not just because of the newly introduced challenges, but because finally we are seeing the effects of LLMs in our industry, both the good and the bad, and we can now predict one of the possibilities of the future.

I need to articulate my thoughts for couple of days, and a long post might be published soon.

Reply via email.

Link

First Router Designed Specifically For OpenWrt Released – Software Freedom Conservancy:

The New OpenWrt One on sale now for $89 — Ultimate Gift for Right-To-Repair Enthusiasts
[…]
This device services your needs as its owner and user.

This news makes me very happy. But here’s the interesting part;

This new product has completed full FCC compliance tests; it’s confirmed that OpenWrt met all of the FCC compliance requirements. Industry “conventional wisdom” often argues that FCC requirements somehow conflict with the software right to repair. SFC has long argued that’s pure FUD. We at SFC and OpenWrt have now proved copyleft compliance, the software right to repair, and FCC requirements are all attainable in one product!

This is even better news. Combining a device like this with something like OpenWISP will make a killer commercial deployment, specially for organizations such as hospitals and low-budget government agencies in the developing world.

Let’s see how it goes.

Reply via email.

Antranig Vartanian

October 20, 2024

The story that Stefano shares in Outdated Infrastructure and the Cloud Illusion is a very sad one. I’ve seen this happen even at governments.

Current hypes aside, the NIST definition of Cloud Computing is actually under-hyped. A cloud should be on-demand, broad, elastic and measured. However, it can be Public, as well as Private. People keep forgetting that we can have Private Cloud deployments, and systems like FreeBSD, even Proxmox, have the ability to do that.

We can do better.

Reply via email.

dtrace.conf is back as dtrace.conf(24)

Woke up middle of the night to grab a cup of water, decided to check Mastodon, and what do I see?

dtrace.conf(24) Tickets, Wed, Dec 11, 2024 at 9:00 AM

This makes me very happy! I love seeing DTrace in the wild, and having more DTrace content out there is beneficial to everyone in the DTrace community.

Obviously, being a Syrian with passport issues, I will not be able to attend, but hopefully everything will be recorded and published online. I’ll try to make it to dtrace.conf(28).

Have fun everyone!

Reply via email.

Antranig Vartanian

October 18, 2024

Couple of years ago I read the book “Getting Things Done” by David Allen. One of the things he mentioned is that

When I coach a client through this process, the capture phase usually takes between one and six hours, though it did take an entire twenty hours with one person (finally I told him, “You get the idea”)

Initially, I did not believe this. I’m not saying that David was lying, but rather, I cannot believe it took someone twenty hours to “unload” their state of mind.

Today, I take that back. I’ve fallen off the wagon (or is it “on the wagon”?) couple of months ago, and today I decided to recapture and re-implement my setup.

It took me 6 hours, and I’m not even at my peak load. I can’t imagine what would’ve happened if I delayed longer, or took on more projects.

Now that I have 120 things in my “Next Action” list (according to OmniFocus), I can finally feel calm knowing that I know exactly what I have to do. Hell, I even found time to blog about it.

See you tomorrow…

Reply via email.

How to Make Your Website Not Ugly by Hilary Stohs-Krause

I was scrolling on the internets when I noticed the following video title, “How to Make Your Website Not Ugly”, and I thought “ugh, another one of those videos where the website becomes slower and slower…”, and then I read the rest of the title, “Basic UX for Programmers”.

Oh! It’s about UX, not UI! Well I love that!

After 45 minutes of watching, I can say this is easily one of the best talks about UX that I’ve ever seen! The examples are amazing, and I have learned something new and interesting every 5 minute!

Totally recommended!

Kudos to Hilary Stohs-Krause and thanks to {}NDC Oslo for publishing the recording.

Reply via email.