Technical Blog


The risks and merits of automation

Today morning a customer decided to deploy a new /etc/ntp.conf configuration file, using his own automation software. His approach was somewhat more aggressive than desired, so he broke NTP on 30+ servers, leading to an alert flood. Using an Ansible role, I was able to re-install the correct ntp.conf and restore this important service within […]


Redundant PostgreSQL connection in Django

Let’s assume you have a redundant cluster of PostgreSQL servers, eg built with repmgr, and you want your Django application to benefit from this redundancy. As of Django 3.1, this is not really documented, but some easy steps gets you there, if you are using recent versions of PostgreSQL, psycopg2, Django and Python. First of […]


/var usage

Cisco Prime 3.x fills up /var

Symptom : Prime 3.7 won’t start. Reason : /var is full, as /var/log/wtmp fills up quickly : sudo -i ls -l /var/log/wtmp ade # utmpdump /var/log/wtmp | more [5] [06834] [tyS0] [ ] [ttyS0] [ ] [0.0.0.0] [Tue Feb 04 21:30:45 2020 CET] [5] [06835] [tyS1] [ ] [ttyS1] [ ] [0.0.0.0] [Tue Feb 04 […]


Auto-vivification in Python 3.x

Are you spoiled by Perl’s auto-vivification allowing to write such code and you want to do the same in Python ? An often used, somewhat ugly code pattern where you need to add a key in a dict when it’s not there yet: There is a better way since Python 3.3 (even if Perl’s type […]