-
Hi!
-
My name is Anton,
-
I am a software engineer working at Canonical, nërd, and cat lover :3
-
I like everything that is somehow connected with programming languages, computer science and internet of things.
LLM vs SQLite
For anyone using AI tools, here is something for you to try. Imagine you have SQLite database with a following schema & data: create table addresses (ipv4 blob not null); insert into addresses (ipv4) values (x'c0ae1337'); The task is pretty simple: Return IP v4 address in a human readable format. Answers: IP v4 address in a dotted-decimal format 192.174.19.55 SQL query https://sqlite.org/json1.html#jptr select printf('%s.%s.%s.%s', '0x'||substr(hex(ipv4), 1, 2) ->>'$', '0x'||substr(hex(ipv4), 3, 2) ->>'$', '0x'||substr(hex(ipv4), 5, 2) ->>'$', '0x'||substr(hex(ipv4), 7, 2) ->>'$' ) as ipv4 from addresses; ...
Backporting deb package
Noble Numbat comes with golang-defaults (2:1.22~2build1) which brings in golang-1.22-go. However, this version is slightly outdated as Go 1.24 has already been released. Each major Go release is supported until there are two newer major releases. For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release. Of course you can simply run sudo snap install go --classic to get the latest and greatest version of the Go compiler and toolchain. But what if, for some reason, you need a .deb dependency for your project? ...
Mikrotik + Tunnelblick
This morning, I discovered that I could no longer connect to one of my Mikrotik routers via OpenVPN using Tunnelblick. The Mikrotik is still running 6.49, and OpenVPN configuration was originally created back in 2020. The router is located 2000 km away from me, so I started to get a bit nervous. Fortunately, the same OpenVPN client profile worked fine on another machine and on my iPhone, which allowed me to access the console and confirm that the issue was not the Mikrotik itself. ...
Go embed and execveat
In the Plug It In: Designing for Extensibility there was something untold: But what if your driver requires some third-party tools to be available on the system? That’s where things get a bit more complicated but still solvable. Indeed, some of the power drivers supported by MAAS rely on third-party tools that need to be installed on the system. But what if there is no way to run snap install or apt install? ...
Hotfixing a snap
I am not going to start yet another debate about whether snaps are good or bad and if you should use it. For me snaps are solving a lot of problems. Yes, they might be not ideal but they work and they work well (both from a developer and a user perspective). I recently heard someone’s claim that once application is packed as a snap you cannot modify it. For example, you cannot edit a Python file (related to a deployed snap) and thus you cannot quickly add more logging which could help troubleshooting and hotfixing various issues, because the whole snap is read-only. ...
Plug It In: Designing for Extensibility
Disclaimer: I am a Senior Engineer on the team building MAAS at Canonical. Opinions expressed are solely my own. Some of you might not know, but MAAS is an evolution of Ubuntu Orchestra which originated back in 2011. Every now and then it’s good to revisit old design decisions, especially if they could be solved more efficiently today. New languages and frameworks have emerged and user needs have evolved as well. That’s why I am always looking for ways we can improve MAAS. Let’s try to model power drivers differently. ...
Etherbooting Linux 2.2.17 (with QEMU)
Hic sunt dracones! Why am I doing all of this? Over the past few years, a lot of people have asked me to explain them what MAAS is and what is netboot. So I thought it would be a good idea to write about the problem itself and how solutions evolved over time. Before tackling things like quadratic equations, you start by learning numbers and basic arithmetic, right? In the previous post we’ve covered RARP and got to the state where our machine was requesting /tftpboot/kernel.10.166.116.76 over TFTP. ...
Reverse Address Resolution Protocol (RARP)
These days, we take certain things for granted: there’s always DHCP, PXE-enabled clients and modern UEFI firmware with rich UI and mouse support. Imagine we are in the 1980s: the Xerox Alto already exists, but it’s still too early even for BOOTP. Though the world looked very different back then, the problem of network booting was already there. The concept is simple: computer contains bootstrap code stored in a non-volatile memory (e.g. ROM), which allows it to connect to a server and retrieve the kernel over a network. ...
Importance of tests readability
We all love to say that tests are important and strive to get at least 80% test coverage. But very often, tests are not considered to be a real code. Developers treat tests as second-class citizens. It’s just a test; who cares if it is messy, right? And nowadays, with all the AI coding assistant tools, we can just ask the machine to write tests for us because writing tests is boring. ...
Go test inside LXD container
When you’re testing software that interacts with another system, it’s common to mock all the dependencies. But let’s be real – mocks are great for simulating interactions, yet they don’t give you any guarantees that the actual integration between systems will work as expected. What is the purpose of mocking database if your code relies on the database behavior (e.g. unique index constraint)? You should always consider writing integration tests! ...