This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2087067 - Re-enabling puppet fails when it was disabled with -f option before
Summary: Re-enabling puppet fails when it was disabled with -f option before
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Puppet
Version: 6.11.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Sayan Das
QA Contact: Satellite QE Team
Zuzana Lena Ansorgova
URL:
Whiteboard:
: 2123439 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-17 08:55 UTC by Vladimír Sedmík
Modified: 2024-06-06 12:21 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
.Disabled Puppet with all data removed cannot be re-enabled If the Puppet plug-in was disabled with the `-f, --remove-all-data` argument and you attempt to enable it again, Satellite maintain fails.
Clone Of:
Environment:
Last Closed: 2024-06-06 12:21:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36942 0 Normal Ready For Testing Unable to enable back puppet plugin again after completely purging the puppet plugin and related stuff 2024-01-18 15:28:01 UTC
Red Hat Issue Tracker   SAT-18722 0 None Migrated None 2024-06-06 12:21:39 UTC
Red Hat Knowledge Base (Solution) 7046973 0 None None None 2023-11-28 12:17:59 UTC

Description Vladimír Sedmík 2022-05-17 08:55:52 UTC
Description of problem:
Re-enabling puppet fails when it was disabled with -f option before. When disabling without this option, re-enable works without any issues.


Version-Release number of selected component (if applicable):
6.11.0 snap 20


How reproducible:
always


Steps to Reproduce:

1. Have a fresh 6.11 Satellite

2. Enable puppet plugin
# satellite-installer --enable-foreman-plugin-puppet \
--enable-foreman-cli-puppet \
--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. Disable the puppet plugin with -f option
# foreman-maintain plugin purge-puppet -f

4. Try to enable puppet plugin again


Actual results:
...
2022-05-17 04:45:40 [NOTICE] [configure] 1000 configuration steps out of 2093 steps complete.
2022-05-17 04:45:47 [NOTICE] [configure] 1250 configuration steps out of 2097 steps complete.
2022-05-17 04:46:39 [ERROR ] [configure] '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
2022-05-17 04:46:39 [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: change from 'notrun' to ['0'] failed: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
2022-05-17 04:47:04 [NOTICE] [configure] 1500 configuration steps out of 2097 steps complete.
2022-05-17 04:47:08 [NOTICE] [configure] 1750 configuration steps out of 2901 steps complete.
...

#  /usr/sbin/foreman-rake db:migrate
== 20121018152459 CreateHostgroupClasses: migrating ===========================
-- rename_table(:hostgroups_puppetclasses, :hostgroup_classes)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedTable: ERROR:  relation "hostgroups_puppetclasses" does not exist
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `async_exec'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `block (2 levels) in execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
...


Expected results:
no errors

Comment 2 Brad Buckingham 2022-09-07 15:48:43 UTC
*** Bug 2123439 has been marked as a duplicate of this bug. ***

Comment 6 Zuzana Lena Ansorgova 2023-07-12 17:36:11 UTC
Added fully-reviewed RN.

Comment 36 Sayan Das 2023-11-23 18:36:29 UTC
Connecting Redmine issue:

Bug #36942: Unable to enable back puppet plugin again after completely purging the puppet plugin and related stuff - Foreman
https://projects.theforeman.org/issues/36942

Fixes #36942 - Improve the puppet plugin cleanup by sayan3296 · Pull Request #9918 · theforeman/foreman
https://github.com/theforeman/foreman/pull/9918

Comment 38 Leos Stejskal 2024-01-17 13:35:21 UTC
Hi, I suggest to remove the issue from 6.15.
There hasn't been done any work from the engineering side, and since we have only two snaps before the freeze there is little to no chance of fixing it in time.

If we want to fix it in 6.16, we should align it with the scope and make the prioritization accordingly.

Comment 42 Eric Helms 2024-06-06 12:21:41 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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