Bug 2034552 - Puppet disable command fails on Capsule
Summary: Puppet disable command fails on Capsule
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.11.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.11.0
Assignee: Amit Upadhye
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-21 09:53 UTC by Vladimír Sedmík
Modified: 2022-07-05 14:31 UTC (History)
4 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34278 0 Normal Closed Puppet disable command fails on Capsule 2022-02-09 11:58:23 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:31:28 UTC

Description Vladimír Sedmík 2021-12-21 09:53:49 UTC
Description of problem:
On Capsule the command to disable puppet plugin fails with "undefined method `services' for nil:NilClass".


Version-Release number of selected component (if applicable):
7.0 snap 3


How reproducible:
always


Steps to Reproduce:
1. Have 7.0 Capsule registered to Satellite
2. Enable puppet:
# satellite-installer --foreman-proxy-puppet true \
--foreman-proxy-puppetca true \
--foreman-proxy-content-puppet true \
--enable-puppet \
--puppet-server true \
--puppet-server-foreman-ssl-ca /etc/pki/katello/puppet/puppet_client_ca.crt \
--puppet-server-foreman-ssl-cert /etc/pki/katello/puppet/puppet_client.crt \
--puppet-server-foreman-ssl-key /etc/pki/katello/puppet/puppet_client.key
3. Try to disable puppet:
# foreman-maintain plugin purge-puppet


Actual results:
Running Remove Puppet feature
================================================================================
Remove Puppet feature:                                                [FAIL]
undefined method `services' for nil:NilClass
--------------------------------------------------------------------------------
Scenario [Remove Puppet feature] failed.

The following steps ended up in failing state:

  [puppet-remove-puppet]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="puppet-remove-puppet"



Expected results:
Successful run

Comment 1 Amit Upadhye 2022-01-18 07:53:47 UTC
Created redmine issue https://projects.theforeman.org/issues/34278 from this bug

Comment 2 Bryan Kearney 2022-01-25 20:05:09 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34278 has been resolved.

Comment 3 Vladimír Sedmík 2022-02-08 14:07:08 UTC
The original error was resolved, which uncovered another issue when using `--remove-all-data` option:

# foreman-maintain plugin purge-puppet --remove-all-data
Running Remove Puppet feature
================================================================================
Remove Puppet feature:                                                [OK]
--------------------------------------------------------------------------------
Remove Puppet data:                                                   [FAIL]
Failed executing foreman-rake purge:puppet, exit status 127:
 sh: foreman-rake: command not found
--------------------------------------------------------------------------------
Scenario [Remove Puppet feature] failed.

The following steps ended up in failing state:

  [puppet-remove-puppet-data]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="puppet-remove-puppet-data"

Comment 4 Vladimír Sedmík 2022-02-14 10:57:59 UTC
Verified on 7.0 snap 9

Comment 8 errata-xmlrpc 2022-07-05 14:31:12 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.