Bug 1351103

Summary: 'NameError' while syncing imported rhel repo in importing satellite
Product: Red Hat Satellite Reporter: Jitendra Yejare <jyejare>
Component: Content ManagementAssignee: Chris Duryee <cduryee>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, cduryee, jcallaha, zhunting
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.0.0.69-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-16 07:11:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jitendra Yejare 2016-06-29 09:21:49 UTC
Description of problem:
The Failure in /var/log/foreman/production.log is observed while syncing imported rhel repo in importing satellite. The UI shows success in sync but Failure in logs as follow:

2016-06-29 04:54:16 [app] [I] Started POST "/katello/sync_management/sync" for 10.65.223.227 at 2016-06-29 04:54:16 -0400
2016-06-29 04:54:16 [app] [I] Processing by Katello::SyncManagementController#sync as JS
2016-06-29 04:54:16 [app] [I]   Parameters: {"utf8"=>"✓", "sync_status_url"=>"", "repoids"=>["1"], "commit"=>"Synchronize Now"}
2016-06-29 04:54:16 [app] [I] Completed 500 Internal Server Error in 33ms
2016-06-29 04:54:16 [app] [F] 
 | NameError (undefined local variable or method `notify' for #<Katello::SyncManagementController:0x0000000f612628>):
 |   katello (3.0.0.51) app/controllers/katello/sync_management_controller.rb:68:in `block in sync_repos'
 |   katello (3.0.0.51) app/controllers/katello/sync_management_controller.rb:63:in `sync_repos'
 |   katello (3.0.0.51) app/controllers/katello/sync_management_controller.rb:33:in `sync'
 |   app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 |   lib/middleware/catch_json_parse_errors.rb:9:in `call'
 | 
 | 


Version-Release number of selected component (if applicable):
Satellite 6.2 GA Snap 17

How reproducible:


Steps to Reproduce:
1. From exporting satelliteExport CV containing custom and rhel repo both.
2. In importing satellite, Import the rhel repo exported above.
3. Sync the repo imported above and observe the production logs.

Actual results:
The UI shows sync success but failure with 'NameError' in logs are observed as mentioned in description.

Expected results:
Sync success of imported repo from UI and no failures in logs.

Additional info:

Comment 5 Chris Duryee 2016-07-05 15:02:59 UTC
This can happen with any repo, not just ISS.

One way to repro:

* create a product with a yum repo
* kick off a repo sync via hammer (may want to add --async if you're in a dev environment)
* go to the sync status page, select the repo being synced and hit "synchronize now"

result: button appears to not work, and the stack trace in #0 is logged.

Once the sync is complete, the button works as expected again.

Comment 6 Chris Duryee 2016-07-05 16:26:35 UTC
addendum to #5: you will need to load the sync status page *before* you kick off the sync.

For example:

* create product with yum repo
* go to sync status page in browser
* kick off sync via hammer
* while sync runs, attempt to kick off sync via sync status page

actual result: stack trace in log, and "synchronize now" button appears to not do anything

expected result: no stack trace

note: if you refresh the page after the sync is started via hammer, the page will display the correct info. This bug is specific to viewing the sync status page, then having the sync info change after the page is loaded but before the button is pressed.

Comment 7 Bryan Kearney 2016-07-05 22:15:22 UTC
Upstream bug component is Content Management

Comment 8 Bryan Kearney 2016-07-07 16:15:00 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15583 has been closed

Comment 9 jcallaha 2016-08-04 17:28:15 UTC
Verified in Satellite 6.2.1

Kicked off sync through hammer, then in UI immediately after. The UI behaved as if the sync was just kicked off when clicking the button. No error seen in the log.

Comment 11 errata-xmlrpc 2016-08-16 07:11:29 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/RHBA-2016:1615