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 #9573

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jordimassaguerpla
Copy link
Contributor

What does this PR change?

  • Add SCC mirror into the server container image
  • Update to latest server container version (2024.10)
  • Fix ubuntu testing container
  • Add scc user to 08 manager setup
  • Add hostname package needed for the tests

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed
  • DONE

Test coverage

  • No tests

  • DONE

Links

Issue(s): https://github.com/SUSE/spacewalk/issues/25220

  • 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/9573/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/9573/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. ⚠️

* Add SCC mirror into the server container image. Specifically
  into the mirror directory we have now the expected .json files,
  plus the repositories with its metadata.
* Update to latest server container version (2024.10)
* Fix ubuntu testing container: fix repo and update ca-certificates
* Add scc user to 08 manager setup
* Add packages/repositories needed for testing:
  * server: hostname
  * server: prometheus
  * server: fix systemsmanagement:Uyuni:Utils url
  * server: fix sle15 client tools
  * buildhost: git
  * buildhost: python3-kiwi
  * server: do not update openssh, or uyuni setup fails
* Create /var/lib/kiwi expected directory in buildhost

Signed-off-by: Jordi Massaguer Pla <[email protected]>
@jordimassaguerpla jordimassaguerpla force-pushed the ci_add_scc_mirror_container_2024_10 branch from d6efc1f to 18adf29 Compare December 13, 2024 15:12
@jordimassaguerpla
Copy link
Contributor Author

jordimassaguerpla commented Dec 13, 2024

@srbarrios This is ready for you to review. Merging this before #9490 won't break tests. See #9572 . After merging, we need to trigger manually the new build. Once we have the new containers, we can review #9490 .

@@ -3,8 +3,11 @@ set -xe

src_dir=$(cd $(dirname "$0")/../.. && pwd -P)

# mgrctl should not be installed in this container
sudo -i podman exec server bash -c "rm /usr/bin/mgrctl"
Copy link
Member

@srbarrios srbarrios Dec 16, 2024

Choose a reason for hiding this comment

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

Why exactly it affects us?
@cbosdo fyi too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't recall which test was, but there is a test that tries to run a command inside the server container with "mgrctl exec", because it thinks it is running in the host.

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks hacky! I'ld like to know where we are checking for mgrctl inside the server container...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIRC, was extracting log files. Instead of using scp, it was using "mgrctl exec". Note here there is no "host", the "host" and the "container" are the same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

checking here #9572

Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather hack has_mgrctl detection in the ruby code to ignore it if running inside a container than removing the file here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just trying to run core tests fail

/usr/bin/ruby.ruby3.3 -S bundle exec cucumber --profile default -f html -o results/output_20241216154624-github_validation_core.html -f json -o results/output_20241216154624-github_validation_core.json -f junit -o results_junit -f pretty -r features --fail-fast features/github_validation/core/first_settings.feature features/core/srv_user_preferences.feature features/reposync/srv_create_fake_channels.feature features/reposync/srv_create_fake_repositories.feature features/reposync/srv_sync_fake_channels.feature features/reposync/srv_create_activationkey.feature features/core/srv_osimage.feature features/core/srv_docker.feature
Proxy IP address or domain name variable empty
PXE boot MAC address variable empty
KVM server minion IP address or domain name variable empty
FAIL: mgrctl exec -i 'rm -f /etc/motd && touch /etc/motd' returned status code = 1.
Output:
 (ScriptError)
/testsuite/features/support/remote_node.rb:119:in `run_local'
/testsuite/features/support/remote_node.rb:103:in `run'
/testsuite/features/support/remote_node.rb:40:in `initialize'
/testsuite/features/support/remote_nodes_env.rb:37:in `new'
/testsuite/features/support/remote_nodes_env.rb:37:in `get_target'
/testsuite/features/support/commonlib.rb:630:in `new_api_client'
/testsuite/features/support/env.rb:122:in `<top (required)>'
/usr/lib64/ruby/3.3.0/bundled_gems.rb:69:in `require'
/usr/lib64/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'
/usr/lib64/ruby/gems/3.3.0/gems/cucumber-9.2.0/lib/cucumber/glue/registry_and_more.rb:124:in `load_code_file'
/usr/lib64/ruby/gems/3.3.0/gems/cucumber-9.2.0/lib/cucumber/runtime/support_code.rb:145:in `load_file'
/usr/lib64/ruby/gems/3.3.0/gems/cucumber-9.2.0/lib/cucumber/runtime/support_code.rb:82:in `block in load_files!'
/usr/lib64/ruby/gems/3.3.0/gems/cucumber-9.2.0/lib/cucumber/runtime/support_code.rb:81:in `each'
/usr/lib64/ruby/gems/3.3.0/gems/cucumber-9.2.0/lib/cucumber/runtime/support_code.rb:81:in `load_files!'
/usr/lib64/ruby/gems/3.3.0/gems/cucumber-9.2.0/lib/cucumber/runtime.rb:274:in `load_step_definitions'
/usr/lib64/ruby/gems/3.3.0/gems/cucumber-9.2.0/lib/cucumber/runtime.rb:74:in `run!'
/usr/lib64/ruby/gems/3.3.0/gems/cucumber-9.2.0/lib/cucumber/cli/main.rb:29:in `execute!'
/usr/lib64/ruby/gems/3.3.0/gems/cucumber-9.2.0/bin/cucumber:9:in `<top (required)>'
/usr/bin/cucumber:25:in `load'
/usr/bin/cucumber:25:in `<main>'
Using Ruby version: 3.3.6
Capybara APP Host: https://server:8888
Initializing a remote node for 'server'.

Can't initialize the server node

Copy link
Member

Choose a reason for hiding this comment

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

I see, ok, well, in theory Marina will fix that issue about having the mgrctl inside the container and that problem should gone.
But I will see if we can do something around how we detect where we are.

Out-of-scope:
At some point, long term, I envision that we will have environments that will not have any kind of mgr-tools packages, going closer to a proper clould friendly product, so, it will be good to don't rely that much on that mgrctl to identify where we are.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

next container release won't have the mgrctl package ... we could wait for that release...

srbarrios
srbarrios previously approved these changes Dec 16, 2024
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.

3 participants