Installation script fails in a Container - containerized 16.04. different than default 16.04?

Thus far I assumed from the inside a LXD ubuntu 16.04. (or whatever distribution) would basically look and behave just the same as in a VM or on a baremetal machine. Now I got some input (related to a failed installation via a certain python script) that this may not be the case.

I am trying to install ERPNext (an Open Source ERP System utlizing (among others) mariadb, nginx, supervisor) inside of a LXD ubuntu 16.04 container (18.04. LXD host, snapped LXD 3.0.1).

The mentioned installation script for ubuntu 16.04 provided by the ERPNext community which fails and it was mentioned in a thread in the ERPNext forum it could be that the failure is due to the script depending on systemctl and that may not be available (or maybe work differently in a container then in a VM [where the mentioned script is said to work]). The script uses Ansible as it seems.

To me that sounds pretty unlikely and I would like to get some input from here whether there are actually cases where that may be true?


The error you are referencing (I think) is

File “/usr/lib/python2.7/”, line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/install.yml’, ‘-e’, ‘@/t
mp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

Ansible is like a scripting language and you got above is that there was some failure in that ansible script but nothing more. We did not get to see the full details of the ansible error but the general number “2”.
You would need to ask at the Ansible discussion forum what this exit status 2 means.

thanks for the feedback (even with not much meat to chew on). Basicallz I think you’re saying in regards to the point I was raising that this was not the container 16.04. doing something wildly different then any other (VM/baremetal) 16.04 instance.

on top, thanks for the pointer toward ansible. will dig a bit deeper into that