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

reverse-proxy: T6409: Remove unused backend parameters #3531

Merged
merged 2 commits into from
May 30, 2024

Conversation

Embezzle
Copy link
Contributor

@Embezzle Embezzle commented May 27, 2024

Change Summary

There is an unused backend parameters http-check configuration node in reverse-proxy backends.
HTTP health-checks are available via separate backend http-check node implemented in T6246.

We should remove redundant node, it has no effect on rendered haproxy.cfg configuration file so is pointless.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe): Feature/functionality removal

Related Task(s)

https://vyos.dev/T6409

Related PR(s)

Component(s) name

  • load-balance -> reverse-proxy

Proposed changes

How to test

Smoketest result

vyos@vyos:~$ python3 /usr/libexec/vyos/tests/smoke/cli/test_load-balancing_reverse-proxy.py
test_01_lb_reverse_proxy_domain (__main__.TestLoadBalancingReverseProxy.test_01_lb_reverse_proxy_domain) ... ok
test_02_lb_reverse_proxy_cert_not_exists (__main__.TestLoadBalancingReverseProxy.test_02_lb_reverse_proxy_cert_not_exists) ...
PKI does not contain any certificates!


Certificate "cert" not found in configuration!

ok
test_03_lb_reverse_proxy_ca_not_exists (__main__.TestLoadBalancingReverseProxy.test_03_lb_reverse_proxy_ca_not_exists) ...
PKI does not contain any CA certificates!


CA Certificate "ca-test" not found in configuration!

ok
test_04_lb_reverse_proxy_backend_ssl_no_verify (__main__.TestLoadBalancingReverseProxy.test_04_lb_reverse_proxy_backend_ssl_no_verify) ...
backend bk-01 cannot have both ssl options no-verify and ca-certificate
set!

ok
test_05_lb_reverse_proxy_backend_http_check (__main__.TestLoadBalancingReverseProxy.test_05_lb_reverse_proxy_backend_http_check) ... ok
test_06_lb_reverse_proxy_tcp_mode (__main__.TestLoadBalancingReverseProxy.test_06_lb_reverse_proxy_tcp_mode) ... ok
test_07_lb_reverse_proxy_http_response_headers (__main__.TestLoadBalancingReverseProxy.test_07_lb_reverse_proxy_http_response_headers) ...
service https_front must be set to http mode to use
http_response_headers!

ok

----------------------------------------------------------------------
Ran 7 tests in 30.645s

OK

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@sever-sever
Copy link
Member

Is it better to fix the template to get it working?
You cannot delete nodes without migration scripts

@Embezzle
Copy link
Contributor Author

You cannot delete nodes without migration scripts

Apologies, I have added a migration script.

Is it better to fix the template to get it working?

Don't think that would make sense - identical functionality is already available in another configuration node.

I am open to maintainers suggestions on whether this migration script should just delete the removed node, or also migrate configurations to the working http-check node.
Thinking it best to just delete - this node has historically had no functionality, so migrating to the other node would introduce a change in behaviour...

@nvollmar
Copy link
Contributor

parameters http-check doesn't seem to be evaluated anywhere/having an effect on the configuration.

The best way to handle it is probably just removing the old option to not break behavior.
Then make a hint in the release notes to users to check out the new option if they intended to use http checks.

btw, documenation also has to be updated.

src/migration-scripts/reverse-proxy/0-to-1 Outdated Show resolved Hide resolved
@dmbaturin
Copy link
Member

@Mergifyio backport sagitta

Copy link
Contributor

mergify bot commented May 30, 2024

backport sagitta

✅ Backports have been created

@c-po c-po enabled auto-merge May 30, 2024 15:27
@c-po c-po self-requested a review May 30, 2024 15:27
@c-po c-po merged commit d127bb7 into vyos:current May 30, 2024
6 checks passed
c-po added a commit that referenced this pull request May 30, 2024
reverse-proxy: T6409: Remove unused backend parameters (backport #3531)
@Embezzle Embezzle deleted the T6409 branch May 30, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants