summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Wise <phil@advancedtelematic.com>2018-03-23 11:56:15 +0100
committerPhil Wise <phil@advancedtelematic.com>2018-03-23 11:56:15 +0100
commit1804d9f6cfcae158fcf1e5c9da90fdf8cbc6fc18 (patch)
tree7c171e327aceb15f22e5f2f5e5424617a34dcae6
parent156074d9533acf88f102a07701591a4532d007db (diff)
downloadmeta-updater-1804d9f6cfcae158fcf1e5c9da90fdf8cbc6fc18.tar.gz
UDP Socket activation for discovery service
Also, timeout communication to the DUT after 60s.
-rw-r--r--lib/oeqa/selftest/cases/updater.py4
-rw-r--r--recipes-sota/aktualizr/files/aktualizr-secondary.socket1
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py
index 0e7c11b..06884e5 100644
--- a/lib/oeqa/selftest/cases/updater.py
+++ b/lib/oeqa/selftest/cases/updater.py
@@ -544,7 +544,7 @@ class SecondaryTests(OESelftestTestCase):
544 self.assertEqual(stderr, b'', 'Error: ' + stderr.decode()) 544 self.assertEqual(stderr, b'', 'Error: ' + stderr.decode())
545 545
546 def test_secondary_listening(self): 546 def test_secondary_listening(self):
547 print('Checking aktualizr-secondary is present') 547 print('Checking aktualizr-secondary service is listening')
548 stdout, stderr, retcode = self.qemu_command('echo test | nc localhost 9030') 548 stdout, stderr, retcode = self.qemu_command('echo test | nc localhost 9030')
549 self.assertEqual(retcode, 0, "Unable to connect to secondary") 549 self.assertEqual(retcode, 0, "Unable to connect to secondary")
550 550
@@ -591,7 +591,7 @@ def qemu_send_command(port, command):
591 command = ['ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@localhost -p ' + 591 command = ['ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@localhost -p ' +
592 str(port) + ' "' + command + '"'] 592 str(port) + ' "' + command + '"']
593 s2 = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 593 s2 = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
594 stdout, stderr = s2.communicate() 594 stdout, stderr = s2.communicate(timeout=60)
595 return stdout, stderr, s2.returncode 595 return stdout, stderr, s2.returncode
596 596
597 597
diff --git a/recipes-sota/aktualizr/files/aktualizr-secondary.socket b/recipes-sota/aktualizr/files/aktualizr-secondary.socket
index 1cb4269..bda8cdb 100644
--- a/recipes-sota/aktualizr/files/aktualizr-secondary.socket
+++ b/recipes-sota/aktualizr/files/aktualizr-secondary.socket
@@ -1,5 +1,6 @@
1[Socket] 1[Socket]
2ListenStream=9030 2ListenStream=9030
3ListenDatagram=9030
3 4
4[Install] 5[Install]
5WantedBy=sockets.target \ No newline at end of file 6WantedBy=sockets.target \ No newline at end of file