Docker fails to create endpoint posted on 24 December 2016

I ran into this issue recently while trying to get tensorflow running:

michel@xone:~$ docker run  -p 8888:8888 gcr.io/tensorflow/tensorflow
docker: Error response from daemon: failed to create endpoint high_raman on network bridge: failed to add the host (veth3c0e4fe) <=> sandbox (veth21faddb) pair interfaces: operation not supported.

Nothing looked suspicious in ip addr

michel@xone:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 8c:70:5a:ff:a4:08 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.71/24 brd 192.168.1.255 scope global dynamic wlp3s0
       valid_lft 79660sec preferred_lft 79660sec
    inet6 2602:306:ce40:a090:8e70:5aff:feff:a408/64 scope global noprefixroute dynamic 
       valid_lft 2591806sec preferred_lft 604606sec
    inet6 fe80::8e70:5aff:feff:a408/64 scope link 
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:d3:0f:49:9b brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever

Looking around, it seems that Archlinux needs to reboot for Docker to properly work. I didn’t look any further, but at least this did the trick for me.


Force update ttf-dejavu posted on 09 November 2016

On archlinux, ttf-dejavu 2.37 requires a forced upgrade. If you don’t, you will be greeted with this error:

michel@xone:~$ sudo pacman -S ttf-dejavu
[sudo] password for michel: 
resolving dependencies...
looking for conflicting packages...

Packages (1) ttf-dejavu-2.37-1

Total Installed Size:  9.75 MiB
Net Upgrade Size:      0.57 MiB

:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring                                                              [########] 100%
(1/1) checking package integrity                                                            [########] 100%
(1/1) loading package files                                                                 [########] 100%
(1/1) checking for file conflicts                                                           [########] 100%
error: failed to commit transaction (conflicting files)
ttf-dejavu: /etc/fonts/conf.d/20-unhint-small-dejavu-sans-mono.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/20-unhint-small-dejavu-sans.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/20-unhint-small-dejavu-serif.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/57-dejavu-sans-mono.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/57-dejavu-sans.conf exists in filesystem
ttf-dejavu: /etc/fonts/conf.d/57-dejavu-serif.conf exists in filesystem
Errors occurred, no packages were upgraded.

Make sure to run pacman -f for this package.

michel@xone:~$ sudo pacman -S --force ttf-dejavu

Incomplete kernel update posted on 30 October 2016

These are quick notes about fixing my system after an incomplete kernel update.

During a system update, my workstation suddenly shut down (hardware failure). I was working on something else during the update, so I had no idea when the update was aborted. When I tried to boot again, I was greeted with this error:

Warning: /lib/modules/4.8.4-1-ARCH/modules.devname not found - ignoring.
starting version 231
ERROR: device 'UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' not found, Skipping fsck.
ERROR: Unable to find root device 'UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.
You are being dropped to a recovery shell
    Type 'exit' to try and continue booting
sh: can't access tty: job control turned off
[rootfs ]#

At that time I thought that one of my harddrive died. Digging a bit into it, the partition that couldn’t be found was an encrypted one. So I thought that maybe my fstab got somehow corrupted. I didn’t have access to a shell after booting as the keyboard was not working, so I just booted with a live usb key. My disks are all encrypted, so the first step was to decrypt them:

Confirm that they are indeed crypted:

blkid | grep crypto

Decrypt/mount the partition:

cryptsetup luksOpen /dev/sdc2/ crypt

You then can’t just mount /dev/mapper/crypt. If you try, you’ll get:

mount /dev/mapper/crypthome /mnt/crypt
mount: unknown filesystem type 'LVM2_member'

Find the group of your volume (mine was main):

vgscan

Find the name of the volume (mine was root):

lvs

Mount it:

mount /dev/main/root /mnt

In my case, /boot is not encrypted, so I also had to mount it to be able to look at my kernel.

mount /dev/sdc1 /mnt/boot

Then I just used chrooted:

arch-chroot /mnt

I thought that the issue might have been in the initial ramdisk environment, so I just ran:

mkinitcpio -p linux

I was greeted with quite a few warnings that some modules were not found. But all the modules for encryption was present, so I decided to just reboot. Some progress were made: I could decrypt my disk, but was then greeted with:

mount: unknown filesystem type 'ext4'

I booted on the usb key again, and looked a bit at my modules. That’s when I found that uname -r was giving me an old kernel version. Trying to reinstall the linux package was returning an error because the desc file was missing. I guess my update was interrupted during the kernel update.

Removing the package and re-installing it did the trick. Note that pacman -S --force was not enougth to prevent pacman from complaining about the missing files.

pacman -R linux
pacman -Sy linux
mkinitcpio -p linux

My RethinkDB story posted on 08 October 2016

RethinkDB recently announced that the company behind the database is shutting down. In the last few days, many people have started to write about RethinkDB; the article about open source companies from William Stein, author of SageCloud, is probably the most interesting. Today, I would like to share a different story - my personal one with RethinkDB.

After graduating from Tsinghua (Beijing), I was looking for a new country to live in and eventually settled on moving to California. I sent a plethora of emails and eventually participated in a HackerRank competition where I ranked 17th (or was it 13th?). I then got the opportunity to interview at RethinkDB. After a few calls, I got a job offer from RethinkDB; this was my first job.

My first days at RethinkDB were wonderful. We were developing on a local/shared server because building RethinkDB is quite CPU intensive. This is how I really learned how to quit vim. One of my most vivid memory of that time is the day Slava asked me if we should just fork CoffeeScript (CS) after getting bitten by another bug - This was in CS early-ish days, version 1.3.x. While we eventually did not end up forking CS, Slava’s suggestions felt like an easy thing to do and made me realize that while I was a good programmer, I had much more to learn.

Thosee early days were also great because RethinkDB, as a NosQL database, was not yet public. We were moving extremely fast without doing code review, while maintaining a high code quality, thanks to a strong sense of ownership. The web interface became more polished and the data explorer turned out amazing once we added suggestions and auto completion.

Launch day was incredible. We spent the whole day just answering questions. The feedback on the web interface was extremely positive. To this day, I still sometime wonder if the web interface was too shiny; people did not realize how great the database engine under the hood was. The tremendous amount of positive feedback just fueled our passion even more. We kept working hard on it, polishing edges, adding new features etc.

We had great discussions about ReQL. One of the most interesting one I can remember was about the group command that replaced groupedMapReduce. We all had different opinions on what would be best for our users - I wanted the scope of chained command to be always the same as the parent. The sheer amount of thoughts poured into ReQL made it the best query language available. Nowadays, a little part of me cries every time I have to write a SQL query for work.

Jessie started to work at RethinkDB about 2 years after I joined. We had a lot of fun. I couldn’t help but be amused when I learned that she ate a box full of bacon for breakfast. We started to date after a few months and got engaged a few weeks ago!

After about 2 years and a half, I made the hard decision to leave the team for another company. Even though I was not employed by RethinkDB (technically Hexagram 49 Inc), I always kept RethinkDB in my heart. I kept maintaining rethinkdbdash and thinky, refactored reqlite to support r.http which involved making all the internal operation asynchronous etc.

Horizon then came out, and boy, that was a really good project. I couldn’t help but notice that it wasn’t gaining traction fast enough, and the sad news that RethinkDB was shutting down eventually came out. While the company is gone, I am convinced that the database will live beyond. This is nothing more than a new chapter for RethinkDB and I am excited to see what will happen next.

Slava, Michael, all the team, I took pride in crafting part of RethinkDB, in supporting our users, and I enjoyed every bit of sailing with all of you. My time at RethinkDB was amazing; I have nothing but great memories from working with all of you.