Description of problem: Customer with Sat6.1 working fine, one cv just for puppet modules, after migration to 6.2, the cv appear without puppet modules, but if you check *inside cv* they are there. The workaround was 1. Access the cv 2. Remove the puppet modules 3. Readded the puppet modules 4. Publish 5. In my case, I just update the ccv version of this puppet cv 6. Publish the ccv 7. Promote the ccv Voilá, now host group or machine are able to see again puppet modules. Version-Release number of selected component (if applicable): 6.2.6 How reproducible: 100% Steps to Reproduce: 1. Install sat6.1.11 and prepare the environment 2. Add puppet module and test 3. Migrate to 6.2.x 4. Check the content view according above. Actual results: No puppet modules in the content view. Expected results: See the puppet modules in the content view Additional info:
Have you tried running: foreman-rake katello:upgrades:2.4:import_puppet_modules This is supposed to run as part of the upgrade but maybe it didn't run or complete for you?
Hi Justin Checking the upgrade file */var/log/foreman-installer/satellite.log* it's possible to the the puppet module import without issues or error --- [ INFO 2016-12-21 09:00:23 main] Upgrade Step: import_puppet_modules (this may take a while) ... [DEBUG 2016-12-21 09:00:49 main] Importing Puppet Modules --- After execute the command below, the original puppet cv still the same *without puppet modules* --- [root@satserver foreman-installer]# foreman-rake katello:upgrades:2.4:import_puppet_modules --trace ** Invoke katello:upgrades:2.4:import_puppet_modules (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute katello:upgrades:2.4:import_puppet_modules Importing Puppet Modules [root@satserver foreman-installer]# --- Please, let me know if you need any additional information. Best Regards -- Waldirio M Pinheiro | Senior Software Maintenance Engineer
Created redmine issue http://projects.theforeman.org/issues/17987 from this bug
Figured out this issue, it was introduced in 6.2.6. For now you can apply this patch: https://github.com/Katello/katello/pull/6530.patch to /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.*/ and then run: foreman-rake katello:upgrades:2.4:import_puppet_modules to resolve the issue.
Created attachment 1238813 [details] Patch that applies to 6.2.6
Hi Justin Great, after create apply the patch and execute the command below, was possible to see the 3 puppet modules in the original content view *cv_puppet* --- [root@satserver katello-3.0.0.90]# foreman-rake katello:upgrades:2.4:import_puppet_modules --trace ** Invoke katello:upgrades:2.4:import_puppet_modules (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute katello:upgrades:2.4:import_puppet_modules Importing Puppet Modules [root@satserver katello-3.0.0.90]# --- Amazing, thank you for your help. Best Regards -- Waldirio M Pinheiro | Senior Software Maintenance Engineer
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17987 has been resolved.
*** Bug 1397145 has been marked as a duplicate of this bug. ***
VERIFIED. @satellite-6.2.7-1.0.el7sat.noarch tfm-rubygem-katello-3.0.0.93-1.el7sat.noarch used manual reproducer: 1. @Sat6.1.11 create a CV and add puppet module(s) to it 2. Publish CV to have at least one CV version 3. Upgrade to Sat6.2.7 4. @Sat6.2.7 UI: Check that the published CV version contains puppet module(s) (don't check CV, it has the puppet modules even without fix, but check CV version as it doesn't have any puppet modules prior to the fix) >>> CV version that was upgraded still contains puppet modules # foreman-rake katello:upgrades:2.4:import_puppet_modules Importing Puppet Modules # foreman-rake katello:reimport Importing Katello::Erratum Importing Katello::PackageGroup Importing Katello::PuppetModule Importing Katello::Rpm Importing Katello::Subscription Importing Katello::Pool Importing Katello::DockerManifest Importing Katello::DockerTag Importing Katello::ContentViewPuppetEnvironment Importing Activation Key Subscriptions >>> And foreman rake tasks still work
Hi guys, One important point here is related to the file "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/*/lib/katello/tasks/reimport.rake", because by default on 6.2.6 there isn't this file, so when running for the firt time, you will see one warning like below --- [root@provisioning katello-3.0.0.90]# patch -p1 < /root/6530.patch patching file app/models/katello/content_view_puppet_environment.rb can't find file to patch at input line 32 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/lib/katello/tasks/reimport.rake b/lib/katello/tasks/reimport.rake |index bbbcb3c..e40b4e2 100644 |--- a/lib/katello/tasks/reimport.rake |+++ b/lib/katello/tasks/reimport.rake -------------------------- File to patch: --- Well, my advice on this case is, before apply the patch, just create the reimport.rake file, according steps below - cd /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.90/* - touch lib/katello/tasks/reimport.rake # patch -p1 < /root/6530.patch Then everything should works fine. Best Regards -- Waldirio M Pinheiro | Senior Software Maintenance Engineer
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, 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/RHBA-2017:0197