Merge "Change SR-IOV agent to log message after failure"
This commit is contained in:
commit
3aac42b3c7
@ -159,6 +159,7 @@ class SriovNicSwitchAgent(object):
|
|||||||
LOG.info("RPC agent_id: %s", self.agent_id)
|
LOG.info("RPC agent_id: %s", self.agent_id)
|
||||||
|
|
||||||
self.topic = topics.AGENT
|
self.topic = topics.AGENT
|
||||||
|
self.failed_report_state = False
|
||||||
self.state_rpc = agent_rpc.PluginReportStateAPI(topics.REPORTS)
|
self.state_rpc = agent_rpc.PluginReportStateAPI(topics.REPORTS)
|
||||||
# RPC network init
|
# RPC network init
|
||||||
# Handle updates from service
|
# Handle updates from service
|
||||||
@ -188,7 +189,12 @@ class SriovNicSwitchAgent(object):
|
|||||||
self.agent_state.pop('resource_versions', None)
|
self.agent_state.pop('resource_versions', None)
|
||||||
self.agent_state.pop('start_flag', None)
|
self.agent_state.pop('start_flag', None)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
self.failed_report_state = True
|
||||||
LOG.exception("Failed reporting state!")
|
LOG.exception("Failed reporting state!")
|
||||||
|
return
|
||||||
|
if self.failed_report_state:
|
||||||
|
self.failed_report_state = False
|
||||||
|
LOG.info("Successfully reported state after a previous failure.")
|
||||||
|
|
||||||
def _create_agent_extension_manager(self, connection):
|
def _create_agent_extension_manager(self, connection):
|
||||||
ext_manager.register_opts(self.conf)
|
ext_manager.register_opts(self.conf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user