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 for teardown failures #16211

Merged
merged 1 commit into from
Sep 4, 2024
Merged

Conversation

vsedmik
Copy link
Contributor

@vsedmik vsedmik commented Sep 4, 2024

Problem Statement

#15931 broke teardown of tests which use contenthosts registered through a Capsule because the registration target (where the host is registered to, Capsule in this case) was assigned to the host's self.satellite here, and in teardown we try to search and delete the host here, which fails since Capsule has no API

"error during teardown:\n'Capsule' object has no attribute 'api'"

Solution

As per @ogajduse++ proposal, provide the Satellite instance in host's self.satellite instead of the registration target (Capsule) so that it can be searched and destroyed at the Sat side.

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py -k test_host_registration_with_capsule_using_content_coherence

@vsedmik vsedmik added CherryPick PR needs CherryPick to previous branches 6.16.z Introduced in or relating directly to Satellite 6.16 labels Sep 4, 2024
@vsedmik vsedmik requested review from pondrejk and ogajduse September 4, 2024 11:30
@vsedmik vsedmik self-assigned this Sep 4, 2024
@vsedmik vsedmik requested a review from a team as a code owner September 4, 2024 11:30
@vsedmik
Copy link
Contributor Author

vsedmik commented Sep 4, 2024

trigger: test-robottelo
pytest: tests/foreman/cli/test_host.py -k test_host_registration_with_capsule_using_content_coherence

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 8465
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli/test_host.py -k test_host_registration_with_capsule_using_content_coherence --external-logging
Test Result : = 3 failed, 3 passed, 90 deselected, 459 warnings, 3 errors in 2809.30s (0:46:49) =

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Sep 4, 2024
@vsedmik
Copy link
Contributor Author

vsedmik commented Sep 4, 2024

3 tests using VMs passed, 3 using docker failed with different error.

@pondrejk
Copy link
Contributor

pondrejk commented Sep 4, 2024

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_async_ssh_provider[rhel9_fips]

@pondrejk
Copy link
Contributor

pondrejk commented Sep 4, 2024

trigger: test-robottelo
pytest: tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_async_ssh_provider[rhel9-ipv4]

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 8471
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_remoteexecution.py -k test_positive_run_job_on_host_registered_to_async_ssh_provider[rhel9-ipv4] --external-logging
Test Result : ========== 1 passed, 62 deselected, 79 warnings in 1722.73s (0:28:42) ==========

@Satellite-QE Satellite-QE added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR labels Sep 4, 2024
@ogajduse
Copy link
Member

ogajduse commented Sep 4, 2024

@vsedmik thank you for providing and testing the fix!

@ogajduse ogajduse merged commit 36f2ecc into SatelliteQE:master Sep 4, 2024
13 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 4, 2024
(cherry picked from commit 36f2ecc)
ogajduse pushed a commit that referenced this pull request Sep 4, 2024
Fix for teardown failures (#16211)

(cherry picked from commit 36f2ecc)

Co-authored-by: vsedmik <[email protected]>
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.16.z Introduced in or relating directly to Satellite 6.16 CherryPick PR needs CherryPick to previous branches 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.

4 participants