Switch to elasticsearch 7.x

There have been frequent 404 errors attempting to access the
artifacts.elastic.co archive for 5.x.

This also adds some tenacity retries to tests that apear to
be racey.

Change-Id: I04529e8d5584e006c090e790e9903592609343ee
This commit is contained in:
Corey Bryant 2021-03-02 11:53:23 -05:00
parent 0ae9adef3e
commit 31c3988e85
3 changed files with 18 additions and 4 deletions

View File

@ -1571,7 +1571,7 @@ parts:
cat $SNAPCRAFT_PROJECT_DIR/filebeat.pgp.key | apt-key add -
cat $SNAPCRAFT_PROJECT_DIR/telegraf.pgp.key | apt-key add -
apt-get install apt-transport-https
echo 'deb https://artifacts.elastic.co/packages/5.x/apt stable main' > /etc/apt/sources.list.d/elastic-5.x.list
echo 'deb https://artifacts.elastic.co/packages/7.x/apt stable main' > /etc/apt/sources.list.d/elastic-7.x.list
echo 'deb http://ppa.launchpad.net/telegraf-devs/ppa/ubuntu bionic main' > /etc/apt/sources.list.d/telegraf.x.list
# this needs to be re-worked in order to be built in-place
echo 'deb http://ppa.launchpad.net/nikolay.vinogradov/nrpe-root/ubuntu bionic main' > /etc/apt/sources.list.d/nrpe-root.list

View File

@ -20,6 +20,7 @@ import unittest
sys.path.append(os.getcwd())
import tenacity
from tests.framework import Framework # noqa E402
@ -62,8 +63,14 @@ class TestBasics(Framework):
)
self.verify_instance_networking(self._localhost, instance_name)
# The Horizon Dashboard should function
self.verify_gui(self._localhost)
# Ensure horizon has enough time to start
@tenacity.retry(wait=tenacity.wait_fixed(1),
stop=tenacity.stop_after_attempt(10))
def wait_verify_gui():
# The Horizon Dashboard should function
self.verify_gui(self._localhost)
wait_verify_gui()
# Verify that we can uninstall the snap cleanly, and that the
# ovs bridge goes away.

View File

@ -131,7 +131,14 @@ class TestCluster(Framework):
self.assertTrue(ip)
control_host.check_call(['ping', '-c10', '-w11', ip])
# Ensure instance has enough time to initialize
@tenacity.retry(wait=tenacity.wait_fixed(1),
stop=tenacity.stop_after_attempt(10))
def wait_ping():
control_host.check_call(['ping', '-c10', '-w11', ip])
wait_ping()
self.passed = True