-
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
Configure proxy support for create_custom_repos function #17140
Configure proxy support for create_custom_repos function #17140
Conversation
trigger: test-robottelo |
27527f4
to
9849bb2
Compare
9849bb2
to
81f16fb
Compare
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.
For IPv6 satellite, custom repos created using
create_custom_repos
having internal url fails to connect as they do not have IPv6 connectivity and the test fails.
Which are those? Both ohsnap and internal Satellite have IPv6.
download.devel |
PRT Result
|
# Add proxy configuration for IPv6 | ||
if settings.server.is_ipv6: | ||
content += f'proxy={settings.http_proxy.http_proxy_ipv6_url}' |
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.
To me this looks rather magical. I don't know robottello well enough, but isn't there a better way?
Is there a tracker to add IPv6 support to the host that's missing? Would it be better to set up a reverse proxy just for the single host that's missing or instead use RHEL from satellite.sat which is IPv6 enabled?
Looking at the various tests this code is also used in other places where it could have negative side effects.
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'm not aware if there's any tracker to add IPv6 support to the host, maybe @jyejare knows if there's any ?
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.
@ekohl @shubhamsg199 Some Comments and questions:
-
Is there a tracker to add IPv6 support to the missing host?
Do you mean a tracker in Jira or in robottelo automation?
BTW, the proxy here must be used in case of IPv6 host is not able to reach to the external source for contents. The tracking for ipv6 is auto-handled as the test is modified to spin up the ipv6 host when the ipv6 satellite testing is running. -
Would it be better to set up a reverse proxy just for the single host that's missing
Whats the purpose here to setup a reverse proxy ? -
Instead use RHEL from satellite.sat which is IPv6 enabled?
The contents for RHEL are not different in IPv6 and Ipv4 so does not matter from where you get them. I may misunderstood your idea, please feel free to elaborate. -
Looking at the various tests this code is also used in other places where it could have negative side effects.
Yes, that's right the impact is there when the proxy would still be used even when the Ipv4 host is spinned up. So determining the host network would be a crucial but not critical. Especially this would be the case for cross network testing and atleast for now we are not there yet.
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.
@jyejare IIUC I think for tracker @ekohl means if we've some JIRA/SNOW ticket to make download.devel..
host dual stack
And, I think it will take time since its not managed by our team, so until that's made dual stack we can configure proxy for IPv6 runs only, and it won't configure proxy in case of IPv4 run, so I feel it won't have any side effects on IPv4 results and It is only used for content host testing, not for satellite installations
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.
@jyejare IIUC I think for tracker @ekohl means if we've some JIRA/SNOW ticket to make
download.devel..
host dual stack
This is exactly what I meant. If we don't have that issue/ticket it's unlikely to ever be prioritized. It also means we can't really test the 100% native IPv6 without any HTTP proxy case even though at some point customers will start to deploy in that way. Our documentation doesn't say anything about content hosts needing some HTTP proxy set up.
To be explicit: I'm not against a short term workaround like this, but it's important to work to resolve it long term as well.
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.
@ekohl Ohh Dual Stack. The dual stack is coming soon and we will parametrizing the content hosts to run on ipv4, ipv6 and dual stack sooner. And dual stack should not need proxy.
Hence I said above the proxy enablement should happen only when ipv6-only content host test is running.
3d28fa5
to
1170fe8
Compare
Signed-off-by: Shubham Ganar <[email protected]>
1170fe8
to
b2c8c3a
Compare
trigger: test-robottelo |
PRT Result
|
content = f'[{name}]\n' f'name={name}\n' f'baseurl={url}\n' 'enabled=1\n' 'gpgcheck=0\n' | ||
# Add proxy configuration for IPv6 | ||
if settings.server.is_ipv6: | ||
content += f'proxy={settings.http_proxy.http_proxy_ipv6_url}' |
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.
Just a small suggestion for keeping this same for IPv4 run and just add a newline for proxy for IPv6 run
content = f'[{name}]\n' f'name={name}\n' f'baseurl={url}\n' 'enabled=1\n' 'gpgcheck=0\n' | |
# Add proxy configuration for IPv6 | |
if settings.server.is_ipv6: | |
content += f'proxy={settings.http_proxy.http_proxy_ipv6_url}' | |
content = f'[{name}]\n' f'name={name}\n' f'baseurl={url}\n' 'enabled=1\n' 'gpgcheck=0' | |
# Add proxy configuration for IPv6 | |
if settings.server.is_ipv6: | |
content += f'\nproxy={settings.http_proxy.http_proxy_ipv6_url}' |
content = f'[{name}]\n' f'name={name}\n' f'baseurl={url}\n' 'enabled=1\n' 'gpgcheck=0' | ||
content = f'[{name}]\n' f'name={name}\n' f'baseurl={url}\n' 'enabled=1\n' 'gpgcheck=0\n' | ||
# Add proxy configuration for IPv6 | ||
if settings.server.is_ipv6: |
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.
@shubhamsg199 We already have support for this. You can use enable_ipv6_dnf_and_rhsm_proxy
present in robottelo/hosts.py
Line 883 in c06ed07
def enable_ipv6_dnf_and_rhsm_proxy(self): |
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.
And if we go with this change I would suggest not enabling it by default. Each test should decide on its own as we had discussed this in JPL call.
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.
@jameerpathan111 Thanks, that would work, no need to go with this change if we already have the solution for it. I will update the PR
Closing this as |
Problem Statement
For IPv6 satellite, custom repos created using
create_custom_repos
having internal url(download.devel) fails to connect as they do not have IPv6 connectivity and the test fails.Solution
Adding http_proxy while creating custom repos fixes the issue