containers / build

another build tool for container images (archived, see https://github.com/rkt/rkt/issues/4024)
Apache License 2.0
341 stars 80 forks source link

overlayfs does not support rename operations #303

Open serverwentdown opened 7 years ago

serverwentdown commented 7 years ago

https://github.com/containers/build/blob/master/examples/mongodb/build-mongodb.sh

Importing MongoDB's GPG keys fail because rename operations are not supported by overlayfs.

Beginning build with an empty ACI
Setting name of ACI to example.com/mongodb
Adding dependency "quay.io/sameersbn/ubuntu"
Running: [apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10]
Downloading quay.io/sameersbn/ubuntu: [========================] 69.5 MB/69.5 MB
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.dFBktScdB2 --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 7F0CEB10
gpg: requesting key 7F0CEB10 from hkp server keyserver.ubuntu.com
gpg: renaming `/etc/apt/trusted.gpg' to `/etc/apt/trusted.gpg~' failed: Invalid argument
gpg: error writing keyring `/etc/apt/trusted.gpg': file rename error
gpg: key 7F0CEB10: public key "[User ID not found]" imported
gpg: error reading `[stream]': file rename error
gpg: Total number processed: 0
gpg:               imported: 1  (RSA: 1)
run: non-zero exit code: 2
Ending the build

A potential solution to this would be to run acbuild squash on the container before doing any rename operations, but that command hasn't been implemented (#18) yet.

serverwentdown commented 7 years ago

Alternatively, Ubuntu could be declared not as a dependency but as the starting image, when doing acbuild begin.

jeremyeder commented 7 years ago

What kernel version do you have?

serverwentdown commented 7 years ago
uname -a
Linux node1 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
jeremyeder commented 7 years ago

Can you repro on 4.7 or later?

serverwentdown commented 7 years ago

Success on kernel 4.10, closing... Sorry.

serverwentdown commented 7 years ago

Odd that this was not mentioned in the documentation though.

cgonyeo commented 7 years ago

It definitely should be, I'm going to reopen this as a reminder to myself to add that the next time I'm sparing some cycles for acbuild.