-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fixing loadbalancer e2e test #12838
Fixing loadbalancer e2e test #12838
Conversation
trigger: test-robottelo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the functionality that you added to this test makes a lot of sense; we should definitely be testing whether the load balancer is correctly proxying yum transactions to a second Capsule if the first Capsule is unavailable. However, I'm curious as to why you removed the existing functionality from the test instead of writing a new test to capture this scenario.
Before your changes, if I'm reading correctly, the test was effectively checking that the HAProxy server's round robin algorithm functions as expected with registration requests. With your changes, we're no longer testing that functionality, since the other test in this module specifies target
parameters at registration time that should override the round robin algorithm.
Could you please explain your thinking a bit more regarding removing functionality vs. adding a new test?
url = f'https://{loadbalancer_setup["setup_haproxy"]["haproxy"].hostname}' | ||
server_url = f'{url}:8443/rhsm' | ||
base_url = f'{url}/pulp/content' | ||
|
||
result = rhel7_contenthost.download_install_rpm( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking: since you're refactoring this test, consider replacing installing the katello-ca-consumer
package and registering with sub-man with registering via global registration.
7829e72
to
604e9d1
Compare
trigger: test-robottelo |
This was at my recommendation. I did not feel that our tests job should be to test whether round-robin works for HAProxy and that the steps involved here are not of a real use case nature. And this test was proving flaky. First and foremost, users care that if a host is registered that it can receive it's content no matter what is happening behind the load-balancer. Secondly, that if a host registers it will register no matter what is happening behind the load-balancer. So we could keep the registration test -- but I would opt for the same strategy of taking down a Capsule and ensuring that registration continues to work. |
We do have https://github.com/SatelliteQE/robottelo/blob/master/tests/foreman/destructive/test_capsule_loadbalancer.py#L270 so I can edit that after this. |
604e9d1
to
65974df
Compare
trigger: test-robottelo |
65974df
to
4230751
Compare
trigger: test-robottelo |
@ehelms That makes sense to me. Thanks for the explanation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK pending PRT results.
4230751
to
f44cb61
Compare
trigger: test-robottelo |
Modifying this test to focus more on the content host being able to get content even if the capsule it's registered to is down.