Skip to content
Snippets Groups Projects
Commit 959ecfec authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

Merge branch 'master' into L2SS-1030

parents f4866624 f3d1efdc
No related branches found
No related tags found
1 merge request!468Resolve L2SS-1030 "Create configuration device"
......@@ -38,6 +38,12 @@ services:
- TANGO_HOST=${TANGO_HOST}
- TANGO_ZMQ_EVENT_PORT=5811
- TANGO_ZMQ_HEARTBEAT_PORT=5911
healthcheck:
test: l2ss-health STAT/TileBeam/1
interval: 1m
timeout: 30s
retries: 3
start_period: 30s
working_dir: /opt/lofar/tango
entrypoint:
- bin/start-ds.sh
......
......@@ -42,6 +42,12 @@ services:
- TANGO_HOST=${TANGO_HOST}
- TANGO_ZMQ_EVENT_PORT=5804
- TANGO_ZMQ_HEARTBEAT_PORT=5904
healthcheck:
test: l2ss-health STAT/UNB2/1
interval: 1m
timeout: 30s
retries: 3
start_period: 30s
working_dir: /opt/lofar/tango
entrypoint:
- bin/start-ds.sh
......
......@@ -45,6 +45,12 @@ services:
- TANGO_HOST=${TANGO_HOST}
- TANGO_ZMQ_EVENT_PORT=5806
- TANGO_ZMQ_HEARTBEAT_PORT=5906
healthcheck:
test: l2ss-health STAT/XST/1
interval: 1m
timeout: 30s
retries: 3
start_period: 30s
working_dir: /opt/lofar/tango
entrypoint:
- bin/start-ds.sh
......
......@@ -7,6 +7,7 @@ RUN sudo apt-get install -y g++ gcc && sudo apt-get clean
RUN sudo apt-get install -y shellcheck graphviz && sudo apt-get clean
RUN sudo apt-get install -y python3-dev libboost-python-dev pkg-config && sudo apt-get clean
RUN sudo apt-get install -y rsync && sudo apt-get clean
RUN sudo apt-get install -y netcat && sudo apt-get clean
COPY lofar-device-base/lofar-requirements.txt /lofar-requirements.txt
......
......@@ -18,6 +18,12 @@ services:
options:
max-size: "100m"
max-file: "10"
healthcheck:
test: python -c "import socket; s = socket.socket(); s.settimeout(10); s.connect(('$HOSTNAME', 1514));"
interval: 1m
timeout: 30s
retries: 3
start_period: 30s
networks:
- control
ports:
......
......@@ -31,9 +31,9 @@ function integration_test {
# shellcheck disable=SC2145
echo "make restart ${restarts[@]} ..."
make restart "${restarts[@]}"
make await "${restarts[@]}"
fi
#TODO(L2SS-988): Use healthcheck to wait for containers to become ready
sleep 30
echo "make integration ${1} ..."
make integration "${1}"
}
......@@ -76,6 +76,8 @@ sleep 1 # dsconfig container must be up and running...
# shellcheck disable=SC2016
echo '/usr/local/bin/wait-for-it.sh ${TANGO_HOST} --strict --timeout=300 -- true' | make run dsconfig bash -
# Devices list is used to explitly word split when supplied to commands, must
# disable shellcheck SC2086 for each case.
DEVICES="device-boot device-apsct device-ccd device-apspu device-sdp device-recv device-bst device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam device-psoc device-pcon device-antennafield device-temperature-manager device-observation device-observation-control device-configuration"
SIMULATORS="sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim ccd-sim"
......@@ -108,10 +110,6 @@ integration_test dummy
# make start elk # L2SS-970: elk temporarily disabled
make start logstash
# Give elk time to start
# TODO(L2SS-988): Use a nicer more reliable mechanism
sleep 10
# Update the dsconfig
# Do not remove `bash`, otherwise statement ignored by gitlab ci shell!
bash "${LOFAR20_DIR}"/sbin/update_ConfigDb.sh "${LOFAR20_DIR}"/CDB/LOFAR_ConfigDb.json
......@@ -132,9 +130,9 @@ make start $DEVICES
# Archive devices: archive-timescale first
make start archiver-timescale
# Give devices time to restart
# TODO(L2SS-988): Use a nicer more reliable mechanism
sleep 70
# Wait for archiver and devices to restart
# shellcheck disable=SC2086
make await archiver-timescale $DEVICES
# Give archiver-timescale time to start
# shellcheck disable=SC2016
......
0.3.1
0.4.0
......@@ -64,6 +64,7 @@ console_scripts =
l2ss-parse-statistics-packet = tangostationcontrol.statistics.packet:main
l2ss-random-data = tangostationcontrol.test.devices.random_data:main
l2ss-version = tangostationcontrol:print_version
l2ss-health = tangostationcontrol.common.health:main
[options.package_data]
* = *.json, *.mib
# -*- coding: utf-8 -*-
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
import sys
from tango.server import run
......
# -*- coding: utf-8 -*-
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
import sys
from tango import DeviceProxy
def main(*args, **kwargs):
"""Main function health check"""
# Remove first argument as it is the filename
args = sys.argv[1:]
try:
DeviceProxy(args[0]).ping()
return 0
except BaseException:
return 1
......@@ -82,7 +82,7 @@ class TestStatisticsWriterSST(BaseIntegrationTestCase):
'2021-09-20T12:17:40.000+00:00'
)
self.assertIsNotNone(stat)
self.assertEqual("0.3.1", stat.station_version_id)
self.assertEqual("0.4.0", stat.station_version_id)
self.assertEqual("0.1", stat.writer_version_id)
def test_insert_tango_SST_statistics(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment