Skip to content

Deprecated

This page is deprecated and may contain information that is no longer up to date.

Building EOS (for developers)

EOSCTA double-buildtree

Introduction

This documentation will present the way to have a CTA and a EOS instance working together from the source code of each project. It is useful for developers who need to work on EOS and CTA at the same time.

Get CTA working with the double-buildtree that includes a compiled EOS program

Warning

The previous step CTA buildtree should work before doing these steps.

Clone EOS in your home directory from the eos repository and init the submodule:

git submodule update --init --recursive

Install necessary libs for the compilation of EOS.

sudo yum install -y devtoolset-8-gcc-c++ devtoolset-8 centos-release-scl --enablerepo centos-sclo-rh

Install the EOS dependencies by executing

cd ~
./CTA/continuousintegration/buildtree_runner/eos/buildEosDependencies.sh

Compile EOS

cd ~/eos_build
make -j 4

Warning

The compilation takes time...

Once EOS is compiled, you can run the unit-tests to see if everything is good:

cd ~
./eos_build/unit_tests/eos-unit-tests

If the tests are running, verify you have the docker image doublebuildtree-runner running on your system by using docker image ls. If the image is not there, you can run the following command to install it:

cd ~
./CTA/continuousintegration/buildtree_runner/prepareImageStage2b-scripts.sh

We are ready to run the tests. We will delete the existing instance created previously and run the tests with an additional parameter.

cd ~/CTA/continuousintegration/orchestration/
sudo ./delete_instance.sh -n cta -D
cd ~/CTA/continuousintegration/buildtree_runner/
sudo ./recreate_buildtree_running_environment.sh
cd ~/CTA/continuousintegration/orchestration/
sudo ./create_instance.sh -n cta -b ~ -B CTA-build -D -O -E eos_build -d internal_postgres.yaml
cd ~/CTA/continuousintegration/orchestration/tests/
./test_client.sh -n cta

Troubleshooting

Unable to boot the compiled version of EOS on the ctaeos pod

You will find here problems I had to run the compiled version of EOS on the ctaeos pod.

Check the logs of the ctaeos pod:

kubectl -n cta log ctaeos

This will allow you to better understand where the problem occurred during the startup of EOS.

The MGM did not start

If the MGM did not start, you can have a look to the logs of the MGM located in the ctaeos pod.

kubectl -n cta exec ctaeos -it bash
cat /var/log/eos/mgm/xrdlog.mgm
Missing library problem

It is possible that the problem comes from a missing library. This can be spotted thanks to the ldd command on the ctaeos pod. E.g

ldd /usr/lib64/libXrdEosMgm-4.so

If some objects are not found, identify them and install the missing libraries. To make this persistent, you should add the lib name to the yum install command located in the ~/CTA/continuousintegration/docker/ctafrontend/cc7/doublebuildtree-stage2b-scripts/Dockerfile docker file.

#Install the libs necessary for EOS to run
RUN yum install -y eos-protobuf3 libisa-l libisa-l_crypto-devel xxhash-devel grpc

Then re-install the doublebuildtree-runner docker :

cd ~
./CTA/continuousintegration/buildtree_runner/prepareImageStage2b-scripts.sh

Relaunch the tests:

(cd ~/CTA/continuousintegration/orchestration/;   sudo ./delete_instance.sh -n cta -D  ) && ( cd ~/CTA/continuousintegration/buildtree_runner/ ; sudo ./recreate_buildtree_running_environment.sh )  && ( cd ~/CTA/continuousintegration/orchestration/; sudo ./create_instance.sh -n cta -b ~ -B CTA-build -D -O -E eos_build ) &&  (cd ~/CTA/continuousintegration/orchestration/tests/; ./test_client.sh -n cta )
Linking with your local compiled EOS version did not work properly

Verify your docker image has the rights to access the eos_build directory in your home directory. In fact, this is how the buildtree works: At the pod creation, symbolic links will be created in the doublebuildtree-runner's filesystem so that it fakes an installation of EOS in the docker container. This will allow to fake the installation of EOS within the container → it is your local compiled version of EOS that is then installed there.