[Fuego] Getting ttc working inside container

Tim.Bird at sony.com Tim.Bird at sony.com
Fri Jan 22 00:32:03 UTC 2021



> -----Original Message-----
> From: Pooja Sanjay More <pooja.sm at pathpartnertech.com>
> 
> Hi Tim,
> 
> There is one issue, Jenkins job for poll_request is working fine for all
> other tests except for hello_world test.
> Whenever I put request for hello_world and run poll_request through a jenkins job
> 
> I get following errors,
> 
> Logs:
> Started by user unknown or anonymous
> Running as SYSTEM
> Building on master in workspace /var/lib/jenkins/jobs/poll_requests_on_server/workspace
> [workspace] $ /bin/sh -xe /tmp/jenkins2004450138084254215.sh
> + /fuego-core/scripts/poll_requests.sh -u -d 12h -w 120
> == Polling server "fuegotest.org/cgi-bin <http://fuegotest.org/cgi-bin> " for requests ==
> Processing requests for any board
> Installing new tests or upgrading tests is allowed.
> Waiting 120 seconds between polls of the server.
> Running for 12h
> Type Ctrl-C to exit
> Checking
> Running request: request-2021-01-21_12:56:34.78-pptlab:rpi
> Trying to get request 'request-2021-01-21_12:56:34.78-pptlab:rpi' from server
> Checking for (possibly newer) test Functional.hello_world on server.
> Executing test Functional.hello_world on board rpi (using spec default)
> Running test 'Functional.hello_world' on board 'rpi' using spec 'default'
> ===== doing fuego phase: pre_test =====
> ===== doing fuego phase: build =====
> /fuego-core/scripts/functions.sh: line 403: /fuego-rw/buildzone/rpi.default.Functional.hello_world-debian-armhf/fuego.build.lock:
> Permission denied

This is the start of an error cascade, that eventually leads to the missing snapshot file and
the python exception below.

Are you sure you have removed this build directory?

What are the permissions and file ownership of:
/fuego-rw
/fuego-rw/buildzone
/fuego-rw/buildzone/rpi.default.Functional.hello_world-debian-armhf
/fuego-rw/buildzone/rpi.default.Functional.hello_world-debian-armhf/fuego.build.lock

?


> In Fuego signal_handler (due to error in build phase)
> ##### doing fuego phase: post_test (from signal handler) #####
> scp: /home/pi/test/fuego.Functional.hello_world/Functional.hello_world.log: No such file or directory
> INFO: the test did not produce a test log on the target
> ##### doing fuego phase: processing (from signal handler) #####
> ### WARNING: Program returned exit code ''
> ### WARNING: Log evaluation may be invalid
> !!! ERROR: ERROR: log_compare: pattern 'SUCCESS' found 0 times (expected greater or equal than 1)
> ERROR: test_processing returned an error
> chart config not found. Using default values.
> ERROR: results did not satisfy the threshold
> Packaging run 'Functional.hello_world-default-157-rpi'
> Traceback (most recent call last):
>   File "/usr/local/bin/ftc", line 6189, in <module>
>     main()
>   File "/usr/local/bin/ftc", line 6051, in main
>     do_run_request(conf, options)
>   File "/usr/local/bin/ftc", line 3557, in do_run_request
>     do_put_run(conf, [run_id])
>   File "/usr/local/bin/ftc", line 4227, in do_put_run
>     run_filepath = do_package_run(conf, [run_arg, "-o", "/tmp"])
>   File "/usr/local/bin/ftc", line 5345, in do_package_run
>     copy2(run.get_machinesnapshot_path(), abs_path)
>   File "/usr/local/lib/python2.7/shutil.py", line 130, in copy2
>     copyfile(src, dst)
>   File "/usr/local/lib/python2.7/shutil.py", line 82, in copyfile
>     with open(src, 'rb') as fsrc:
> IOError: [Errno 2] No such file or directory: '/fuego-rw/logs/Functional.hello_world/rpi.default.157.157/machine-snapshot.txt'

I should probably wrap all the attachment fields in try/except clauses, just in case weird stuff goes wrong
like above.


> Checking Waiting ............................................................................................................../fuego-core/scripts/poll_requests.sh: line 218:  4248
> Terminated              sleep 1
> ./tmp/jenkins2004450138084254215.sh: line 2:  3996 Terminated              /fuego-core/scripts/poll_requests.sh -u -d 12h -w 120
> 
> 
> I even removed /fuego-rw/buildzone/rpi.default.Functional.hello_world-debian-armhf/fuego.build.lock,
> but still getting the same error.

Maybe it's the permissions on
/fuego-rw/buildzone/rpi.default.Functional.hello_world-debian-armhf

Can you try removing that whole directory?

> 
> poll_request for hello_world executes properly through a terminal  inside the container.
> 
> This happens only with hello_world test when run through poll_request jenkins job,
> 
> Other tests run successfully through poll_request jenkins job and terminal.
> 
> Earlier I have removed build folders for hello_world job as many build folders
> 

> were generated, is that creating this issue?

There may be a symlink left around that is causing problems.  Can you check for any symlinks
related to Functional.hello_world, and try removing them?

 -- Tim

> On Thu, Jan 21, 2021 at 5:53 PM Pooja Sanjay More <pooja.sm at pathpartnertech.com <mailto:pooja.sm at pathpartnertech.com> > wrote:
> 
> 
> 	Hi Tim,
> 
> 	System is up now, you can put requests for the rpi board.
> 	poll_request.sh is running with -u option and wait of  20s.
> 
> 	Please see inline below.
> 
> 	On Wed, Jan 20, 2021 at 10:22 PM <Tim.Bird at sony.com <mailto:Tim.Bird at sony.com> > wrote:
> 
> 
> 		Please see comments inline below.
> 
> 		> -----Original Message-----
> 		> From: Pooja Sanjay More <pooja.sm at pathpartnertech.com <mailto:pooja.sm at pathpartnertech.com> >
> 		>
> 		> Hi,
> 		>
> 		> As we discussed ttc to get working inside the container,
> 		> We copied ttc.conf in fuego-ro/conf/ folder and verified its
> 		> working inside the fuego container. We were able to reboot
> 		> rpi board from within the container.
> 		>
> 		> Later, we stored ttc.conf in a directory called /usr/test and wanted
> 		> to expose it to the container with the below command,
> 		>
> 		> sudo docker run -it -v /usr/test:/usr/test fuego-container /bin/sh
> 		>
> 		> But it creates new container instead of mounting volume to existing container.
> 
> 		Yes.  It would be nice if you didn't have to re-create the container, but
> 		I believe docker can't add a new mount to an existing container.
> 
> 		>
> 		> Hence, we thought of building  a new container with /usr/test directory exposed to the container and facing some fetch
> issues.
> 		>
> 		>
> 		> Log for the same:
> 		>
> 		> fuego at cpu-366U:~/fuego$ ./install.sh  fuego-ttc --priv
> 
> 		The errors you see are likely the result of incorrect, cached
> 		package information.
> 
> 		Please use the --no-cache option to install.sh to see if this helps:
> 
> 		$ ./install.sh fuego-ttc --priv --no-cache
> 
> 
> 
> 	This fixed the fetch errors.
> 
> 
> 		I assume that you have modified the scripts:
> 		   fuego-host-scripts/docker-create-container.sh
> 		and
> 		   fuego-host-scripts/docker-create-usb-privileged-container.sh
> 		to include a line like this in the container creation:
> 
> 		-v /usr/test:/usr/test:ro
> 
> 
> 
> 	Yes, a new container built with the above volume mounted.
> 
> 
> 		We will also need to do the following:
> 		 * add ttc helpers to /usr/test/bin
> 		 * add /usr/test/bin to the PATH both inside and outside the container
> 		     * or, modify ttc and ftc to automatically add /usr/test/bin to the PATH
> 		        when they execute
> 
> 		Can you do all of the above, and let me know what happens?
> 
> 
> 
> 	I have copied  ttc.conf under /usr/test/ and all the ttc helper scripts under /usr/test/bin folder.
> 	To run ttc inside container, need to export TTC_CONF variable as
> 
> 	Command:
> 	export TTC_CONF=/usr/test/ttc.conf
> 
> 	With these changes ttc is working inside a new container and able to reboot
> 	the rpi board.
> 
> 
> 
> 		Thanks,
> 		 -- Tim
> 
> 
> 		>
> 		> Using Port 8090
> 		> [sudo] password for fuego:
> 		> Sending build context to Docker daemon    575MB
> 		> Step 1/75 : FROM debian:stretch-slim
> 		>  ---> 5e45a95672e1
> 		> Step 2/75 : MAINTAINER tim.bird at sony.com <mailto:tim.bird at sony.com>  <mailto:tim.bird at sony.com
> <mailto:tim.bird at sony.com> >
> 		>  ---> Using cache
> 		>  ---> 6707ce77dc0f
> 		> Step 3/75 : ARG HTTP_PROXY
> 		>  ---> Using cache
> 		>  ---> 1dbc82ce76fa
> 		> Step 4/75 : ENV http_proxy ${HTTP_PROXY}
> 		>  ---> Using cache
> 		>  ---> a2f4d171fca7
> 		> Step 5/75 : ENV https_proxy ${HTTP_PROXY}
> 		>  ---> Using cache
> 		>  ---> 5c653e4c8b73
> 		> Step 6/75 : ARG DEBIAN_FRONTEND=noninteractive
> 		>  ---> Using cache
> 		>  ---> 41ab4d39517b
> 		> Step 7/75 : WORKDIR /
> 		>  ---> Using cache
> 		>  ---> 1a1f4910df6f
> 		> Step 8/75 : RUN echo deb http://deb.debian.org/debian stretch main non-free > /etc/apt/sources.list
> 		>  ---> Using cache
> 		>  ---> d2039fdd6da1
> 		> Step 9/75 : RUN echo deb http://security.debian.org/debian-security stretch/updates main >> /etc/apt/sources.list
> 		>  ---> Using cache
> 		>  ---> 3eb2b0ed6edd
> 		> Step 10/75 : RUN if [ -n "$HTTP_PROXY" ]; then echo 'Acquire::http::proxy "'$HTTP_PROXY'";' >
> /etc/apt/apt.conf.d/80proxy; fi
> 		>  ---> Using cache
> 		>  ---> 7913d280e1cd
> 		> Step 11/75 : RUN mkdir -p /usr/share/man/man1
> 		>  ---> Using cache
> 		>  ---> feea96cd509f
> 		> Step 12/75 : RUN apt-get update -q=2 && apt-get -q=2 -V --no-install-recommends install python-lxml python-
> simplejson python-yaml
> 		> python-openpyxl python-requests python-reportlab python-parsedatetime python-pexpect python-pip python-
> setuptools python-wheel
> 		>  ---> Using cache
> 		>  ---> 2bbc69c1997a
> 		> Step 13/75 : RUN pip install filelock
> 		>  ---> Using cache
> 		>  ---> a8e1b1b037e4
> 		> Step 14/75 : RUN apt-get -q=2 -V --no-install-recommends install git sshpass openssh-client sudo net-tools wget curl
> lava-tool bash-
> 		> completion iproute2
> 		>  ---> Using cache
> 		>  ---> 7c19547c8dc8
> 		> Step 15/75 : RUN apt-get -q=2 -V --no-install-recommends install build-essential cmake bison flex automake kmod
> libtool libelf-dev libssl-
> 		> dev libsdl1.2-dev libcairo2-dev libxmu-dev libxmuu-dev libglib2.0-dev libaio-dev pkg-config rsync u-boot-tools
> 		>  ---> Running in a6e59dfdf27d
> 		> E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/p/python3.5/libpython3.5-
> minimal_3.5.3-
> 		> 1+deb9u2_amd64.deb  404  Not Found [IP: 151.101.128.204 80]
> 		> E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/p/python3.5/python3.5-minimal_3.5.3-
> 		> 1+deb9u2_amd64.deb  404  Not Found [IP: 151.101.128.204 80]
> 		> E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/p/python3.5/libpython3.5-stdlib_3.5.3-
> 		> 1+deb9u2_amd64.deb  404  Not Found [IP: 151.101.128.204 80]
> 		> E: Failed to fetch http://security.debian.org/debian-security/pool/updates/main/p/python3.5/python3.5_3.5.3-
> 1+deb9u2_amd64.deb
> 		> 404  Not Found [IP: 151.101.128.204 80]
> 		>
> 		> Thanks  and regards,
> 		> Pooja More
> 		>
> 
> 
> 
> This message contains confidential information and is intended only for the individual(s) named. If you are not the intended recipient, you
> are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this mail and attached file/s is strictly
> prohibited. Please notify the sender immediately and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be
> secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The
> sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail
> transmission.



More information about the Fuego mailing list