]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove full stack log noise
authorAssaf Muller <amuller@redhat.com>
Sat, 6 Jun 2015 22:41:39 +0000 (18:41 -0400)
committerAssaf Muller <amuller@redhat.com>
Sat, 6 Jun 2015 22:45:29 +0000 (18:45 -0400)
"neutron-server isn't up yet" logs are useless because if
you time out when waiting for the server to start that information
will be in the trace. When you don't time out, the log is just spam.

Same reasoning for the "There are %d agents running!" log.

Also made the agents_count parameter mandatory for the
wait_until_env_is_up method because having a default of 0, or any
other default makes no sense. There's no reason to ever call that
method without specifying the agents_count. This method used
to be used with agents_count == 0 by the server to make sure
its up (And responding to REST calls), but the Neutron server
fixture now uses server_is_live method (Which calls list_networks)
instead.

Change-Id: Ifd6abd04ddaacc9976cb2a75269443f870b47c5b

neutron/tests/fullstack/fullstack_fixtures.py

index e1959f8677188603037ab066d26344f8c1030d42..d6b199f3ed0fb027e4a9e683a1699af65f0380ab 100644 (file)
@@ -105,17 +105,15 @@ class FullstackFixture(fixtures.Fixture):
             NeutronServerFixture(
                 self.test_name, self.temp_dir, rabbitmq_environment))
 
-    def wait_until_env_is_up(self, agents_count=0):
+    def wait_until_env_is_up(self, agents_count):
         utils.wait_until_true(
             functools.partial(self._processes_are_ready, agents_count))
 
     def _processes_are_ready(self, agents_count):
         try:
             running_agents = self.neutron_server.client.list_agents()['agents']
-            LOG.warn("There are %d agents running!", len(running_agents))
             return len(running_agents) == agents_count
         except nc_exc.NeutronClientException:
-            LOG.warn("neutron-server isn't up yet (cannot contact REST API).")
             return False
 
 
@@ -159,7 +157,6 @@ class NeutronServerFixture(fixtures.Fixture):
             self.client.list_networks()
             return True
         except nc_exc.NeutronClientException:
-            LOG.warn("neutron-server isn't up yet (cannot contact REST API).")
             return False
 
     @property