Page MenuHomePhabricator

Thumbor role breaks /etc/group
Closed, ResolvedPublic

Description

For some reason provisioning the Thumbor role (on Jessie at least) results in addgroup failing from that point on:

vagrant@mediawiki-vagrant:~$ sudo groupadd snackbar
groupadd: failure while writing changes to /etc/group

It doesn't seem to be caused by any of the other roles the thumbor one requires.

Event Timeline

I've removed the superfluous creation attempt of the thumbor group and user from the role, which are created by the Debian package, but it hasn't helped.

stracing what groupadd does, it seems to be:

  • reading the contents from /etc/group
  • dumping said contents into /etc/group-
  • write new contents into /etc/group+
  • attempt to rename /etc/group+ to /etc/group and fail:
rename("/etc/group+", "/etc/group")     = -1 EBUSY (Device or resource busy)

Indeed, trying to do that manually fails:

vagrant@mediawiki-vagrant:~$ sudo mv /etc/group+ /etc/group
mv: cannot move ‘/etc/group+’ to ‘/etc/group’: Device or resource busy

Sigh... found the answer, it's firejail affecting things outside of what it jails on "older" kernels: https://github.com/netblue30/firejail/issues/270

Change 345584 had a related patch set uploaded (by Gilles):
[mediawiki/vagrant@master] [WIP] Make Thumbor role upgrade linux kernel

https://gerrit.wikimedia.org/r/345584

Change 345584 abandoned by Gilles:
[WIP] Make Thumbor role upgrade linux kernel

https://gerrit.wikimedia.org/r/345584

Fixed on the Stretch branch.