Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent_manager does not notice ImportError when icontrol_driver occurs ImportError #1425

Open
Xeite opened this issue Jul 9, 2019 · 0 comments

Comments

@Xeite
Copy link

Xeite commented Jul 9, 2019

OpenStack Release

Ocata

Description

When icontrol_driver failed to be intialized for some driver issues (import error, barbican connection failed, ... ), agent_manager keep running itself instead of exit

Agent Version

stable/ocata

Operating System

ubuntu16.04

OpenStack Release

Ocata

Description

Even the code (https://github.com/F5Networks/f5-openstack-agent/blob/master/f5_openstack_agent/lbaasv2/drivers/bigip/agent_manager.py#L345)
says exit the app when ImportError occurs, it does not work since acutually icontrol driver catch every exception (https://github.com/F5Networks/f5-openstack-agent/blob/master/f5_openstack_agent/lbaasv2/drivers/bigip/icontrol_driver.py#L438).

It makes user to be confused, since the program makes AttributeError rather than exit early.

Log below.

2019-07-09 14:12:23.675 13165 ERROR f5_openstack_agent.lbaasv2.drivers.bigip.icontrol_driver [req-1e6529af-7a59-437d-8170-b6fc3785d3aa - - - - -] Failed to initialize CertManager. Unable to initialize Barbican client. title
2019-07-09 14:12:23.677 13165 ERROR f5_openstack_agent.lbaasv2.drivers.bigip.icontrol_driver [req-1e6529af-7a59-437d-8170-b6fc3785d3aa - - - - -] exception in intializing driver Unable to initialize Barbican client. title
2019-07-09 14:12:23.678 13165 DEBUG f5_openstack_agent.lbaasv2.drivers.bigip.agent_manager [req-1e6529af-7a59-437d-8170-b6fc3785d3aa - - - - -] setting agent host to krane-pgstage-api1:e12e3cb9-2b30-53eb-a89f-a8696bbf5f64 __init__ /opt/openstack/src/f5-openstack-agent/f5_openstack_agent/lbaasv2/drivers/bigip/agent_manager.py:271
2019-07-09 14:12:23.678 13165 DEBUG f5_openstack_agent.lbaasv2.drivers.bigip.agent_manager [req-1e6529af-7a59-437d-8170-b6fc3785d3aa - - - - -] agent in Project environment will send callbacks to f5-lbaasv2-process-on-controller_Project _setup_rpc /opt/openstack/src/f5-openstack-agent/f5_openstack_agent/lbaasv2/drivers/bigip/agent_manager.py:355
2019-07-09 14:12:23.679 13165 CRITICAL neutron [req-1e6529af-7a59-437d-8170-b6fc3785d3aa - - - - -] AttributeError: 'iControlDriver' object has no attribute 'network_builder'
2019-07-09 14:12:23.679 13165 ERROR neutron Traceback (most recent call last):
2019-07-09 14:12:23.679 13165 ERROR neutron   File "/opt/openstack/bin/f5-oslbaasv2-agent", line 11, in <module>
2019-07-09 14:12:23.679 13165 ERROR neutron     load_entry_point('f5-openstack-agent', 'console_scripts', 'f5-oslbaasv2-agent')()
2019-07-09 14:12:23.679 13165 ERROR neutron   File "/opt/openstack/src/f5-openstack-agent/f5_openstack_agent/lbaasv2/drivers/bigip/agent.py", line 83, in main
2019-07-09 14:12:23.679 13165 ERROR neutron     mgr = manager.LbaasAgentManager(cfg.CONF)
2019-07-09 14:12:23.679 13165 ERROR neutron   File "/opt/openstack/src/f5-openstack-agent/f5_openstack_agent/lbaasv2/drivers/bigip/agent_manager.py", line 303, in __init__
2019-07-09 14:12:23.679 13165 ERROR neutron     self.lbdriver.set_context(self.context)
2019-07-09 14:12:23.679 13165 ERROR neutron   File "/opt/openstack/src/f5-openstack-agent/f5_openstack_agent/lbaasv2/drivers/bigip/icontrol_driver.py", line 1027, in set_context
2019-07-09 14:12:23.679 13165 ERROR neutron     if self.network_builder:
2019-07-09 14:12:23.679 13165 ERROR neutron AttributeError: 'iControlDriver' object has no attribute 'network_builder'
2019-07-09 14:12:23.679 13165 ERROR neutron
2019-07-09 14:12:24.694 13228 INFO neutron.common.config [-] Logging enabled!

Deployment

One Neutron API, one agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant