Unpacking MessagePack

SALT messages are encoded with a library called msgpack, the Python implementation of MessagePack. How can we read them? Here’s an example message I want to decode: †£jid´20250602114126621578¦return£tcp§retcode�¢idABC-LAPTOP-02£funªconfig.get¨fun_args‘©transport We can do that with the same library: import msgpack with open('return.p', 'rb') as f: unp = msgpack.unpackb(f.read()) print(unp) Make sure you install msgpack: pip install msgpack This will print something we can read (newlines added by me): { 'jid': '20250602114126621578', 'return': 'tcp', 'retcode': 0, 'id': 'ABC-LAPTOP-02', 'fun': 'config.get', 'fun_args': ['transport'] }

June 5, 2025

Directories Ending in .d

Today I learned about why directories in a project might have names ending in ‘dot d’, such as minion.d/. Like many things in CS, there seem to be a few answers that may have inspired each other, and can both be true. It’s a marker for ‘directory’. It’s a directory of configurations that will be merged on startup. In my current experience, both have been true. SALT contains directories of configurations, that on startup are combined into the program state. So, I’d expect that convention to hold in other such programs.

June 4, 2025