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

Ci add scc mirror #9490

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

jordimassaguerpla
Copy link
Contributor

What does this PR change?

add description

GUI diff

No difference.

Before:

After:

  • DONE

Documentation

Test coverage

ℹ️ If a major new functionality is added, it is strongly recommended that tests for the new functionality are added to the Cucumber test suite

  • No tests: add explanation

  • No tests: already covered

  • Unit tests were added

  • Cucumber tests were added

  • DONE

Links

Issue(s): #
Port(s): # add downstream PR(s), if any

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

Before you merge

Check How to branch and merge properly!

Copy link
Contributor

👋 Hello! Thanks for contributing to our project.
Acceptance tests will take some time (aprox. 1h), please be patient ☕
You can see the progress at the end of this page and at https://github.com/uyuni-project/uyuni/pull/9490/checks
Once tests finish, if they fail, you can check 👀 the cucumber report. See the link at the output of the action.
You can also check the artifacts section, which contains the logs at https://github.com/uyuni-project/uyuni/pull/9490/checks.

If you are unsure the failing tests are related to your code, you can check the "reference jobs". These are jobs that run on a scheduled time with code from master. If they fail for the same reason as your build, it means the tests or the infrastructure are broken. If they do not fail, but yours do, it means it is related to your code.

Reference tests:

KNOWN ISSUES

Sometimes the build can fail when pulling new jar files from download.opensuse.org . This is a known limitation. Given this happens rarely, when it does, all you need to do is rerun the test. Sorry for the inconvenience.

For more tips on troubleshooting, see the troubleshooting guide.

Happy hacking!
⚠️ You should not merge if acceptance tests fail to pass. ⚠️

Copy link
Contributor

github-actions bot commented Nov 21, 2024

Suggested tests to cover this Pull Request
  • srv_sync_channels
  • min_check_patches_install
  • srv_advanced_search
  • srv_cobbler_distro
  • srv_reportdb
  • srv_cobbler_profile
  • allcli_update_activationkeys
  • srv_maintenance_windows
  • srv_manage_channels_page
  • min_bootstrap_api
  • srv_power_management_api
  • srv_wait_for_reposync
  • srv_user_configuration_salt_states

@jordimassaguerpla
Copy link
Contributor Author

jordimassaguerpla commented Dec 3, 2024

This adds 14% more tests, compared to the ones that run on master with gh actions vs master with jenkins. We will be at 56% , aprox.

Signed-off-by: Jordi Massaguer Pla <[email protected]>
Signed-off-by: Jordi Massaguer Pla <[email protected]>
to be removed later
* Configure the server to use SCC mirror
* Review tests:
  * Review base channels for sle minions
  * Review activation keys
  * Sync channels
  * Enable tests that now pass, related to channels, and
    other tests that now pass
  * Fix: cobbler "get logs". Remote and local file can't
    have the same name, because containers share tmp volume
  * Review default channels for uyuni and sle (in constants.rb)
  * Fix buildhost

There are some things left for a new iteration:
  * i586 archs
  * SUSE Manager related channels in SCC mirror
  * Build profiles
  * Patches and CVEs in SCC mirror
  * Some tests that still fail

CI: remove mgrctl from server container, or the testsuite things
this is the server host

fixes SUSE/spacewalk#25220

Signed-off-by: Jordi Massaguer Pla <[email protected]>
Signed-off-by: Jordi Massaguer Pla <[email protected]>
Signed-off-by: Jordi Massaguer Pla <[email protected]>
Signed-off-by: Jordi Massaguer Pla <[email protected]>
Signed-off-by: Jordi Massaguer Pla <[email protected]>
Signed-off-by: Jordi Massaguer Pla <[email protected]>
@jordimassaguerpla
Copy link
Contributor Author

Scenario: Add openSUSE Leap 15.5 product, including Uyuni Client Tools fails from time to time. Mirroring the uyuni client tools repos will add stability. I have added this in https://github.com/SUSE/spacewalk/issues/25950

@jordimassaguerpla
Copy link
Contributor Author

Tests passed once. Triggering a second run to test stability.

@jordimassaguerpla
Copy link
Contributor Author

tests passed. Triggering again...

@jordimassaguerpla
Copy link
Contributor Author

jordimassaguerpla commented Dec 13, 2024

one failure:

Scenario:Add new sources and promote again

This scenario ran at: 2024-12-12 21:04:02 +0000

WhenI follow the left menu "Content Lifecycle > Projects"
AndI follow "clp_name"
ThenI should see a "Build (0)" text
WhenI click on "Attach/Detach Sources"
AndI uncheck "Vendors"
AndI enter "Fake-Base-Channel-SUSE-like" in the placeholder "Search a channel"
AndI add the "Fake-Base-Channel-SUSE-like" channel to sources
AndI click on "Save"
ThenI wait until I see "Fake-Base-Channel-SUSE-like" text

Text 'Fake-Base-Channel-SUSE-like' not found (ScriptError)
./features/step_definitions/navigation_steps.rb:40:in `/^I wait until I see "([^"]*)" text$/'
features/secondary/srv_content_lifecycle.feature:183:in `I wait until I see "Fake-Base-Channel-SUSE-like" text'

image

@jordimassaguerpla
Copy link
Contributor Author

triggering again....

@jordimassaguerpla
Copy link
Contributor Author

Now it passed...

@jordimassaguerpla
Copy link
Contributor Author

Now it passed

@jordimassaguerpla
Copy link
Contributor Author

it passed again

@jordimassaguerpla jordimassaguerpla mentioned this pull request Dec 13, 2024
12 tasks
@jordimassaguerpla
Copy link
Contributor Author

Scenario: Add openSUSE Leap 15.5 product, including Uyuni Client Tools fails from time to time. Mirroring the uyuni client tools repos will add stability. I have added this in SUSE/spacewalk#25950

The repos are defined here

https://github.com/uyuni-project/uyuni/blob/master/utils/spacewalk-common-channels.ini#L1238

@jordimassaguerpla
Copy link
Contributor Author

Scenario: Add openSUSE Leap 15.5 product, including Uyuni Client Tools fails from time to time. Mirroring the uyuni client tools repos will add stability. I have added this in SUSE/spacewalk#25950

The repos are defined here

https://github.com/uyuni-project/uyuni/blob/master/utils/spacewalk-common-channels.ini#L1238

I am not sure how to proceed here.

Alternatives:

  • use a different .ini . spacewalk-common-channels has the "-c" parameter to set a different config file
  • use sed to replace download.opensuse.org by server
  • put download.opensuse.org in /etc/hosts with the IP address of the server
  • set up a proxy, do that we download the packages from our server
  • had this channels synced when creating the containers, once per release (we will not fully test reposync ...)
  • ??

Signed-off-by: Jordi Massaguer Pla <[email protected]>
@jordimassaguerpla
Copy link
Contributor Author

jordimassaguerpla commented Dec 19, 2024

Scenario: Add openSUSE Leap 15.5 product, including Uyuni Client Tools fails from time to time. Mirroring the uyuni client tools repos will add stability. I have added this in SUSE/spacewalk#25950

The repos are defined here
https://github.com/uyuni-project/uyuni/blob/master/utils/spacewalk-common-channels.ini#L1238

I am not sure how to proceed here.

Alternatives:

* use a different .ini . spacewalk-common-channels has the "-c" parameter to set a different config file

* use sed to replace download.opensuse.org by server

* put download.opensuse.org in /etc/hosts with the IP address of the server

* set up a proxy, do that we download the packages from our server

* had this channels synced when creating the containers, once per release (we will not fully test reposync ...)

* ??

when running reposync for a sle channel, the url points to the local mirror:

server:/var/log/rhn/reposync # cat sle-module-server-applications15-sp4-pool-x86_64.log 
2024/12/19 11:07:27 -00:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'sle-module-server-applications15-sp4-pool-x86_64', '--type', 'yum', '--non-interactive']
2024/12/19 11:07:27 -00:00 Sync of channel started.
2024/12/19 11:07:28 -00:00 Repo URL: file:///mirror/SUSE/Products/SLE-Module-Server-Applications/15-SP4/x86_64/product/

however, when running reposync for an opensuse channel (that was added with spacewalk-common-channels), points to download.opensuse.org

server:/var/log/rhn/reposync # cat opensuse_leap15_5-x86_64.log 
2024/12/19 11:10:19 -00:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'opensuse_leap15_5-x86_64', '--type', 'yum', '--non-interactive']
2024/12/19 11:10:19 -00:00 Sync of channel started.
2024/12/19 11:35:52 -00:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'opensuse_leap15_5-x86_64', '--type', 'yum']
2024/12/19 11:35:52 -00:00 Sync of channel started.
2024/12/19 11:36:19 -00:00 Repo URL: http://download.opensuse.org/distribution/leap/15.5/repo/oss/
2024/12/19 11:36:19 -00:00     Packages in repo:             103189

We see the same behaviour in our internal testing with sumaform.

@mcalmer : Is this expected? Can we make reposync get the opensuse channels from /mirror ?

@mcalmer
Copy link
Contributor

mcalmer commented Dec 19, 2024

Is this expected? Can we make reposync get the opensuse channels from /mirror ?

yes, we do a URL re-write to a local mirror only for vendor channels which come from SCC.
We have a big list of everything in the DB and when you select a product we create the "repositories" in the DB with the re-written URL.
spacewalk-common-channels.ini is made for custom channels and write the URLs in the config file directly into the DB.

The easiest option: write your own spacewalk-common-channels.ini file and reference it with the --config option.

Signed-off-by: Jordi Massaguer Pla <[email protected]>
Signed-off-by: Jordi Massaguer Pla <[email protected]>
Signed-off-by: Jordi Massaguer Pla <[email protected]>
Signed-off-by: Jordi Massaguer Pla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants