ViaQ / integration-tests

1 stars 5 forks source link

./openshift-test.sh: line 70: collectorid: unbound variable #10

Open lucasponce opened 7 years ago

lucasponce commented 7 years ago

Hi,

Running ./openshift-test.sh in a local environment it stops on

 ---> 5723424c6da2
Removing intermediate container 96730995237c
Step 5 : CMD /usr/lib/systemd/systemd-journal-remote -o ${OUTPUTFILE} ${INPUTFILE}
 ---> Running in c050fdb4ef47
 ---> 6ec677e3311d
Removing intermediate container c050fdb4ef47
Successfully built 6ec677e3311d
+ docker run --privileged -u 0 -e INPUTFILE=/var/log/journalinput.txt -e OUTPUTFILE=/var/log/journal/messages.journal -v /tmp/tmp.nLjjaCdwvo/data:/var/log viaq/journal-maker:latest
File /var/log/journal/messages.journal corrupted or uncleanly shut down, renaming and replacing.
Failed to open output journal /var/log/journal/messages.journal: Input/output error
Failed to get writer for source /var/log/journalinput.txt: Input/output error
Failed to create source for fd:6 (/var/log/journalinput.txt): Input/output error
+ cleanup
+ out=1
./openshift-test.sh: line 70: collectorid: unbound variable

Perhaps is there any additional step in the configuration of an environment ?

I'm running the tests in the following machine

Linux attilan 4.9.8-201.fc25.x86_64 #1 SMP Tue Feb 7 11:28:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Docker version 1.12.6, build ae7d637/1.12.6

Any hint is most welcome.

Thanks.

richm commented 7 years ago

Sorry, I use docker so often that I have forgotten that I configured my system so that I can run docker without root/sudo. See http://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo#477554

lucasponce commented 7 years ago

Thanks @richm. I can run docker commands on my working user without sudo. I tried also to give access to the /var/log folder and I am still having the same error. I can see a /var/log/journal folder created but none of the files defined in the script:

[lponce@attilan log]$ pwd
/var/log
[lponce@attilan log]$ ls -ld journal/
drwxr-sr-x+ 3 root systemd-journal 4096 Oct  4 22:54 journal/
[lponce@attilan log]$ ls -l journal/
total 8
drwxr-sr-x+ 2 root systemd-journal 4096 Feb 15 08:50 0f8e4144ab814340a1060e9b30501a42

Perhaps @lukas-vlcek can also take a look ? (as I guess you are also in Europe TZ).

Thanks.

richm commented 7 years ago

@lucasponce It's complaining about the /var/log/journal inside the container. This part of the script is attempting to use a centos7 container to create a journald file/directory for fluentd to read from. The script has created a temp directory on the host - in your case /tmp/tmp.nLjjaCdwvo/. The data subdirectory holds the journal files. The directory /tmp/tmp.nLjjaCdwvo/data from the host is mounted into the container as /var/log/ by docker using -v /tmp/tmp.nLjjaCdwvo/data:/var/log. I've never seen these errors before and I'm not sure what's going on. Could be the platform/docker. I'm running Fedora 24 using docker 1.10. They have probably changed something with respect to privileged containers or bind mounts or ....