Bug 2033336 - Add 'service restart' step in purge-puppet command
Summary: Add 'service restart' step in purge-puppet command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Puppet
Version: 6.11.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: 6.11.0
Assignee: Amit Upadhye
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks: 1809769
TreeView+ depends on / blocked
 
Reported: 2021-12-16 14:51 UTC by Vladimír Sedmík
Modified: 2022-07-05 14:31 UTC (History)
6 users (show)

Fixed In Version: rubygem-foreman_maintain-1.0.12
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:31:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34181 0 Normal Closed Add 'service restart' step in purge-puppet command 2022-06-08 13:31:41 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:31:47 UTC

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


Note You need to log in before you can comment on or make changes to this bug.