Bug 1502505 - Unable to publish puppet module after Upgrade
Summary: Unable to publish puppet module after Upgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Sanket Jagtap
URL:
Whiteboard:
: 1506591 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-16 07:06 UTC by Sanket Jagtap
Modified: 2019-09-26 17:29 UTC (History)
12 users (show)

Fixed In Version: rubygem-katello-3.4.5.27
Doc Type: Known Issue
Doc Text:
Publishing a Content View using Puppet modules can fail, returning an error if the default location has been updated. On a fresh Satellite install, the database value for "Default Location Puppet Content" is empty, while the Hammer CLI represents it as "Default Location". To resolve this, update the "Default Location Puppet Content" at: Administer > settings > content > "Default Location Puppet Content" to "Default Location". If this occurs during the 6.3 Beta and blocks your completion or evaluation of the Beta please contact Satellite Engineering via the beta email list for assistance.
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Ui error (42.79 KB, image/png)
2017-10-16 07:06 UTC, Sanket Jagtap
no flags Details
Publish/Promote (62.80 KB, image/png)
2017-11-22 13:37 UTC, Sanket Jagtap
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21363 0 Normal Closed Renaming location does not rename associated Settings 2020-12-01 10:45:10 UTC

Description Sanket Jagtap 2017-10-16 07:06:22 UTC
Created attachment 1339040 [details]
Ui error

Description of problem:
Box was upgraded from 6.2.11 to 6.3.0 snap20

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

How reproducible:
Always

Steps to Reproduce:
1. Add a puppet repo, Sync the repo 
2. Try to publish a module in CV
3.

Actual results:
 undefined method `id' for nil:NilClass

Expected results:
It should be published successfully

Additional info:
same error via hammer

LANG=en_US.UTF-8  hammer -v -u admin -p changeme  content-view publish --id="32"
2017-10-13 21:26:33 - robottelo.ssh - INFO - <<< stderr
[ERROR 2017-10-13 21:26:29 API] 500 Internal Server Error
[ERROR 2017-10-13 21:26:29 Exception] undefined method `id' for nil:NilClass
Could not publish the content view:
  undefined method `id' for nil:NilClass
[ERROR 2017-10-13 21:26:29 Exception] 

RestClient::InternalServerError (500 Internal Server Error):
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:352:in `block in rest_client_call_block'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:493:in `process_result'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in `block in transmit'
    /opt/rh/rh-ruby23/root/usr/share/ruby/net/http.rb:853:in `start'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/resource.rb:67:in `post'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:324:in `call_client'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:240:in `http_call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:190:in `call_action'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:185:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/resource.rb:21:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0.1/lib/hammer_cli/apipie/command.rb:43:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.11.0.1/lib/hammer_cli_foreman/commands.rb:166:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_tasks-0.0.10.3/lib/hammer_cli_foreman_tasks/async_command.rb:14:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0.1/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0.1/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0.1/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.11.0.1/bin/hammer:147:in `<top (required)>

Comment 3 Brad Buckingham 2017-10-17 13:42:03 UTC
Created redmine issue http://projects.theforeman.org/issues/21363 from this bug

Comment 4 Justin Sherrill 2017-10-17 17:28:13 UTC
I'm not able to reproduce this.  Do you have the pre-upgraded database that i could try to reproduce with?

Comment 16 Justin Sherrill 2017-10-27 12:18:00 UTC
*** Bug 1506591 has been marked as a duplicate of this bug. ***

Comment 17 Satellite Program 2017-10-31 18:02:34 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21363 has been resolved.

Comment 18 Sanket Jagtap 2017-11-22 13:36:53 UTC
Build: Satellite 6.3.0 snap 25 


[root@qe-capsule-feature-rhel6 ~]# hammer location list
---|------------------|------------------|------------
ID | TITLE            | NAME             | DESCRIPTION
---|------------------|------------------|------------
2  | Default-Location | Default-Location |            
---|------------------|------------------|------------
[root@qe-capsule-feature-rhel6 ~]# hammer location update --id 2 --new-name apple
Location updated
[root@qe-capsule-feature-rhel6 ~]# hammer location list
---|-------|-------|------------
ID | TITLE | NAME  | DESCRIPTION
---|-------|-------|------------
2  | apple | apple |            
---|-------|-------|------------
[root@qe-capsule-feature-rhel6 ~]# hammer settings list | grep default_location_puppet_content 
default_location_puppet_content                        | apple                                                                            | Default Location where new Puppet content will be put upon Content View publish


[root@qe-capsule-feature-rhel6 ~]# hammer settings list | grep default_location_subscribed_hosts
default_location_subscribed_hosts                      | apple                                                                            | Default Location where new subscribed hosts will put upon registration

          
[root@qe-capsule-feature-rhel6 ~]# sudo -u postgres psql foreman -c  "select value from settings where name = 'default_location_puppet_content';"
could not change directory to "/root"
   value   
-----------
 --- apple+
 ...
(1 row)

Also, publish and promotion of puppet module in Content view was successful , even after the location rename.
PFA,

Comment 19 Sanket Jagtap 2017-11-22 13:37:33 UTC
Created attachment 1357511 [details]
Publish/Promote

Comment 20 Andrew Dahms 2018-02-16 03:30:36 UTC
Setting the 'requires_doc_text' flag to '-'.

Comment 21 Satellite Program 2018-02-21 16:54:17 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, 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-2018:0336


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