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

Enabling Robottelo for IPv6 Testing #14160

Merged
merged 7 commits into from
Jun 13, 2024

Conversation

jyejare
Copy link
Member

@jyejare jyejare commented Feb 22, 2024

Problem Statement

Enabling IPv6 switching in Robottelo Automation

Solution

  • Added the IPV6 switch and IPV6 proxy config that would switch ON and OFF the IPv6 Testing for robottelo tests via CI or local
  • Added setup of Satellite HTTP Proxy by default to all satellite spinned as/by broker workers, factory, directly from Broker context manager
  • Adder teardown of Satellite HTTP Proxy by default to all satellite spinned as/by broker workers, factory, directly from Broker context manager
  • Added setup of Capsule HTTP Proxy by default to all capsules spinned by factory, directly from Broker context manager to speak to CDN for content access
  • Adder teardown of Capsule HTTP Proxy by default to all capsules spinned by factory, directly from Broker context manager
  • Deploy Arguments switches satellite / capsule spin up to use Ipv6 sat/cap/host

Followup PRs, coming next:

  • [DEVs are yet to decide, Out of scope of the PR] Hosts spins up to use ipv6/ipv4 network (based on strategy of host testing in IPv6 is yet to decide)
  • HTTP Proxy specific tests uses its own non-default-http-proxy setup

Broker Pending(Not blocking this PR from merge):

  • Adding support to deploy container as content host in Ipv6 network

Related Issues

@jyejare jyejare requested a review from a team as a code owner February 22, 2024 12:03
@jyejare jyejare marked this pull request as draft February 22, 2024 12:04
Copy link
Member

@JacobCallahan JacobCallahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add some validators for these?

@Gauravtalreja1 Gauravtalreja1 added the No-CherryPick PR doesnt need CherryPick to previous branches label Feb 27, 2024
@jyejare jyejare changed the title Enabling Robottelo for IPv6 Testing [Dont Review | Merge] Enabling Robottelo for IPv6 Testing Mar 7, 2024
@jyejare jyejare force-pushed the enabling_ipv6 branch 6 times, most recently from de39a8c to ae209be Compare March 20, 2024 10:28
@jyejare jyejare marked this pull request as ready for review March 20, 2024 10:29
@jyejare jyejare requested a review from a team as a code owner March 20, 2024 10:29
@jyejare jyejare changed the title [Dont Review | Merge] Enabling Robottelo for IPv6 Testing [Dont Merge] Enabling Robottelo for IPv6 Testing Mar 20, 2024
robottelo/hosts.py Outdated Show resolved Hide resolved
robottelo/hosts.py Outdated Show resolved Hide resolved
robottelo/hosts.py Outdated Show resolved Hide resolved
robottelo/hosts.py Outdated Show resolved Hide resolved
robottelo/hosts.py Outdated Show resolved Hide resolved
pytest_fixtures/core/sat_cap_factory.py Outdated Show resolved Hide resolved
pytest_fixtures/core/sat_cap_factory.py Outdated Show resolved Hide resolved
pytest_fixtures/core/sat_cap_factory.py Outdated Show resolved Hide resolved
robottelo/hosts.py Show resolved Hide resolved
robottelo/hosts.py Show resolved Hide resolved
@jyejare jyejare force-pushed the enabling_ipv6 branch 4 times, most recently from e97ea7d to 1c2a4a4 Compare March 22, 2024 11:16
@jyejare jyejare force-pushed the enabling_ipv6 branch 2 times, most recently from 8929c60 to 925fb05 Compare April 12, 2024 12:46
@jyejare jyejare changed the title [Dont Merge] Enabling Robottelo for IPv6 Testing Enabling Robottelo for IPv6 Testing Apr 25, 2024
Copy link
Member

@rplevka rplevka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% sold on the implemented approach to dynamically update the hostname based on a single setting.

My suggestion would be to extend the settings that point to certain hostnames, to contain both versions, so the fixtures/tests could pick the appropriate one.

SETTING:
    SOME_SERVER_RESOURCE:
        IPV4: foo.bar.ipv4.baz
        IPV6: foo.bar.ipv6.baz

we could also implement some "default" flag (like we do in broker with providers) to save ourselves from having to be explicit about the IP version in scenarios where we don't care.

conf/migrations.py Outdated Show resolved Hide resolved
@jyejare jyejare force-pushed the enabling_ipv6 branch 3 times, most recently from 29e11d1 to 7072ef7 Compare May 6, 2024 09:59
@jyejare
Copy link
Member Author

jyejare commented May 6, 2024

@rplevka The hook implementation isnt really helping here as its resetting all the settings after the post hook and hence I changed the implementation to do this switching in config after settings object is initialized.

Coming back to your first concern which is having two different settings is not idealistic because then you have lot of handling(if conditioning) throughout robottelo to choose between v4 or v6 instance based on the network execution we are doing v4 or v6. Trust me it would be a lot of code changes.

With the current approach, the setting names would remain the same and only the values/hostnames would change behind the scenes, even one doesn't need to change the value/hostname to switch.

The only switch is is_ipv6 setting.

Copy link
Contributor

@rmynar rmynar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK - although it's not perfect yet, the main goal seems to be completed - deployment of ipv6 server is possible and nothing else seems to be broken.

@jyejare
Copy link
Member Author

jyejare commented Jun 12, 2024

The sanity regression testing is successfully verified for Ipv4 after recent changes. An Ipv6 was tested previously and it was successful too.

CC: @JacobCallahan

@devendra104 , I think we need to merge the changes in CI for this PR to me merged. Especiallly conf related changes which wont also impact existing IPv4 pipelines.

@jyejare jyejare added 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels Jun 13, 2024
@jyejare jyejare force-pushed the enabling_ipv6 branch 2 times, most recently from 3712de9 to 21d5c81 Compare June 13, 2024 06:57
@jyejare
Copy link
Member Author

jyejare commented Jun 13, 2024

trigger: test-robottelo
pytest: tests/foreman -m build_sanity
env:
    ROBOTTELO_server__deploy_arguments__deploy_network_type: ipv4
    ROBOTTELO_server__is_ipv6: False
    ROBOTTELO_server__http_proxy_ipv6_url: ''

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7388
Build Status: SUCCESS
PRT Comment: pytest tests/foreman -m build_sanity --external-logging
Test Result : ======= 12 passed, 5502 deselected, 5607 warnings in 1555.35s (0:25:55) ========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 13, 2024
@jyejare
Copy link
Member Author

jyejare commented Jun 13, 2024

@JacobCallahan We should be good to merge the PR now as the PRT is passing showing no regression on existing IPv4 testing.

This should not need CI MR to merged as we are taking care of it from dynaconf validators.

@JacobCallahan
Copy link
Member

I'm going to merge this now. @ogajduse if there is anything you'd still like addressed for this post-merge, please write it down and create an issue for it to be resolved later. I'd like to move this forward so we can flesh out things live.

@JacobCallahan JacobCallahan merged commit 264744b into SatelliteQE:master Jun 13, 2024
10 checks passed
jyejare added a commit to jyejare/robottelo that referenced this pull request Jun 14, 2024
* Enabling Robottelo for IPv6 Testing

* Enabling broker context managers for ipv6 network

* Translating URLs for Ipv6

* Sanity Testing fixes for Ipv6

* Review Fixes

* Removed the explicit http proxy teardowns

* Git checks fixes
jyejare added a commit that referenced this pull request Jun 14, 2024
Enabling Robottelo for IPv6 Testing (#14160)

* Enabling Robottelo for IPv6 Testing

* Enabling broker context managers for ipv6 network

* Translating URLs for Ipv6

* Sanity Testing fixes for Ipv6

* Review Fixes

* Removed the explicit http proxy teardowns

* Git checks fixes
jyejare added a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
* Enabling Robottelo for IPv6 Testing

* Enabling broker context managers for ipv6 network

* Translating URLs for Ipv6

* Sanity Testing fixes for Ipv6

* Review Fixes

* Removed the explicit http proxy teardowns

* Git checks fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 CherryPick PR needs CherryPick to previous branches enhancement An addition to the robottelo framework Framework Changes A modification of the robottelo framework PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants