Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2033336

Summary: Add 'service restart' step in purge-puppet command
Product: Red Hat Satellite Reporter: Vladimír Sedmík <vsedmik>
Component: PuppetAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: apatel, aupadhye, egolov, kgaikwad, oezr, pcreech
Target Milestone: 6.11.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-1.0.12 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-05 14:31:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1809769    

Description Vladimír Sedmík 2021-12-16 14:51:22 UTC
Description of problem:
After disabling the puppet plugin via `foreman-maintain plugin purge-puppet`, all /foreman_puppet/api enpoints remain active as well as related menu items in the UI (leading to the 'Oops' page). We need to restart the system to get into the desired state.


Version-Release number of selected component (if applicable):
7.0.0 snap 2


How reproducible:
always


Steps to Reproduce:
1. Have a SAT with enabled puppet plugin
2. Run `foreman-maintain plugin purge-puppet`
   (with this patch https://github.com/theforeman/foreman_puppet/pull/240 it succeeds)
3. Check the UI > Configure or the api and apidoc


Actual results:
Puppet related items are still present.


Expected results:
They should be missing.


Additional info:
System restart removes the items from API and UI. Please add a step to restart services in the `purge-puppet` command.

Comment 1 Amit Upadhye 2021-12-20 10:49:26 UTC
Created redmine issue https://projects.theforeman.org/issues/34181 from this bug

Comment 2 aabramov 2022-02-02 17:11:34 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34181 has been resolved.

Comment 3 Vladimír Sedmík 2022-02-15 06:50:34 UTC
Tested on snap9 - the fix works well for UI and API, however, in the apidoc the puppet references still persist.

Decreasing the severity and switching to Puppet component for further investigation.

Ondrej, could you take a look please?

Comment 4 Ondřej Ezr 2022-02-15 08:11:07 UTC
I believe this is unrelated, as this issue is happening all around the codebase, but manifests itself here quite heavily.

Amit do you think it make sense to add apipie cache refresh step until we fix the automatic cache refresh in the installer?

Comment 5 Bryan Kearney 2022-02-17 16:05:39 UTC
Upstream bug assigned to aupadhye

Comment 8 Ondřej Ezr 2022-05-14 10:58:47 UTC
The core issue was resolved in this BZ and the culprit of the failedQA had been most likely fixed in https://bugzilla.redhat.com/show_bug.cgi?id=2039696

I think this should be resolved, thus I'm movig it to ON_QA again to verify.

Comment 9 Vladimír Sedmík 2022-05-18 08:05:47 UTC
I'm affraid the apidoc issue is still reproducible in snap 20.

Comment 10 Amit Upadhye 2022-06-01 12:37:43 UTC
Removing the needinfo as 1.0.11 version regenerates the api docs.

Comment 11 Vladimír Sedmík 2022-06-06 14:08:01 UTC
Verified in 6.11.0 snap 23 - the apidoc issue was resolved.

Comment 12 Vladimír Sedmík 2022-06-06 16:18:37 UTC
It seems the apipie cache refresh is run on the Capsule too, which causes this issue:

[root@capsule ~]# satellite-maintain plugin purge-puppet
...
--------------------------------------------------------------------------------
Regenerate Apipie cache:                                              [FAIL]
Failed executing FOREMAN_APIPIE_LANGS=en foreman-rake apipie:cache, exit status 127:
 sh: foreman-rake: command not found
--------------------------------------------------------------------------------
Scenario [Remove Puppet feature] failed.


It should be run on the Satellite only.

Comment 13 Vladimír Sedmík 2022-06-14 14:22:52 UTC
Verified in 6.11.0 snap 25 - the apidoc issue was resolved AND purge works well on both, satellite and capsule.

Comment 16 errata-xmlrpc 2022-07-05 14:31:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5498