Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1427618

Summary: Support verify content sync on bulk products
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: high    
Version: 6.2.7CC: bbuckingham, bkearney, ehelms, jcallaha, jsherril, mmccune, zhunting
Target Milestone: UnspecifiedKeywords: PrioBumpField, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.121-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1430879 (view as bug list) Environment:
Last Closed: 2017-05-01 14:00:43 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:
Bug Depends On: 1223023    
Bug Blocks: 1430879, 1530485, 1686971    
Attachments:
Description Flags
verification screenshot none

Description Justin Sherrill 2017-02-28 17:56:23 UTC
Description of problem:

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1223023

We need to support this across products multiple products, so that customers can more easily re-sync and verify lots of repos at once.

Version-Release number of selected component (if applicable):
6.2.8

Comment 1 Mike McCune 2017-02-28 17:59:24 UTC
Customers need a way to 'mass repair' their Satellite, offering bulk re-syncs in the UI is the way to achieve this

Comment 3 Justin Sherrill 2017-03-08 15:35:32 UTC
Created redmine issue http://projects.theforeman.org/issues/18844 from this bug

Comment 4 Justin Sherrill 2017-03-09 18:46:54 UTC
For 6.2.9, we are just going to provide a rake task for a full Satellite repair.  This will provide an option to verify all repositories.  In 6.3 we will provide full UI/API/CLI to handle bulk product sync with force and verify

Comment 6 jcallaha 2017-04-03 19:04:45 UTC
Failed QA in Satellite 6.2.9 Snap 2.

It looks like there is a missing dependency to get this solution going.

-bash-4.2# foreman-rake katello:validate_yum_content --trace
** Invoke katello:validate_yum_content (first_time)
rake aborted!
Don't know how to build task 'disable_dynflow'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task_manager.rb:62:in `[]'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:57:in `lookup_prerequisite'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:53:in `block in prerequisite_tasks'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:53:in `map'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:53:in `prerequisite_tasks'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/opt/rh/rh-ruby22/root/usr/bin/rake:33:in `<main>'
Tasks: TOP => katello:validate_yum_content

Comment 10 jcallaha 2017-04-17 20:11:27 UTC
Verified in Satellite 6.2.9 Snap 3

Initial run was on a system where all repositories had an on_demand download policy. As a result, no validation was performed.

-bash-4.2# time foreman-rake katello:validate_yum_content --trace
** Invoke katello:validate_yum_content (first_time)
** Invoke environment (first_time)
** Execute environment
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-0.1.42/app/models/concerns/satellite_packages.rb:4: warning: already initialized constant Katello::Ping::PACKAGES
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.123/app/models/katello/ping.rb:7: warning: previous definition of PACKAGES was here
** Invoke katello:disable_dynflow (first_time)
** Execute katello:disable_dynflow
** Invoke katello:check_ping (first_time)
** Execute katello:check_ping
** Execute katello:validate_yum_content

real	0m17.214s
user	0m14.603s
sys	0m1.182s


The second run had 3 repositories switched from on_demand to immediate.

-bash-4.2# time foreman-rake katello:validate_yum_content --trace
** Invoke katello:validate_yum_content (first_time)
** Invoke environment (first_time)
** Execute environment
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-0.1.42/app/models/concerns/satellite_packages.rb:4: warning: already initialized constant Katello::Ping::PACKAGES
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.123/app/models/katello/ping.rb:7: warning: previous definition of PACKAGES was here
** Invoke katello:disable_dynflow (first_time)
** Execute katello:disable_dynflow
** Invoke katello:check_ping (first_time)
** Execute katello:check_ping
** Execute katello:validate_yum_content
Starting sync and validate for all Repositories in Organization Default Organization using task 915c91c5-e55b-4597-ad94-de7d162cbd38 

real	0m21.966s
user	0m16.270s
sys	0m1.296s

As you can see, it kicked off a sync task for the 3 repositories. This completed successfully (see attached).

Comment 11 jcallaha 2017-04-17 20:12:07 UTC
Created attachment 1272171 [details]
verification screenshot

Comment 13 errata-xmlrpc 2017-05-01 14:00:43 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-2017:1191