Commit dc8a30b1 authored by Fabio Luchetti's avatar Fabio Luchetti
Browse files

Rename container names and net-aliases to homogenize with the eos-on-k8s...

Rename container names and net-aliases to homogenize with the eos-on-k8s project (this keeps hostnames shorter, didn't do the other way around because in k8s deployment a suffix is added and long hostnames likely hit HOSTNAME_MAX)
parent 725dad56
Pipeline #1137377 skipped with stage
......@@ -66,14 +66,14 @@ function run_on_containers() {
# Get container names running an EOS service
EOSCONTAINERS=($(docker ps --format {{.Names}} \
| grep -v eos-krb-test\
| grep -v eos-client))
| grep -v eos-kdc\
| grep -v eos-cli))
# EOS service containers plus the client
CONTAINERS=(${EOSCONTAINERS[@]} eos-client1-test)
CONTAINERS=(${EOSCONTAINERS[@]} eos-cli1)
# Identify installed release version (rpm release without platform info)
EOSRELEASE=$(docker exec -i eos-mgm-test ls /usr/src/debug | grep eos)
EOSRELEASE=$(docker exec -i eos-mgm1 ls /usr/src/debug | grep eos)
SRCPATH=/root/rpmbuild/BUILD/${EOSRELEASE}
COVPATH=/var/eos/coverage
......@@ -97,36 +97,36 @@ run_on_containers scl enable devtoolset-6 "lcov --quiet --capture --initial --no
#------------------------------------------------------------------------------
print_header "Running system tests"
docker exec -i eos-mgm-test eos-instance-test-ci
docker exec -i eos-mgm1 eos-instance-test-ci
#------------------------------------------------------------------------------
print_header "Running stress tests"
docker exec -i eos-mgm-test hammer-runner.py --strict-exit-code 1 --gitlab --url eos-mgm-test.eoscluster.cern.ch//eos/dockertest/hammer --protocols xroot --threads 100 --operations write stat read delete --runs 3 --nfiles 10000
docker exec -i eos-mgm1 hammer-runner.py --strict-exit-code 1 --gitlab --url eos-mgm1.eoscluster.cern.ch//eos/dockertest/hammer --protocols xroot --threads 100 --operations write stat read delete --runs 3 --nfiles 10000
#------------------------------------------------------------------------------
print_header "Running fuse(x) tests"
docker exec -i eos-client1-test git clone https://gitlab.cern.ch/dss/eosclient-tests.git
docker exec -di eos-client1-test /bin/bash -c 'mkdir /eos1/; mount -t fuse eosxd -ofsname=mount-1 /eos1/'
docker exec -di eos-client1-test /bin/bash -c 'mkdir /eos2/; mount -t fuse eosxd -ofsname=mount-2 /eos2/'
docker exec -i -e EOS_MGM_URL=root://eos-mgm-test.eoscluster.cern.ch eos-client1-test eos fuse mount /eos_fuse1
docker exec -i -e EOS_MGM_URL=root://eos-mgm-test.eoscluster.cern.ch eos-client1-test eos fuse mount /eos_fuse2
docker exec -i eos-client1-test /bin/bash -c 'mkdir /eos1/dockertest/fusex_tests/; cd /eos1/dockertest/fusex_tests/; fusex-benchmark'
docker exec -i -u eos-user eos-client1-test python /eosclient-tests/run.py --workdir="/eos1/dockertest /eos2/dockertest" ci
docker exec -i eos-client1-test python /eosclient-tests/run.py --workdir="/eos_fuse1/dockertest /eos_fuse2/dockertest" ci
docker exec -i eos-client1-test /bin/bash -c 'umount /eos1 /eos2 /eos_fuse1 /eos_fuse2'
docker exec -i eos-cli1 git clone https://gitlab.cern.ch/dss/eosclient-tests.git
docker exec -di eos-cli1 /bin/bash -c 'mkdir /eos1/; mount -t fuse eosxd -ofsname=mount-1 /eos1/'
docker exec -di eos-cli1 /bin/bash -c 'mkdir /eos2/; mount -t fuse eosxd -ofsname=mount-2 /eos2/'
docker exec -i -e EOS_MGM_URL=root://eos-mgm1.eoscluster.cern.ch eos-cli1 eos fuse mount /eos_fuse1
docker exec -i -e EOS_MGM_URL=root://eos-mgm1.eoscluster.cern.ch eos-cli1 eos fuse mount /eos_fuse2
docker exec -i eos-cli1 /bin/bash -c 'mkdir /eos1/dockertest/fusex_tests/; cd /eos1/dockertest/fusex_tests/; fusex-benchmark'
docker exec -i -u eos-user eos-cli1 python /eosclient-tests/run.py --workdir="/eos1/dockertest /eos2/dockertest" ci
docker exec -i eos-cli1 python /eosclient-tests/run.py --workdir="/eos_fuse1/dockertest /eos_fuse2/dockertest" ci
docker exec -i eos-cli1 /bin/bash -c 'umount /eos1 /eos2 /eos_fuse1 /eos_fuse2'
#------------------------------------------------------------------------------
print_header "Running unit tests"
docker exec -i eos-mgm-test eos-unit-tests
docker exec -i eos-mgm-test eos-fst-unit-tests
docker exec -i eos-mgm1 eos-unit-tests
docker exec -i eos-mgm1 eos-fst-unit-tests
#------------------------------------------------------------------------------
print_header "Flushing coverage data"
# Avoid the eos-client container in this step as it uses the same process tree as the host
# Avoid the eos-cli container in this step as it uses the same process tree as the host
CONTAINERS=(${EOSCONTAINERS[@]})
run_on_containers chown -R daemon:daemon ${COVPATH}
run_on_containers /bin/bash -c 'kill -s SIGPROF $(pidof xrootd)'
CONTAINERS=(${EOSCONTAINERS[@]} eos-client1-test)
CONTAINERS=(${EOSCONTAINERS[@]} eos-cli1)
#------------------------------------------------------------------------------
print_header "Performing individual coverage report"
......@@ -140,16 +140,16 @@ mkdir -p /tmp/eos-coverage-traces/
for container in "${CONTAINERS[@]}"; do
docker cp ${container}:/eos-coverage/${container}.info /tmp/eos-coverage-traces/
done
docker cp /tmp/eos-coverage-traces/ eos-mgm-test:/eos-coverage/traces/
docker exec -i eos-mgm-test ls -lh /eos-coverage/traces/
docker cp /tmp/eos-coverage-traces/ eos-mgm1:/eos-coverage/traces/
docker exec -i eos-mgm1 ls -lh /eos-coverage/traces/
docker exec -i eos-mgm-test cp /eos-coverage/coverage-base.info /eos-coverage/coverage-final-unfiltered.info
docker exec -i eos-mgm1 cp /eos-coverage/coverage-base.info /eos-coverage/coverage-final-unfiltered.info
for container in "${CONTAINERS[@]}"; do
echo "Merging $container.info"
docker exec -i eos-mgm-test /bin/bash -c 'lcov --quiet --add-tracefile /eos-coverage/coverage-final-unfiltered.info --add-tracefile /eos-coverage/traces/'$container'.info --config-file /eos-coverage/eoslcov.rc --output-file /eos-coverage/coverage-final-unfiltered.info'
docker exec -i eos-mgm1 /bin/bash -c 'lcov --quiet --add-tracefile /eos-coverage/coverage-final-unfiltered.info --add-tracefile /eos-coverage/traces/'$container'.info --config-file /eos-coverage/eoslcov.rc --output-file /eos-coverage/coverage-final-unfiltered.info'
done
docker exec -i eos-mgm-test lcov --summary /eos-coverage/coverage-final-unfiltered.info --config-file /eos-coverage/eoslcov.rc
docker exec -i eos-mgm1 lcov --summary /eos-coverage/coverage-final-unfiltered.info --config-file /eos-coverage/eoslcov.rc
rm -rf /tmp/eos-coverage-traces/
#------------------------------------------------------------------------------
......@@ -157,11 +157,11 @@ print_header "Filter coverage file"
# Figure out the namespace type to exclude
EXCLUDE_NAMESPACE=ns_in_memory
if $(docker exec -i eos-mgm-test grep /etc/xrd.cf.mgm -e "^mgmofs.nslib" | grep -q NsInMemory ) ; then
if $(docker exec -i eos-mgm1 grep /etc/xrd.cf.mgm -e "^mgmofs.nslib" | grep -q NsInMemory ) ; then
EXCLUDE_NAMESPACE=ns_quarkdb
fi
docker exec -i eos-mgm-test lcov --remove /eos-coverage/coverage-final-unfiltered.info \
docker exec -i eos-mgm1 lcov --remove /eos-coverage/coverage-final-unfiltered.info \
"${SRCPATH}/test.pb.h" \
"${SRCPATH}/auth_plugin/tests/*" \
"${SRCPATH}/build/*" \
......@@ -190,14 +190,14 @@ docker exec -i eos-mgm-test lcov --remove /eos-coverage/coverage-final-unfiltere
#------------------------------------------------------------------------------
print_header "Generating HTML report"
docker exec -i eos-mgm-test genhtml --output-directory /eos-coverage/coverage-report/ --title "EOS CI Coverage" --config-file /eos-coverage/eoslcov.rc --ignore-errors source /eos-coverage/coverage-final.info
docker exec -i eos-mgm1 genhtml --output-directory /eos-coverage/coverage-report/ --title "EOS CI Coverage" --config-file /eos-coverage/eoslcov.rc --ignore-errors source /eos-coverage/coverage-final.info
#------------------------------------------------------------------------------
print_header "Exporting HTML report and trace files"
rm -rf eos-coverage/
mkdir -p eos-coverage/
docker cp eos-mgm-test:/eos-coverage/coverage-report/ eos-coverage/
docker cp eos-mgm-test:/eos-coverage/traces/ eos-coverage/
docker cp eos-mgm-test:/eos-coverage/coverage-final-unfiltered.info eos-coverage/
docker cp eos-mgm-test:/eos-coverage/coverage-final.info eos-coverage/
docker cp eos-mgm1:/eos-coverage/coverage-report/ eos-coverage/
docker cp eos-mgm1:/eos-coverage/traces/ eos-coverage/
docker cp eos-mgm1:/eos-coverage/coverage-final-unfiltered.info eos-coverage/
docker cp eos-mgm1:/eos-coverage/coverage-final.info eos-coverage/
ls -lh eos-coverage/
......@@ -49,19 +49,19 @@ export EOS_INSTANCE_NAME=eosdockertest
export EOS_AUTOLOAD_CONFIG=default
# The EOS broker URL
export EOS_BROKER_URL=root://eos-mq-test.eoscluster.cern.ch:1097//eos/
export EOS_BROKER_URL=root://eos-mq.eoscluster.cern.ch:1097//eos/
# The EOS host geo location tag used to sort hosts into geographical (rack) locations
export EOS_GEOTAG="docker::test"
# The fully qualified hostname of MGM master1
export EOS_MGM_MASTER1=eos-mgm-test.eoscluster.cern.ch
export EOS_MGM_MASTER1=eos-mgm1.eoscluster.cern.ch
# The fully qualified hostname of MGM master2
export EOS_MGM_MASTER2=eos-mgm-test.eoscluster.cern.ch
export EOS_MGM_MASTER2=eos-mgm1.eoscluster.cern.ch
# The alias which selects master 1 or 2
export EOS_MGM_ALIAS=eos-mgm-test.eoscluster.cern.ch
export EOS_MGM_ALIAS=eos-mgm1.eoscluster.cern.ch
# The mail notification in case of fail-over
#export EOS_MAIL_CC="apeters@mail.cern.ch"
......
{
"hostport" : "eos-mgm-test.eoscluster.cern.ch:1094",
"hostport" : "eos-mgm1.eoscluster.cern.ch:1094",
"remotemountdir" : "/eos/",
"localmountdir" : "/eos/",
"statisticfile" : "stats",
"mdzmqtarget" : "tcp://eos-mgm-test.eoscluster.cern.ch:1100",
"mdzmqtarget" : "tcp://eos-mgm1.eoscluster.cern.ch:1100",
"mdzmqidentity" : "eosxd",
"options" : {
......
......@@ -43,7 +43,7 @@ done
[[ -n $GEOTAG ]] && sed -i "s/EOS_GEOTAG=.*/EOS_GEOTAG=$GEOTAG/" /etc/sysconfig/eos
source /etc/sysconfig/eos
export EOS_MGM_URL=root://eos-mgm-test.eoscluster.cern.ch//
export EOS_MGM_URL=root://eos-mgm1.eoscluster.cern.ch//
if [ -e /opt/eos/xrootd/bin/xrootd ]; then
XROOTDEXE="/opt/eos/xrootd//bin/xrootd"
......
......@@ -12,7 +12,7 @@ echo Done.
# Populate KDC and generate keytab files
echo -n "Populating kdc... "
/usr/lib/heimdal/bin/kadmin -l -r TEST.EOS add --random-password --use-defaults admin1 host/eos-mgm-test.eoscluster.cern.ch
/usr/lib/heimdal/bin/kadmin -l -r TEST.EOS add --random-password --use-defaults admin1 host/eos-mgm1.eoscluster.cern.ch
/usr/lib/heimdal/bin/kadmin -l -r TEST.EOS ext_keytab --keytab=/root/admin1.keytab admin1
/usr/lib/heimdal/bin/kadmin -l -r TEST.EOS ext_keytab --keytab=/root/eos.keytab host/eos-mgm-test.eoscluster.cern.ch
/usr/lib/heimdal/bin/kadmin -l -r TEST.EOS ext_keytab --keytab=/root/eos.keytab host/eos-mgm1.eoscluster.cern.ch
echo Done.
......@@ -2,5 +2,5 @@
default_realm = TEST.EOS
[realms]
TEST.EOS = {
kdc=eos-krb-test.eoscluster.cern.ch
kdc=eos-kdc.eoscluster.cern.ch
}
docker exec -it eos-mgm-test bash
docker exec -it eos-mgm1 bash
......@@ -32,7 +32,7 @@ echo -e "\n*** Removing containers"
# Removing the FST containers in parallel
for (( i=1; i<=$n_fst; i++))
do
FSTHOSTNAME=eos-fst${i}-test
FSTHOSTNAME=eos-fst${i}
echo "Removing container: "$FSTHOSTNAME
docker rm -f $FSTHOSTNAME &
PIDS="${PIDS} $!"
......@@ -41,14 +41,14 @@ done
# Removing the client containers in parallel
for (( i=1; i<=$n_client; i++))
do
CLIENTHOSTNAME=eos-client${i}-test
CLIENTHOSTNAME=eos-cli${i}
echo "Removing container: "$CLIENTHOSTNAME
docker rm -f $CLIENTHOSTNAME &
PIDS="${PIDS} $!"
done
# Removing all other containers from EOS cluster
for CONT in eos-mgm-test eos-mq-test eos-krb-test eos-qdb-test eos-proxy-test; do
for CONT in eos-mgm1 eos-mq eos-kdc eos-qdb eos-proxy-test; do
echo "Removing container: "$CONT
docker rm -f ${CONT} &
PIDS="${PIDS} $!"
......
......@@ -8,8 +8,8 @@ with_qdb=0
n_client=1
with_proxy=0
geotags=()
regular_EOS_MGM_URL="EOS_MGM_URL=root://eos-mgm-test.eoscluster.cern.ch:1094"
proxy_EOS_MGM_URL="EOS_MGM_URL=root://eos-proxy-test.eoscluster.cern.ch:1094//root://eos-mgm-test.eoscluster.cern.ch:1094"
regular_EOS_MGM_URL="EOS_MGM_URL=root://eos-mgm1.eoscluster.cern.ch:1094"
proxy_EOS_MGM_URL="EOS_MGM_URL=root://eos-proxy-test.eoscluster.cern.ch:1094//root://eos-mgm1.eoscluster.cern.ch:1094"
usage()
{
......@@ -70,25 +70,25 @@ docker network create eoscluster.cern.ch || true
# Kerberos server creation and setup
echo -e "\n\n*** Kerberos server creation and setup"
docker run -dit -h eos-krb-test.eoscluster.cern.ch --name eos-krb-test --net=eoscluster.cern.ch --net-alias=eos-krb-test $image
docker exec -i eos-krb-test /kdc.sh
docker run -dit -h eos-kdc.eoscluster.cern.ch --name eos-kdc --net=eoscluster.cern.ch --net-alias=eos-kdc $image
docker exec -i eos-kdc /kdc.sh
# MQ server creation and setup
echo -e "\n\n*** MQ server creation and setup"
docker run -dit -h eos-mq-test.eoscluster.cern.ch --name eos-mq-test --net=eoscluster.cern.ch --net-alias=eos-mq-test $image
docker exec -i eos-mq-test /eos_mq_setup.sh
docker run -dit -h eos-mq.eoscluster.cern.ch --name eos-mq --net=eoscluster.cern.ch --net-alias=eos-mq $image
docker exec -i eos-mq /eos_mq_setup.sh
# MGM server creation
echo -e "\n\n*** MGM server creation"
docker run --privileged -dit -h eos-mgm-test.eoscluster.cern.ch --name eos-mgm-test --net=eoscluster.cern.ch --net-alias=eos-mgm-test $image
docker run --privileged -dit -h eos-mgm1.eoscluster.cern.ch --name eos-mgm1 --net=eoscluster.cern.ch --net-alias=eos-mgm1 $image
if [[ $with_qdb == 1 ]]; then
echo -e "\n\n*** QuarkDB server creation and setup"
# Namespace library which will be loaded by the MGM should be changed to enable QuarkDB mode
docker exec -i eos-mgm-test sed -i 's/libEosNsInMemory.so/libEosNsQuarkdb.so/g' /etc/xrd.cf.mgm
docker exec -i eos-mgm1 sed -i 's/libEosNsInMemory.so/libEosNsQuarkdb.so/g' /etc/xrd.cf.mgm
# QuarkDB server creation and setup
docker run --privileged -dit -h eos-qdb-test.eoscluster.cern.ch --name eos-qdb-test --net=eoscluster.cern.ch --net-alias=eos-qdb-test $image
docker exec -i eos-qdb-test /eos_qdb_setup.sh
docker run --privileged -dit -h eos-qdb.eoscluster.cern.ch --name eos-qdb --net=eoscluster.cern.ch --net-alias=eos-qdb $image
docker exec -i eos-qdb /eos_qdb_setup.sh
fi
if [[ $with_proxy == 1 ]]; then
......@@ -102,13 +102,13 @@ fi
# Applying Kerberos keytab to EOS cluster
echo -e "\n\n*** Applying Kerberos keytab on EOS cluster"
TMP_EOS_KEYTAB=mktemp
docker cp eos-krb-test:/root/eos.keytab $TMP_EOS_KEYTAB
docker cp $TMP_EOS_KEYTAB eos-mgm-test:/etc/eos.krb5.keytab
docker cp eos-kdc:/root/eos.keytab $TMP_EOS_KEYTAB
docker cp $TMP_EOS_KEYTAB eos-mgm1:/etc/eos.krb5.keytab
rm -f $TMP_EOS_KEYTAB
# MGM server setup
echo -e "\n\n*** MGM server setup"
docker exec -i eos-mgm-test /eos_mgm_setup.sh
docker exec -i eos-mgm1 /eos_mgm_setup.sh
# FST servers parallel creation
echo -e "\n\n*** FST servers parallel creation"
......@@ -116,7 +116,7 @@ FAILURE=0
PIDS=""
for (( i=1; i<=$n_fst; i++ )); do
FSTHOSTNAME=eos-fst${i}-test
FSTHOSTNAME=eos-fst${i}
docker run --privileged -dit -h $FSTHOSTNAME.eoscluster.cern.ch --name $FSTHOSTNAME --net=eoscluster.cern.ch --net-alias=$FSTHOSTNAME $image &
PIDS="${PIDS} $!"
sleep 0.1
......@@ -136,10 +136,10 @@ echo -e "\n\n*** FST servers parallel setup"
PIDS=""
for (( i=1; i<=$n_fst; i++ )); do
FSTHOSTNAME=eos-fst${i}-test
FSTHOSTNAME=eos-fst${i}
# Configure the QDB contact details in the /etc/xrd.cf.fst file
if [[ $with_qdb == 1 ]]; then
docker exec -i eos-fst${i}-test /bin/bash -c "echo \"fstofs.qdbcluster eos-qdb-test.eoscluster.cern.ch:7777\" >> /etc/xrd.cf.fst"
docker exec -i eos-fst${i} /bin/bash -c "echo \"fstofs.qdbcluster eos-qdb.eoscluster.cern.ch:7777\" >> /etc/xrd.cf.fst"
fi
docker exec -i $FSTHOSTNAME /eos_fst_setup.sh $i ${geotags[i-1]:+"-g${geotags[i-1]}"} &
......@@ -158,18 +158,18 @@ fi
# Enabling default space with quota disabled and booting filesystems
echo -e "\n\n*** Enabling default space with quota disabled and booting filesystems"
docker exec -i eos-mgm-test /eos_mgm_fs_setup.sh $n_fst
docker exec -i eos-mgm1 /eos_mgm_fs_setup.sh $n_fst
# Client servers creation and setup
echo -e "\n\n*** Client servers creation and setup"
for (( i=1; i<=$n_client; i++ )); do
CLIENTHOSTNAME=eos-client${i}-test
CLIENTHOSTNAME=eos-cli${i}
docker run --privileged --pid=host -dit -h ${CLIENTHOSTNAME}.eoscluster.cern.ch --name ${CLIENTHOSTNAME} --net=eoscluster.cern.ch --net-alias=${CLIENTHOSTNAME} ${deb_cli_img:-$image}
# Kerberos client configuration
docker exec -i eos-krb-test cat /root/admin1.keytab | docker exec -i ${CLIENTHOSTNAME} bash -c "cat > /root/admin1.keytab"
docker exec -i eos-kdc cat /root/admin1.keytab | docker exec -i ${CLIENTHOSTNAME} bash -c "cat > /root/admin1.keytab"
docker exec -i ${CLIENTHOSTNAME} kinit -kt /root/admin1.keytab admin1@TEST.EOS
docker exec -i ${CLIENTHOSTNAME} kvno host/eos-mgm-test.eoscluster.cern.ch
docker exec -i ${CLIENTHOSTNAME} kvno host/eos-mgm1.eoscluster.cern.ch
if [[ $with_proxy == 1 ]];
then
......
......@@ -19,7 +19,7 @@ ofs.osslib libEosFstOss.so
ofs.tpc pgm /usr/bin/xrdcp
###########################################################
# this URL can be overwritten by EOS_BROKER_URL defined /etc/sysconfig/xrd
fstofs.broker root://eos-mq-test.eoscluster.cern.ch:1097//eos/
fstofs.broker root://eos-mq.eoscluster.cern.ch:1097//eos/
fstofs.autoboot true
fstofs.quotainterval 10
fstofs.metalog /var/eos/md/
......
......@@ -34,7 +34,7 @@ mgmofs.targetport 1095
#mgmofs.trace all debug
# this URL can be overwritten by EOS_BROKER_URL defined in /etc/sysconfig/eos
mgmofs.broker root://eos-mq-test.eoscluster.cern.ch:1097//eos/
mgmofs.broker root://eos-mq.eoscluster.cern.ch:1097//eos/
# this name can be overwritten by EOS_INSTANCE_NAME defined in /etc/sysconfig/eos
mgmofs.instance eosdockertest
......@@ -74,5 +74,5 @@ mgmofs.authport 15555
#-------------------------------------------------------------------------------
mgmofs.nslib /usr/lib64/libEosNsInMemory.so
#mgmofs.nslib /usr/lib64/libEosNsQuarkdb.so
mgmofs.qdbcluster eos-qdb-test.eoscluster.cern.ch:7777
mgmofs.qdbcluster eos-qdb.eoscluster.cern.ch:7777
mgmofs.centraldrain true
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment