sassoftware / sas-container-recipes

A collection of recipes and other resources for building containers that include SAS Viya software.
https://www.sas.com
Apache License 2.0
89 stars 42 forks source link

rm: cannot remove ‘/etc/security/limits.d/20-nproc.conf’: No such file or directory #54

Open Juan4SAS opened 3 years ago

Juan4SAS commented 3 years ago

Hi there,

I could deploy and access SASStudio successfully the programming-only interface with the basic instructions. Easy and straightforward.

However, when I wanted to deploy with a local mirror and a local docker repo, the build fails with the error mentioned above.

The executed build command was:

./build.sh --type single --zip ../SAS_Viya_deployment_data.zip --addons "auth-demo" --verbose -m http://localhost:180/pulp -u localhost:5000 -i localhost:5000/va-125-x64_redhat_linux_7-docker/sas-viya-programming -t 3.5.9-20201210.1607626389474

The last lines of the log are:

`2021/03/08 13:43:10 single-programming-only:
Removing intermediate container 0b811cfe7dc9
2021/03/08 13:43:10 single-programming-only:
Removing intermediate container 0b811cfe7dc9

2021/03/08 13:43:10 single-programming-only: container build [ERROR] single-programming-only: map[code:1 message:The command '/bin/sh -c set -e;     echo; echo "####### Go ahead and add the packages that the Ansible playbook will look for"; echo;     if [ "$PLATFORM" = "redhat" ]; then         rpm --rebuilddb;         yum install --assumeyes java-1.8.0-openjdk libselinux-python which;         yum clean all;         rm --verbose --recursive --force /root/.cache /var/cache/yum;         rm --verbose /etc/security/limits.d/20-nproc.conf;     elif [ "$PLATFORM" = "suse" ]; then         zypper --non-interactive install -y java-1_8_0-openjdk tar curl hostname iproute2 which gzip;         zypper clean --all;         rm --verbose --recursive --force /var/cache/zypp;         sed -i 's/^*/#*/g' /etc/security/limits.conf;     fi;' returned a non-zero code: 1]

Debugging: builds/single-2021-03-08-13-39-33/sas-viya-single-programming-only/log.txt
exit status 1
sas-container-recipes-builder-19.06.1-20210308143900-no-git-sha`

I have tried to add the following line to the Dockerfile, RUN touch /etc/security/limits.d/20-nproc.conf

But then the Build takes forever in the step for installing the packages openjdk-11-jdk-headless and ansible. Therefore I discarded this rough fix - as it fixes nothing.

Do you have any ideas, have you seen this before?

Thank you in advance! Best regards, Juan

frayos commented 3 years ago

Hello, A) Do you have the full log ? (as an attachment) + the Dockerfile if you edited it.

B) it's actually the "whole" line that is RC1 not just the rm, meaning, assuming you are not building a Suse image, one of the below command could be the cause of your problem (inside the container): rpm --rebuilddb;
yum install --assumeyes java-1.8.0-openjdk libselinux-python which;
yum clean all;
rm --verbose --recursive --force /root/.cache /var/cache/yum;
rm --verbose /etc/security/limits.d/20-nproc.conf;

C) I would go back into the "last" available container and try each of the command to see which one fails.

Thanks ! Younes

Juan4SAS commented 3 years ago

Hello and thanks!

A) attached you can find the logs and the Dockerfile. No modifications were made.

build.log log.txt Dockerfile.txt

B) I think it is the line rm --verbose /etc/security/limits.d/20-nproc.conf; see below

`2021/03/08 16:04:12 single-programming-only: removed directory: ‘/var/cache/yum/x86_64/7/updates/packages’ removed directory: ‘/var/cache/yum/x86_64/7/updates/gen’ removed directory: ‘/var/cache/yum/x86_64/7/updates’ removed ‘/var/cache/yum/x86_64/7/.gpgkeyschecked.yum’ removed directory: ‘/var/cache/yum/x86_64/7/base/packages’ removed directory: ‘/var/cache/yum/x86_64/7/base/gen’ removed directory: ‘/var/cache/yum/x86_64/7/base’ removed directory: ‘/var/cache/yum/x86_64/7/extras/packages’ removed directory: ‘/var/cache/yum/x86_64/7/extras/gen’ removed directory: ‘/var/cache/yum/x86_64/7/extras’ removed ‘/var/cache/yum/x86_64/7/timedhosts’ removed directory: ‘/var/cache/yum/x86_64/7’ removed directory: ‘/var/cache/yum/x86_64’ removed directory: ‘/var/cache/yum’ 2021/03/08 16:04:12 single-programming-only: rm: cannot remove ‘/etc/security/limits.d/20-nproc.conf’: No such file or directory

2021/03/08 16:04:14 single-programming-only: Removing intermediate container 1e017ff7c523 2021/03/08 16:04:14 single-programming-only: Removing intermediate container 1e017ff7c523 2021/03/08 16:04:14 single-programming-only: container build [ERROR] single-progra...`

C) when you refer to the "last", you mean to fetch from ses.sas.download? I fetched the 3 images (sas-prog.., centos and micro-centos just this morning). What I want to test is to be able to build from local resources: local repo and local mirror.

Cheers, Juan

frayos commented 3 years ago

C) "210823fcb2f0" Was the "last" container :

D) Can you try to edit : util/programming-only-single/Dockerfile and remove this "rm" to see if this helps ?

(and provide new logs)

Juan4SAS commented 3 years ago

Edited util/programming-only-single/Dockerfile and the deployment is moving forward, so far so good.

It has failed a few steps ahead as the -m parameter pointed to localhost and needs to point to the IP. I'll see if this is enough or maybe I need to work out the network build of the image/container. In any case, this is a different topic from the subject.

Perhaps I would suggest a little update in the documentation (usage.txt?) and I wonder why the sub-Dockerfile needed to be updated.

Will keep you posted.

Thanks for your fatastic help @frayos / Younes.

Juan4SAS commented 3 years ago

I could map the next error to: https://github.com/sassoftware/sas-container-recipes/issues/26, however I see it was not resolved since 2019. Could anyone give it a look? Thanks in advance!

Juan4SAS commented 3 years ago

Will this be resolved in the git project in a new git branch?