Upgrading and Restarting Salt on OS X
I have been working a lot with salt this month on OS X. I have done some work in the past with Linux and it is a much more pleasant experience. Recently I have salted the installation of DataDog on a fleet of Mac Minis. My initial attempts did not work for several reasons. First, I was getting an error message from salt complaining that list indicies must be integers, not str. This turned out to be a python bug that was resolved in the latest version of salt. After upgrading salt-master and salt-minion to the latest versions I was getting yet another error stating that global name ‘salt_system_encoding’ is not defined. It turns out that this error can be resolved by restarting salt-minion. This turned out to be an issue on OS X because if you attempt to simply restart the process with salt-minion restart it hangs up and does nothing. If you try to run kill, or killall it is not able to match the name salt-minion for some reason. At first I was logging into each box manually and kill 9ing, but this kind of defeated the entire purpose of salt so I was determined to find a better way. This is where pkill comes in to save the day. pkill is able to match on salt-minion and is a working solution to restart salt-minion. On OS X salt-minion appears to run as a super daemon and immediately restarts if you try to kill it. This is not so bad since all we need to do to resolve the errors above is kill all of the old salt-minion processes. The complete process to upgrade and restart salt-minion on OS X is outlined below:
- Upgrade Salt (Assuming you installed salt with pip)
`salt '*' cmd.run '/usr/local/bin/pip install salt --upgrade'`
- Restart Salt Minion (Be extra careful with this command)
`salt '*' cmd.run 'sudo pkill -f salt-minion'`
- Verify that you are on the latest version (salt-minion 2015.5.5 (Lithium) as of this post)
`salt '*' cmd.run '/usr/local/bin/salt-minion --version'`
Thank you for reading! Share your thoughts with me on bluesky, mastodon, or via email.
Check out some more stuff to read down below.
Most popular posts this month
- 3 packs
- Coming of Age in the Craw
- Coursera Rails Module 2 Notes
- Growing the CircleCI Community with Discourse
- I sold all my shit
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- DEP-18: A proposal for Git-based collaboration in Debian from Optimized by Otto
- [RIDGELINE] No Phones in The Ten-don Shop from Craig Mod — Writer + Photographer
- My next chapter with Mastodon from Mastodon Blog
- How many pillars of observability can you fit on the head of a pin? from charity.wtf
- The Software Essays that Shaped Me from Refactoring English
- Give Your Spouse the Gift of a Couple's Email Domain from mtlynch.io
- Skip the Next iPhone from Articles on Jose M.
- Have smart glasses finally hit an inflection point? from The Torment Nexus
Articles from blogs I follow around the net
Pluralistic: Meta's new top EU regulator is contractually prohibited from hurting Meta's feelings (01 Dec 2025)
Today's links Meta's new top EU regulator is contractually prohibited from saying mean things about Meta: It's one thing to hire an ex-Meta lobbyist, another entirely if she's signed a non-disparagement contract. Hey look at this: Delights…
via Pluralistic: Daily links from Cory Doctorow December 1, 2025Getting Warmer
ESA/Hubble & NASA, ESO/ Lutz Wisotzki et al The early Universe as seen by the MUSE spectrograph on ESO’s Very Large Telescope. So first the Big Bang happens. Everything is incredibly hot and dense; there are photons flying everywhere, but they keep coll…
via Brian Koberlein December 1, 2025Recently
This’ll be the last Recently in 2025. It’s been a decent year for me, a pretty rough year for the rest of the world. I hope, for everyone, that 2026 sees the reversal of some of the current trends. Watching This video from Daniel Yang, who makes spectacular b…
via macwright.com December 1, 2025Generated by openring