diff --git a/README.md b/README.md index 0524b6992bb416de20d4c4650edae0bf25ff4a6f..efb887f130a0538ac616dfb9075d87ebabd8902a 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ Next change the version in the following places: # Release Notes +* 0.43.2 Fix jumppad integration test using custom nomad image that includes consul * 0.43.1 Fix rounding for the coarse delay and loss compensations. * 0.43.0 Use PyTango 10.0.0 * 0.42.12 Calibration device now fetches the station's name from the StationManager diff --git a/infra/dev/nomad/config/nomad/client.hcl b/infra/dev/nomad/config/nomad/client.hcl index ad35cb8514d98239a1861141e13ce917104afc30..9bc5e3d35fbdbdb4464224d1cb9fb5fb0ae5cafb 100644 --- a/infra/dev/nomad/config/nomad/client.hcl +++ b/infra/dev/nomad/config/nomad/client.hcl @@ -77,7 +77,9 @@ telemetry { } consul { - address = "localhost:8500" + # address = "192.168.76.2:8500" + # checks_use_advertise = true # Otherwise will fallback to bind_addr + addres = "127.0.0.1:8500" server_service_name = "nomad" client_service_name = "nomad-client" auto_advertise = true @@ -86,7 +88,6 @@ consul { } advertise { - http = "{{ GetInterfaceIP \"eth0\" }}" rpc = "{{ GetInterfaceIP \"eth0\" }}" serf = "{{ GetInterfaceIP \"eth0\" }}" diff --git a/infra/dev/nomad/nomad.hcl b/infra/dev/nomad/nomad.hcl index 45035bfee700ff95d4f68385bceaa97268953abf..eab54d7849040037033a809c2b197fe916539d48 100644 --- a/infra/dev/nomad/nomad.hcl +++ b/infra/dev/nomad/nomad.hcl @@ -1,6 +1,7 @@ resource "network" "station" { subnet = "192.168.72.0/21" } + resource "template" "consul_config" { source = <<-EOF @@ -39,9 +40,10 @@ resource "template" "consul_config" { destination = "./tmp/consul.hcl" } - resource "container" "consul" { - depends_on = ["resource.template.consul_config"] + depends_on = [ + "resource.template.consul_config", "resource.network.station" + ] network { id = resource.network.station.meta.id ip_address = "192.168.76.1" @@ -54,6 +56,7 @@ resource "container" "consul" { command = [ "consul", "agent", + "-dev", "-config-file=/consul/config/config.hcl" ] @@ -82,17 +85,22 @@ resource "container" "consul" { privileged = false } - resource "nomad_cluster" "station" { - depends_on = ["resource.container.consul"] + depends_on = [ + "resource.container.consul", + ] client_nodes = 1 client_config = "./config/nomad/client.hcl" consul_config = "./config/nomad/consul.hcl" datacenter = "stat" + image { + name = "git.astron.nl:5000/lofar2.0/jumppad-docker-files/nomad:latest" + } + network { id = resource.network.station.meta.id - #ip_address = "192.168.76.250" + # ip_address = "192.168.76.3" } environment = { NO_PROXY = "astron.nl,control.lofar,10.0.0.0/8" diff --git a/infra/jobs/station/tango.levant.nomad b/infra/jobs/station/tango.levant.nomad index 3b2f012c51f6c145dafb1781bbf01960ae4494be..bb132133eecc98806787be4a1896de20de1b92f2 100644 --- a/infra/jobs/station/tango.levant.nomad +++ b/infra/jobs/station/tango.levant.nomad @@ -104,11 +104,16 @@ job "tango" { } template { + wait { + min = "30s" + max = "300s" + } + error_on_missing_key = true data = <<EOH -{{ range service "tangodb" }} +{{- range service "tangodb" }} MYSQL_HOST = "{{ .Address }}" MYSQL_PORT = "{{ .Port }}" -{{ end }} +{{- end }} EOH destination = "local/env.txt" env = true diff --git a/setup.sh b/setup.sh index 6fad1cbc5ef3444419d9cc4a39cf20025d124340..9b78cf467bc8e8d1d65df8930da9150158b4f93d 100755 --- a/setup.sh +++ b/setup.sh @@ -43,7 +43,7 @@ if dig @127.0.0.1 -p 8600 tango.service.consul +short > /dev/null; then TANGO_HOST=$(dig @127.0.0.1 -p 8600 tango.service.consul +short) export TANGO_HOST="$TANGO_HOST:$TANGO_PORT" else - export TANGO_HOST=$(hostname):10000 + export TANGO_HOST="$(hostname):10000" fi echo "Using tango host $TANGO_HOST" diff --git a/tangostationcontrol/VERSION b/tangostationcontrol/VERSION index f8287cf9564db399c11ab5b0578cb0bb2e36bcf0..fda7553d4b58955a3773a115aeee42d38cd9bc38 100644 --- a/tangostationcontrol/VERSION +++ b/tangostationcontrol/VERSION @@ -1 +1 @@ -0.43.1 +0.43.2 diff --git a/tangostationcontrol/test/change-events/__init__.py b/tangostationcontrol/test/change-events/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tangostationcontrol/test/change-events/test_sync_sync.py b/tangostationcontrol/test/change-events/test_sync_sync.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391