Celery to Chew On

Posted on Wed 06 May 2020 in hints-and-kinks • Tagged with Django, MySQL, HAProxy, Celery, Python • 7 min read

Asynchronous Celery tasks that manipulate a MySQL/Galera database from a Django application can produce very interesting behavior when HAProxy is involved.

Continue reading

Ceph Erasure Code Overhead Mathematics

Posted on Sat 30 November 2019 in hints-and-kinks • Tagged with Ceph • 2 min read

In a Ceph cluster, the frequent question, “how much space utilization overhead does my EC profile cause,” can be answered with very simple algebra.

Continue reading

Using ftrace to trace function calls from qemu-guest-agent

Posted on Wed 21 August 2019 in hints-and-kinks • Tagged with libvirt, Linux, ftrace, Qemu • 4 min read

When you are using functionality that is buried deep in the Linux kernel, ftrace can be extremely useful. Here are some suggestions on how to use it, using the example of tracing function calls from qemu-guest-agent.

Continue reading

Configuring CLI output verbosity with logging and argparse

Posted on Wed 01 May 2019 in hints-and-kinks • Tagged with Python • 4 min read

Command-line interfaces frequently produce output whose verbosity your users may want to be able to tweak. Here’s a nifty way to do that.

Continue reading

Using coverage with multiple parallel GitLab CI jobs

Posted on Sun 10 March 2019 in hints-and-kinks • Tagged with Python, CI, GitLab • 2 min read

If you ever write unit tests in Python, you are probably familiar with Ned Batchelder’s coverage tool. This article explains how you can use coverage in combination with tox and a GitLab CI pipeline, for coverage reports in your Python code.

Continue reading