Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failing due to ACL support #12

Closed
mkuurstra opened this issue Apr 25, 2017 · 10 comments
Closed

Installation failing due to ACL support #12

mkuurstra opened this issue Apr 25, 2017 · 10 comments

Comments

@mkuurstra
Copy link
Contributor

Just wanted to start using elkarbackup but the container will not run how it should. entrypoint.sh fails to install elkarbackup:

The following NEW packages will be installed:
  elkarbackup libssh2-1 php-ssh2 sudo
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 8771 kB of archives.
After this operation, 1974 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 sudo amd64 1.8.16-0ubuntu1.3 [390 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libssh2-1 amd64 1.5.0-2ubuntu0.1 [70.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/universe amd64 php-ssh2 amd64 0.12-39-g3dfe336+0.12-1build1 [26.9 kB]
Get:4 http://elkarbackup.org/apt/ubuntu xenial/main amd64 elkarbackup all 1.2.5-php7 [8284 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 8771 kB in 2s (3957 kB/s)
Selecting previously unselected package sudo.
(Reading database ... 10959 files and directories currently installed.)
Preparing to unpack .../sudo_1.8.16-0ubuntu1.3_amd64.deb ...
Unpacking sudo (1.8.16-0ubuntu1.3) ...
Selecting previously unselected package libssh2-1:amd64.
Preparing to unpack .../libssh2-1_1.5.0-2ubuntu0.1_amd64.deb ...
Unpacking libssh2-1:amd64 (1.5.0-2ubuntu0.1) ...
Selecting previously unselected package php-ssh2.
Preparing to unpack .../php-ssh2_0.12-39-g3dfe336+0.12-1build1_amd64.deb ...
Unpacking php-ssh2 (0.12-39-g3dfe336+0.12-1build1) ...
Selecting previously unselected package elkarbackup.
Preparing to unpack .../elkarbackup_1.2.5-php7_all.deb ...
Unpacking elkarbackup (1.2.5-php7) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Processing triggers for systemd (229-4ubuntu16) ...
Setting up sudo (1.8.16-0ubuntu1.3) ...
Setting up libssh2-1:amd64 (1.5.0-2ubuntu0.1) ...
Setting up php-ssh2 (0.12-39-g3dfe336+0.12-1build1) ...
Setting up elkarbackup (1.2.5-php7) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Attempting to create DB elkarbackup and user elkarbackup in db
Create database
mysql: [Warning] Using a password on the command line interface can be insecure.
Create user
mysql: [Warning] Using a password on the command line interface can be insecure.
Configure parameters
Adding missing parameters as required
Delete cache content
Update DB
Create root user
Clean cache
Dump assests
Invalidate sessions
Warning: The home dir /var/lib/elkarbackup you specified already exists.
Adding system user `elkarbackup' (UID 105) ...
Adding new group `elkarbackup' (GID 110) ...
Adding new user `elkarbackup' (UID 105) with group `elkarbackup' ...
The home directory `/var/lib/elkarbackup' already exists.  Not copying from `/etc/skel'.
adduser: Warning: The home directory `/var/lib/elkarbackup' does not belong to the user you are currently creating.
Generating public/private rsa key pair.
Your identification has been saved in /var/lib/elkarbackup/.ssh/id_rsa.
Your public key has been saved in /var/lib/elkarbackup/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:5n8K5eTfDhNzoDSrmi6/KGwIzw2NpzD+vd4KKBmQW5g Automatically generated key for elkarbackup.
The key's randomart image is:
+---[RSA 2048]----+
|                 |
| +               |
|E .       o .    |
|.o       . + .   |
|o  o    S = o .  |
|+o+ o  o *   +   |
|=O *    + o o    |
|o.B =..o o ..+   |
| ..ooOOo  oo..o  |
+----[SHA256]-----+
ACLs not supported. Remount with ACL and reconfigure with 'dpkg --configure --pending'
dpkg: error processing package elkarbackup (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Processing triggers for systemd (229-4ubuntu16) ...
Errors were encountered while processing:
 elkarbackup
E: Sub-process /usr/bin/dpkg returned an error code (1)

Seems to be that ACL support is needed, I found the workaround in the link below but it seems like that would affect all my containers and I don't think that's a good solution.
https://stackoverflow.com/questions/22714885/how-to-use-setfacl-within-a-docker-container

My docker-compose.yml:

version: '2'

networks:
  proxy:
    external:
      name: proxyNet

services:
  db:
    image: mysql
    environment:
      - MYSQL_ROOT_PASSWORD=password
    volumes:
      - /srv/docker/volumes/elkarBackup/mysql:/var/lib/mysql

  elkarbackup:
    build: ./elkarBackup
    container_name: backup
    links:
      - db
    depends_on:
      - db
    volumes:
      - /srv/docker/volumes/elkarBackup/elkarbackup/config:/etc/elkarbackup
      - /srv/docker/volumes/elkarBackup/elkarbackup/data:/var/spool/elkarbackup
    environment:
      - EB_DB_PASSWORD=password
      - VIRTUAL_HOST=backup.domain.com
      - VIRTUAL_PORT=80
      - LETSENCRYPT_HOST=backup.domain.com
      - LETSENCRYPT_EMAIL=something@domain.com
    networks:
      - default
      - proxy

My Dockerfile (I needed port 80 exposed for my reversed proxy to detect it):

FROM elkarbackup/elkarbackup:latest

EXPOSE 80

Is it possible to fix this or am I doing something wrong?

@xezpeleta
Copy link
Contributor

Sorry but the Docker image uses the ElkarBackup deb package, which needs ACL support enabled.

Apparently, even using Docker containers, you need to mount your / with ACL enabled in your host system.

@xezpeleta
Copy link
Contributor

More info here

@mkuurstra
Copy link
Contributor Author

mkuurstra commented Apr 25, 2017

Hmm, still no luck. acl was already installed on my debian installation but enabled it explicitly in my fstab, rebooted and still no success. Am I the only one having this issue? In that case I'll just inspect my machine further.

@xezpeleta
Copy link
Contributor

I'm going to check it under a Debian host (I'm currently testing Docker image under Ubuntu). What Debian and Docker version are you using?

Thanks

@mkuurstra
Copy link
Contributor Author

Debian version 8.7
Docker version 17.03.1-ce

No, thank you :)

@xezpeleta
Copy link
Contributor

xezpeleta commented Apr 28, 2017

Apparently with Ubuntu 16.04 and Docker 17.03.1-ce everything works well, but if we use Debian instead Ubuntu I have the same issue as you.

Ubuntu and Debian both has ACLs enabled and a usual ElkarBackup installation works well there. But the Docker container has a different behaviour (both are configured with AUFS); setfacl command will reply a Operation not supported in Debian, while in Ubuntu everything will work fine.

It looks a Docker compatibility problem with Debian... :-/

@mkuurstra
Copy link
Contributor Author

Hmm, it's good to know it's nothing in my setup but I can't find anything that could cause this, I'm drawing a blank here. Any idea how to continue or where to report this?

@xezpeleta
Copy link
Contributor

I've just opened an issue moby/moby#32915

Maybe someone could give us any clue there.

@Paul-dH Paul-dH mentioned this issue Aug 5, 2017
@xezpeleta
Copy link
Contributor

We've just discovered in #18 thanks to @Paul-dH that this bug also affects to Ubuntu 17.04.

The easiest workaround to fix that is to change the Docker storage driver from AuFS to devicemapper:

# /etc/docker/daemon.json
{
    "storage-driver": "devicemapper"
}

Anyone has any other idea to fix this?

Thanks

@xezpeleta
Copy link
Contributor

We're closing this issue because we've released a completely new Docker image:

https://hub.docker.com/r/elkarbackup/elkarbackup/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants