Bug 1295310

Summary: RHN mirror role not working with Red Hat Satellite 5
Product: Red Hat CloudForms Management Engine Reporter: Nikhil Gupta <ngupta>
Component: ApplianceAssignee: Nick Carboni <ncarboni>
Status: CLOSED WONTFIX QA Contact: Alex Newman <anewman>
Severity: high Docs Contact:
Priority: high    
Version: 5.4.0CC: abellott, jhardy, nachandr, ncarboni, ngupta, obarenbo, sshveta
Target Milestone: GA   
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: upgrade
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-15 20:39:36 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:
Attachments:
Description Flags
Red Hat Updates tab screenshot none

Description Nikhil Gupta 2016-01-04 07:46:16 UTC
Created attachment 1111370 [details]
Red Hat Updates tab screenshot

Description of problem:
RHN mirror role not working with Red Hat Satellite 5. 

Getting below error in evm.log file while syncing and downloading packages to create local repository:
~~~
[3600], Priority: [90], State: [dequeue], Deliver On: [], Data: [], Args: [], Dequeued in: [6.394621049] seconds
[----] I, [2016-01-04T01:13:43.529877 #9346:120fea8]  INFO -- : Q-task_id([resync_rhn_mirror]) MIQ(MiqQueue.deliver)    Message id: [45000000000294], Delivering...
[----] I, [2016-01-04T01:13:43.531003 #9346:120fea8]  INFO -- : Q-task_id([resync_rhn_mirror]) MiqServer#resync_rhn_mirror Resync RHN Mirror...
[----] I, [2016-01-04T01:13:43.538615 #9346:120fea8]  INFO -- : Q-task_id([resync_rhn_mirror]) MiqServer#configure_rhn_mirror_server Configuring RHN Mirror server...
[----] I, [2016-01-04T01:13:45.053787 #9346:120fea8]  INFO -- : Q-task_id([resync_rhn_mirror]) MiqServer#configure_rhn_mirror_server Configuring RHN Mirror server... Complete
[----] I, [2016-01-04T01:13:45.054009 #9346:120fea8]  INFO -- : Q-task_id([resync_rhn_mirror]) MiqServer#configure_rhn_mirror_server Queueing RHN Mirror client configuration
[----] I, [2016-01-04T01:13:45.066829 #9346:120fea8]  INFO -- : Q-task_id([resync_rhn_mirror]) MIQ(MiqQueue.put)        Message id: [45000000000295],  id: [], Zone: [default], Role: [], Server: [6de44668-b2a6-11e5-8889-00163e740026], Ident: [generic], Target id: [], Instance id: [45000000000001], Task id: [resync_rhn_mirror], Command: [MiqServer.configure_rhn_mirror_client], Timeout: [600], Priority: [100], State: [ready], Deliver On: [], Data: [], Args: []
[----] I, [2016-01-04T01:13:45.073096 #9346:120fea8]  INFO -- : Q-task_id([resync_rhn_mirror]) MIQ(MiqQueue.put)        Message id: [45000000000296],  id: [], Zone: [default], Role: [], Server: [ad53969a-b2a7-11e5-aba5-00163e74006e], Ident: [generic], Target id: [], Instance id: [45000000000002], Task id: [resync_rhn_mirror], Command: [MiqServer.configure_rhn_mirror_client], Timeout: [600], Priority: [100], State: [ready], Deliver On: [], Data: [], Args: []
[----] E, [2016-01-04T01:13:45.244521 #9346:120fea8] ERROR -- : Q-task_id([resync_rhn_mirror]) AwesomeSpawn: repotrack exit code: 1
[----] E, [2016-01-04T01:13:45.244750 #9346:120fea8] ERROR -- : Q-task_id([resync_rhn_mirror]) AwesomeSpawn: Nothing found to download matching packages specified

[----] E, [2016-01-04T01:13:45.245076 #9346:120fea8] ERROR -- : Q-task_id([resync_rhn_mirror]) MIQ(MiqQueue.deliver)    Message id: [45000000000294], Error: [repotrack exit code: 1]
[----] E, [2016-01-04T01:13:45.245261 #9346:120fea8] ERROR -- : Q-task_id([resync_rhn_mirror]) [AwesomeSpawn::CommandResultError]: repotrack exit code: 1  Method:[rescue in deliver]
[----] E, [2016-01-04T01:13:45.245394 #9346:120fea8] ERROR -- : Q-task_id([resync_rhn_mirror]) /opt/rh/cfme-gemset/gems/awesome_spawn-1.3.0/lib/awesome_spawn.rb:102:in `run!'
/opt/rh/cfme-gemset/gems/linux_admin-0.10.1/lib/linux_admin/common.rb:16:in `run!'
/opt/rh/cfme-gemset/gems/linux_admin-0.10.1/lib/linux_admin/yum.rb:37:in `download_packages'
/var/www/miq/vmdb/app/models/miq_server/rhn_mirror.rb:28:in `resync_rhn_mirror'
/var/www/miq/vmdb/app/models/miq_queue.rb:356:in `block in deliver'
/opt/rh/ruby200/root/usr/share/ruby/timeout.rb:66:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:352:in `deliver'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:107:in `deliver_queue_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:135:in `deliver_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:152:in `block in do_work'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `loop'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `do_work'
/var/www/miq/vmdb/lib/workers/worker_base.rb:323:in `block in do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:141:in `run'
/var/www/miq/vmdb/lib/workers/worker_base.rb:122:in `start'
/var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker'
/var/www/miq/vmdb/lib/workers/bin/worker.rb:3:in `<top (required)>'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `eval'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `<top (required)>'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `require'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
[----] I, [2016-01-04T01:13:45.245782 #9346:120fea8]  INFO -- : Q-task_id([resync_rhn_mirror]) MIQ(MiqQueue.delivered)  Message id: [45000000000294], State: [error], Delivered in [1.715861591] seconds
~~~

Tried repotrack on "cfme-appliance" package but it doesn't help:
~~~
# repotrack "cfme-appliance"
Nothing found to download matching packages specified
~~~

Version-Release number of selected component (if applicable):
cfme-appliance-5.4.0.5-1.el6cf.x86_64
Red Hat Satellite 5.6

How reproducible:
Always


Steps to Reproduce:
1. Setup CMFE appliance and add one more worker appliance in same region
2. Enable RHN mirror role in CFME master appliance and register it to Satellite 5. 
3. Update master appliance with option 'Apply CFME update'.
4. Once the update is finished, master appliance is showing CFME version as '5.4.4.2' and worker as '5.4.0.5' (Subscribed via Proxy).
5. 'yum repolist' command shows below output on worker appliance:
~~~
# yum repolist
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
https://6de44668-b2a6-11e5-8889-00163e740026/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
https://6de44668-b2a6-11e5-8889-00163e740026/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
repo id                                                                            repo name                                                                                       status
6de44668-b2a6-11e5-8889-00163e740026                                               CFME Server 6de44668-b2a6-11e5-8889-00163e740026                                                0
repolist: 0
~~~
 
Actual results:
The repository is not getting populated with the CFME updates.

Expected results:
The repository should get populated with the CFME updates.

Additional info:
RHN Mirror role works fine with subscription manager (RHSM).

Comment 9 Nick Carboni 2016-02-24 13:28:27 UTC
Has there been any update here or can I close this?

Comment 11 Nick Carboni 2016-03-15 15:34:52 UTC
Can this be closed?

Comment 12 Alex Newman 2016-03-15 20:17:39 UTC
I think so, as the solution has been verified.

Comment 13 Nick Carboni 2016-03-15 20:39:36 UTC
Closing this.

The issue here was that the external package (yum-utils) which provides the repotrack script we use to create the yum repo mirror does not support plugins and therefore cannot be used with Satellite 5 without modification.