[ 
https://issues.apache.org/jira/browse/MESOS-6182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15496333#comment-15496333
 ] 

Benjamin Bannier commented on MESOS-6182:
-----------------------------------------

Making failure to copy a file fatal in {{LinuxRootfs::create}} is technically 
not hard (just check all three states of the {{Result}} of {{realpath}}), but 
it looks like already the existing list of files to copy contains files which 
do not exists even on core supported distributions. On an ubuntu-14 image I get
{code}
for f in /bin/echo /usr/bin/bash /bin/ls /bin/sh /bin/sleep 
/lib/x86_64-linux-gnu /lib64/ld-linux-x86-64.so.2 /lib64/libc.so.6 
/lib64/libdl.so.2 /lib64/libtinfo.so.5 /lib64/libselinux.so.1 
/lib64/libpcre.so.1 /lib64/liblzma.so.5 /lib64/libpthread.so.0 
/lib64/libcap.so.2 /lib64/libacl.so.1 /lib64/libattr.so.1 /lib64/librt.so.1 
/etc/passwd; do ls -d $f; done
/bin/echo
ls: cannot access /usr/bin/bash: No such file or directory
/bin/ls
/bin/sh
/bin/sleep
/lib/x86_64-linux-gnu
/lib64/ld-linux-x86-64.so.2
ls: cannot access /lib64/libc.so.6: No such file or directory
ls: cannot access /lib64/libdl.so.2: No such file or directory
ls: cannot access /lib64/libtinfo.so.5: No such file or directory
ls: cannot access /lib64/libselinux.so.1: No such file or directory
ls: cannot access /lib64/libpcre.so.1: No such file or directory
ls: cannot access /lib64/liblzma.so.5: No such file or directory
ls: cannot access /lib64/libpthread.so.0: No such file or directory
ls: cannot access /lib64/libcap.so.2: No such file or directory
ls: cannot access /lib64/libacl.so.1: No such file or directory
ls: cannot access /lib64/libattr.so.1: No such file or directory
ls: cannot access /lib64/librt.so.1: No such file or directory
/etc/passwd
{code}

It looks like this problem requires a more general solution for MESOS-6011 
where we e.g., pick up executable paths from {{PATH}} and their dynamic 
dependencies from the ELF headers.

> LinuxRootfs::create ignores failures from adding non-existing files
> -------------------------------------------------------------------
>
>                 Key: MESOS-6182
>                 URL: https://issues.apache.org/jira/browse/MESOS-6182
>             Project: Mesos
>          Issue Type: Bug
>          Components: test
>            Reporter: Benjamin Bannier
>            Assignee: Benjamin Bannier
>
> {{LinuxRootfs::create}} attempts to add a hardcoded list of files to the 
> created rootfs. However, if a file does not exist no failure is created, but 
> the file will be missing from the rootfs.
> This can then lead to failures in tests using the rootfs and relying on files 
> in it.
> We should make failures to compose the planned rootfs explicit so users of 
> this test code know what they can rely on.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to