Skip to content

Commit

Permalink
Error logging InvalidNetworkType exception
Browse files Browse the repository at this point in the history
Issues:
Fixes F5Networks#1316

Problem: Agent logs exception that object has not attribute msg when logging InvalidNetworkType
exception.

Analysis: Code incorrectly passes .msg attribute. It should pass .message attribute instead.

Tests:
  • Loading branch information
jlongstaf committed Jun 18, 2018
1 parent 735bb24 commit c523490
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion f5_openstack_agent/lbaasv2/drivers/bigip/agent_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def validate_service(self, lb_id):
LOG.debug("Found service definition for '{}', state is ACTIVE"
" move on.".format(lb_id))
except f5_ex.InvalidNetworkType as exc:
LOG.warning(exc.msg)
LOG.warning(exc.message)
except f5_ex.F5NeutronException as exc:
LOG.error("NeutronException: %s" % exc.msg)
except Exception as exc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2199,7 +2199,7 @@ def update_operating_status(self, service):
self.network_builder._annotate_service_route_domains(
service)
except f5ex.InvalidNetworkType as exc:
LOG.warning(exc.msg)
LOG.warning(exc.message)
return

# get currrent member status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def prep_service_networking(self, service, traffic_group):
"with route domain ID.")
self._annotate_service_route_domains(service)
except f5_ex.InvalidNetworkType as exc:
LOG.warning(exc.msg)
LOG.warning(exc.message)
except Exception as err:
LOG.exception(err)
raise f5_ex.RouteDomainCreationException(
Expand Down

0 comments on commit c523490

Please sign in to comment.