From 437a08137e32d937f976aac2f32c453bbf5613a1 Mon Sep 17 00:00:00 2001 From: Kyle Mestery Date: Tue, 17 May 2016 20:56:06 -0500 Subject: [PATCH] startup: Fix Kuryr initialization While testing Kuryr, I noticed it was not correctly detecting that the "tag" service plugin was loaded. After some investigation with Mohammand, he noticed that commit 7f4146e044f371c00825fb838a9cde5d173a92fe changed the init sequence for when Kuryr is run in a Docker container. This commit reverts that behavior of the offending patch, which gets Kuryr initialization to work again and correctly detect the "tags" service plugin in Neutron. It may not be the correct fix, but we can iterate on this one to find a balance for Kuryr both inside and outside a Docker container. Change-Id: I320f539f929be4955f401f363b23b7af09a7c73f Signed-off-by: Kyle Mestery --- kuryr/controllers.py | 2 -- kuryr/server.py | 2 +- kuryr/tests/unit/base.py | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kuryr/controllers.py b/kuryr/controllers.py index c26eeacd..c34c3cfa 100644 --- a/kuryr/controllers.py +++ b/kuryr/controllers.py @@ -1247,5 +1247,3 @@ def ipam_release_address(): raise return flask.jsonify(const.SCHEMA['SUCCESS']) - -neutron_client() diff --git a/kuryr/server.py b/kuryr/server.py index 8ca9e7e4..f85742e1 100644 --- a/kuryr/server.py +++ b/kuryr/server.py @@ -20,7 +20,7 @@ from kuryr import controllers config.init(sys.argv[1:]) - +controllers.neutron_client() controllers.check_for_neutron_ext_support() controllers.check_for_neutron_ext_tag() app.debug = config.CONF.debug diff --git a/kuryr/tests/unit/base.py b/kuryr/tests/unit/base.py index d574f31e..49c8e47c 100644 --- a/kuryr/tests/unit/base.py +++ b/kuryr/tests/unit/base.py @@ -15,6 +15,7 @@ from neutronclient.tests.unit import test_cli20 from kuryr import app from kuryr import binding from kuryr.common import constants as const +from kuryr import controllers from kuryr import utils @@ -35,6 +36,7 @@ class TestKuryrBase(TestCase): def setUp(self): super(TestKuryrBase, self).setUp() + controllers.neutron_client() self.app.neutron.format = 'json' self.addCleanup(self.mox.VerifyAll) self.addCleanup(self.mox.UnsetStubs)