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

Block l7rule compare_type REGEX #27

Open
BenjaminLudwigSAP opened this issue Jul 25, 2022 · 0 comments
Open

Block l7rule compare_type REGEX #27

BenjaminLudwigSAP opened this issue Jul 25, 2022 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@BenjaminLudwigSAP
Copy link
Collaborator

L7Rules with compare_type set to REGEX cause an exception in agent. Instead the error should be already thrown at the API side to give a feedback to the customer that REGEX compare types are not supported with F5.

Steps to reproduce

  • Create a L7rule with compare_type set to REGEX.

Expected behavior

The request is denied with an error stating that REGEX is not a supported value for compare_type with F5 provider driver.

Observed behavior

The F5 provider driver logs an error, the listener stays in PENDING_UPDATE status and the customer is confused.
F5 provider driver log:

2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker [req-7891f13f-b2b2-4220-97ee-1b948c70b974 - 9ead74f3f626427c8e22ca4d522794f8 - - -] l7policy-id=4d2f01cd-c2f6-4ab5-b355-13e27579275a, l7rule-id=aa944a2f-27d8-45eb-b070-2c6fa1ef127c, type=REGEX: CompareTypeNotSupported: l7policy-id=4d2f01cd-c2f6-4ab5-b355-13e27579275a, l7rule-id=aa944a2f-27d8-45eb-b070-2c6fa1ef127c, type=REGEX
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker Traceback (most recent call last):
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/src/octavia-f5-provider-driver/octavia_f5/controller/worker/controller_worker.py", line 104, in as3worker
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker ret = self.sync.tenant_update(network_id, device)
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/src/octavia-f5-provider-driver/octavia_f5/utils/decorators.py", line 28, in wrapper
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker return func(*args, **kwargs)
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/local/lib/python2.7/site-packages/tenacity/__init__.py", line 292, in wrapped_f
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker return self.call(f, *args, **kw)
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/local/lib/python2.7/site-packages/tenacity/__init__.py", line 358, in call
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker do = self.iter(retry_state=retry_state)
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/local/lib/python2.7/site-packages/tenacity/__init__.py", line 319, in iter
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker return fut.result()
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/local/lib/python2.7/site-packages/concurrent/futures/_base.py", line 455, in result
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker return self.__get_result()
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/local/lib/python2.7/site-packages/tenacity/__init__.py", line 361, in call
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker result = fn(*args, **kwargs)
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/src/octavia-f5-provider-driver/octavia_f5/controller/worker/sync_manager.py", line 172, in tenant_update
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker decl = self._declaration_manager.get_declaration({network_id: loadbalancers})
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/src/octavia-f5-provider-driver/octavia_f5/restclient/as3declaration.py", line 57, in get_declaration
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker self._status_manager, self._cert_manager, self._esd_repo)
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/src/octavia-f5-provider-driver/octavia_f5/restclient/as3objects/tenant.py", line 65, in get_tenant
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker service_entities = m_service.get_service(listener, cert_manager, esd_repo)
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/src/octavia-f5-provider-driver/octavia_f5/restclient/as3objects/service.py", line 297, in get_service
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker endpoint_policy = (policy_name, m_policy.get_endpoint_policy(endpoint_policies))
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/src/octavia-f5-provider-driver/octavia_f5/restclient/as3objects/policy_endpoint.py", line 124, in get_endpoint_policy
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker ) for l7policy in l7policies]
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker File "/var/lib/openstack/src/octavia-f5-provider-driver/octavia_f5/restclient/as3objects/policy_endpoint.py", line 67, in _get_condition
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker l7rule.l7policy_id, l7rule.id, l7rule.compare_type))
2021-09-24 12:47:57,862.862 28 ERROR octavia_f5.controller.worker.controller_worker CompareTypeNotSupported: l7policy-id=4d2f01cd-c2f6-4ab5-b355-13e27579275a, l7rule-id=aa944a2f-27d8-45eb-b070-2c6fa1ef127c, type=REGEX
@BenjaminLudwigSAP BenjaminLudwigSAP added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Jul 25, 2022
@BenjaminLudwigSAP BenjaminLudwigSAP self-assigned this Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant