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

Remove use of install_katello_ca with register_contenthost #15395

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

Griffin-Sullivan
Copy link
Contributor

@Griffin-Sullivan Griffin-Sullivan commented Jun 11, 2024

Problem Statement

We will be removing the katello-ca-consumer RPM by default. Our automation should only use global registration anyway.

Solution

Swap uses of install_katello_ca and register_contenthost to the register method which uses global registration. Use default location and a basic activation key where needed.

Related Issues

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

@Griffin-Sullivan Griffin-Sullivan added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Jun 11, 2024
@Griffin-Sullivan
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7368
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation --external-logging
Test Result : ========== 11 failed, 3631 warnings, 14 errors in 18089.14s (5:01:29) ==========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Jun 12, 2024
@Griffin-Sullivan
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7390
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation --external-logging
Test Result : ===== 10 failed, 6 passed, 4010 warnings, 9 errors in 20144.39s (5:35:44) ======

@Griffin-Sullivan
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7596
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation --external-logging
Test Result : ===== 12 failed, 10 passed, 4224 warnings, 3 errors in 21100.35s (5:51:40) =====

@Griffin-Sullivan
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7731
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation --external-logging
Test Result : ===== 16 failed, 5 passed, 4219 warnings, 7 errors in 21217.24s (5:53:37) ======

@Griffin-Sullivan
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7752
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation --external-logging
Test Result : ===== 12 failed, 9 passed, 3896 warnings, 7 errors in 19272.31s (5:21:12) ======

@Griffin-Sullivan Griffin-Sullivan force-pushed the katello-ca branch 2 times, most recently from a0bb753 to 84fa3fb Compare July 16, 2024 13:59
@Griffin-Sullivan
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7758
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation --external-logging
Test Result : ===== 8 failed, 13 passed, 3795 warnings, 7 errors in 19332.91s (5:22:12) ======

@Griffin-Sullivan
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7761
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy --external-logging
Test Result : ============ 2 failed, 4 passed, 468 warnings in 3015.54s (0:50:15) ============

@Griffin-Sullivan Griffin-Sullivan force-pushed the katello-ca branch 2 times, most recently from 63d02d8 to 298a374 Compare July 17, 2024 15:25
@Griffin-Sullivan
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7765
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation --external-logging
Test Result : ================= 30 warnings, 25 errors in 295.41s (0:04:55) ==================

@Griffin-Sullivan
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7768
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation --external-logging
Test Result : ===== 6 failed, 11 passed, 2647 warnings, 11 errors in 14552.13s (4:02:32) =====

@Griffin-Sullivan Griffin-Sullivan marked this pull request as ready for review July 19, 2024 14:21
@Griffin-Sullivan Griffin-Sullivan requested review from a team as code owners July 19, 2024 14:21
@Griffin-Sullivan
Copy link
Contributor Author

Ok looking through the failures it seems these are not related to the changes and have been failing for the same reasons according to Ibutsu.

@pondrejk
Copy link
Contributor

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation

tests/foreman/cli/test_contentview.py Outdated Show resolved Hide resolved
robottelo/hosts.py Show resolved Hide resolved
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7911
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py::test_positive_install_package_via_rex tests/foreman/cli/test_http_proxy.py::test_insights_client_registration_with_http_proxy tests/foreman/ui/test_subscription.py::test_positive_view_vdc_subscription_products tests/foreman/destructive/test_host.py::TestHostCockpit::test_positive_cockpit tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_custom_loc tests/foreman/cli/test_contentview.py::TestContentView::test_positive_sub_host_with_restricted_user_perm_at_default_loc tests/foreman/destructive/test_capsule_loadbalancer.py::test_loadbalancer_install_package tests/foreman/endtoend/test_api_endtoend.py::TestEndToEnd::test_positive_end_to_end tests/foreman/endtoend/test_cli_endtoend.py::test_positive_cli_end_to_end tests/foreman/installer/test_installer.py::test_capsule_installation --external-logging
Test Result : ===== 4 failed, 18 passed, 3937 warnings, 3 errors in 20392.35s (5:39:52) ======

Copy link
Contributor

@pondrejk pondrejk left a comment

Choose a reason for hiding this comment

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

ack for the Endeavour's components

Copy link
Member

@ogajduse ogajduse left a comment

Choose a reason for hiding this comment

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

Next steps (future PR) I see are:

  • remove install_katello_ca method
  • add if reg_result.status == 0: self._satellite = target at the very end of the register and api_register methods

@jameerpathan111 jameerpathan111 requested a review from vsedmik August 7, 2024 22:46
@vsedmik vsedmik merged commit b016903 into SatelliteQE:master Aug 8, 2024
8 checks passed
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
…QE#15395)

* Remove use of install_katello_ca with register_contenthost

* Update tests/foreman/cli/test_contentview.py

Co-authored-by: vsedmik <[email protected]>

---------

Co-authored-by: Jameer Pathan <[email protected]>
Co-authored-by: vsedmik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No-CherryPick PR doesnt need CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR Stream Introduced in or relating directly to Satellite Stream/Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants