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

Fix katello-agent #12395

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Conversation

vsedmik
Copy link
Contributor

@vsedmik vsedmik commented Aug 29, 2023

In this PR I propose two changes:

  1. Since 6.14 the custom repos are disabled by default, we need to have them overridden to enabled.
  2. Katello-agent fails in old (RHEL6 and 7) containers (IIRC goferd failed to start since it was missing some system service), but it pass on a regular VMs. In order to get this component tested for 6.14 RC properly I propose to set it run on the standard VMs. The price is 1.5 - 2 h of extra run time, which I find acceptable since the katello-agent gets removed from 6.15 anyway and these tests would be deleted in 18 months.

PRT results:
no_containers:

  • 19 passed, 1 broker provider err (PRT#3689, 6:28:38)
  • all 20 passed (PRT#3790, 6:08:16)

with containers:

  • 10 (RHEL6/7) failed, 10 (RHEL8/9) passed (PRT#3700, ~4:33:00)

@vsedmik
Copy link
Contributor Author

vsedmik commented Aug 29, 2023

trigger: test-robottelo
pytest: tests/foreman/destructive/test_katello_agent.py -k test_positive_apply_errata[rhel8]

@vsedmik vsedmik added CherryPick PR needs CherryPick to previous branches 6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 labels Aug 29, 2023
@vsedmik
Copy link
Contributor Author

vsedmik commented Aug 29, 2023

trigger: test-robottelo
pytest: tests/foreman/destructive/test_katello_agent.py -k test_positive_apply_errata

@vsedmik
Copy link
Contributor Author

vsedmik commented Aug 29, 2023

trigger: test-robottelo
pytest: tests/foreman/destructive/test_katello_agent.py

@vsedmik
Copy link
Contributor Author

vsedmik commented Aug 29, 2023

Okay, so with pytest.mark.no_containers all (but one broker provider error) passed in 6:28:38.
Let's see how it goes with containers.

@vsedmik vsedmik force-pushed the no-container-agent branch from c311e21 to 010074c Compare August 29, 2023 19:00
@vsedmik
Copy link
Contributor Author

vsedmik commented Aug 29, 2023

trigger: test-robottelo
pytest: tests/foreman/destructive/test_katello_agent.py

@sambible
Copy link
Contributor

Seems reasonable to not overinvest effort into this feature that will only be run on older branches, as long as they pass consistently.

@vsedmik
Copy link
Contributor Author

vsedmik commented Sep 4, 2023

trigger: test-robottelo
pytest: tests/foreman/destructive/test_katello_agent.py

@vsedmik vsedmik removed 6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 labels Sep 5, 2023
@vsedmik
Copy link
Contributor Author

vsedmik commented Sep 5, 2023

rebased

@vsedmik vsedmik marked this pull request as ready for review September 5, 2023 05:30
@vsedmik vsedmik requested review from a team as code owners September 5, 2023 05:30
robottelo/hosts.py Outdated Show resolved Hide resolved
Comment on lines 2061 to 2068
# Override the repos to enabled if needed
if override:
rhel_contenthost.execute(r'subscription-manager repos --enable \*')

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just curious, I thought custom repos will be disabled in only AK itself, or Library would contain this disabled as well? and can't we change state of this repos either in product/LCE we're using instead of doing this on host?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Custom repos are disabled by default, regardless AK existence. If you register a host using this function, they are present/visible on both sides, but disabled. This enables them on both sides too, so it seems valid way to me. Unless you have some nicer way.

Copy link
Collaborator

Choose a reason for hiding this comment

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

what do you mean by both sides here? host and ?
Currently, register_host_custom_repo uses the old registration method, instead we should be using new Global registration method which will work with AK and we could easily override the repos for host in AK, but it feels out of scope of this PR :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both sides I mean - Host itself (in /etc/yum.repos.d) and Satellite (in host details).
For host registration rewrite - I think it would deserve a separate PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, definately, can you create an issue for this? so we don't miss this :)

@Gauravtalreja1 Gauravtalreja1 added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Sep 5, 2023
Copy link
Contributor

@damoore044 damoore044 left a comment

Choose a reason for hiding this comment

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

Ack looks good !

robottelo/hosts.py Outdated Show resolved Hide resolved
@vsedmik vsedmik force-pushed the no-container-agent branch 3 times, most recently from 10dbe86 to 9a11e9e Compare September 6, 2023 10:59
@vsedmik
Copy link
Contributor Author

vsedmik commented Sep 6, 2023

trigger: test-robottelo
pytest: tests/foreman/destructive/test_katello_agent.py

@Gauravtalreja1 Gauravtalreja1 added TestFailure Issues and PRs related to a test failing in automation Easy Fix :) Easiest Fix to review and quick merge request. labels Sep 6, 2023
@vsedmik
Copy link
Contributor Author

vsedmik commented Sep 6, 2023

In PRT#3833 19 tests passed, 1 failed in host registration with this errror

Host with name <hostname>.redhat.com is currently registered to a different org, please migrate host to vZSotvEEQAwX. (HTTP error code 422: Unprocessable Entity)

I guess that we hit the rare case when the same hostname was used for the second time in the same session against the same SAT. We could probably unregister the host on teardown.

EDIT: Rolling back the explicit unregister, this is actually done in contenthost teardown. The intermittent issue shall be resolved by 12466

@vsedmik
Copy link
Contributor Author

vsedmik commented Sep 6, 2023

trigger: test-robottelo
pytest: tests/foreman/destructive/test_katello_agent.py

@vsedmik
Copy link
Contributor Author

vsedmik commented Sep 7, 2023

In PRT#3847 18 passed, 2 failed with

broker.exceptions.BrokerError: Error during checkout from Broker(host_classes=****'host': <class 'robottelo.hosts.Satellite'>})

I think we are good to go @Gauravtalreja1

@Gauravtalreja1 Gauravtalreja1 enabled auto-merge (squash) September 7, 2023 06:02
@Gauravtalreja1 Gauravtalreja1 merged commit f85639f into SatelliteQE:master Sep 7, 2023
5 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 7, 2023
Let katello-agent run on a standard VM

(cherry picked from commit f85639f)
Gauravtalreja1 pushed a commit that referenced this pull request Sep 8, 2023
Fix katello-agent (#12395)

Let katello-agent run on a standard VM

(cherry picked from commit f85639f)

Co-authored-by: vsedmik <[email protected]>
vsedmik added a commit to vsedmik/robottelo that referenced this pull request Sep 8, 2023
Let katello-agent run on a standard VM
vsedmik added a commit to vsedmik/robottelo that referenced this pull request Sep 19, 2023
Let katello-agent run on a standard VM
ColeHiggins2 pushed a commit to ColeHiggins2/robottelo that referenced this pull request Oct 9, 2023
Let katello-agent run on a standard VM
damoore044 pushed a commit to damoore044/robottelo that referenced this pull request Oct 10, 2023
Let katello-agent run on a standard VM
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
Let katello-agent run on a standard VM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.14.z Introduced in or relating directly to Satellite 6.14 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches Easy Fix :) Easiest Fix to review and quick merge request. TestFailure Issues and PRs related to a test failing in automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants