Bug 1150434

Summary: Multiple Centos in Operation System
Product: Red Hat Satellite Reporter: Jakub Bittner <j.bittner>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.4CC: bkearney, chrobert, cwelton, jaudet, jmontleo, milan.zelenka, mmccune, riehecky, toracat
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: http://projects.theforeman.org/issues/7621
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1212645 (view as bug list) Environment:
Last Closed: 2015-02-20 18:32:07 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:    
Bug Blocks: 1212645    
Attachments:
Description Flags
Operating system screenshot none

Description Jakub Bittner 2014-10-08 10:04:48 UTC
Created attachment 944923 [details]
Operating system screenshot

Description of problem:

After add Centos 7 to products (and syncing repos) we have a lot of Centos 7.0 in Operating systems view. 


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

pulp-server-2.4.1-0.7.beta.el6sat.noarch
pulp-katello-0.3-4.el6sat.noarch
python-pulp-client-lib-2.4.1-0.7.beta.el6sat.noarch
pulp-nodes-common-2.4.1-0.7.beta.el6sat.noarch
pulp-nodes-parent-2.4.1-0.7.beta.el6sat.noarch
pulp-selinux-2.4.1-0.7.beta.el6sat.noarch
createrepo-0.9.9-21.2.pulp.el6sat.noarch
pulp-rpm-plugins-2.4.1-0.7.beta.el6sat.noarch
python-pulp-rpm-common-2.4.1-0.7.beta.el6sat.noarch
pulp-puppet-plugins-2.4.1-0.7.beta.el6sat.noarch
python-isodate-0.5.0-1.pulp.el6sat.noarch
python-pulp-bindings-2.4.1-0.7.beta.el6sat.noarch
python-pulp-puppet-common-2.4.1-0.7.beta.el6sat.noarch
python-kombu-3.0.15-12.pulp.el6sat.noarch
pulp-puppet-tools-2.4.1-0.7.beta.el6sat.noarch
rubygem-smart_proxy_pulp-1.0.1-1.1.el6sat.noarch
python-pulp-common-2.4.1-0.7.beta.el6sat.noarch
pulp-admin-client-2.4.1-0.7.beta.el6sat.noarch
rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch
katello-1.5.0-30.el6sat.noarch
pulp-katello-0.3-4.el6sat.noarch
katello-certs-tools-1.5.6-1.el6sat.noarch
katello-default-ca-1.0-1.noarch
katello-installer-0.0.64-1.el6sat.noarch
katello-server-ca-1.0-1.noarch
ruby193-rubygem-katello-1.5.0-91.el6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.5-2.el6sat.noarch
foreman-ovirt-1.6.0.46-1.el6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.9-1.1.el6sat.noarch
foreman-selinux-1.6.0.14-1.el6sat.noarch
foreman-proxy-1.6.0.30-1.el6sat.noarch
foreman-vmware-1.6.0.46-1.el6sat.noarch
foreman-postgresql-1.6.0.46-1.el6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.0.4-1.el6sat.noarch
rubygem-hammer_cli_foreman-0.1.1-16.el6sat.noarch
satp1.nbu.cz-foreman-proxy-1.0-1.noarch
foreman-1.6.0.46-1.el6sat.noarch
foreman-gce-1.6.0.46-1.el6sat.noarch
foreman-compute-1.6.0.46-1.el6sat.noarch
ruby193-rubygem-foreman_discovery-1.3.0-2.el6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch
satp1.nbu.cz-foreman-client-1.0-1.noarch
ruby193-rubygem-foreman_bootdisk-2.0.6-1.1.el6sat.noarch
foreman-libvirt-1.6.0.46-1.el6sat.noarch



How reproducible:

Steps below


Steps to Reproduce:
1. Create Centos product in Product view.
2. Use repo discovery against http://ftp.cvut.cz/centos/7
3. Add os and updates repos
4. Sync them
5. Look in Hosts -> Operating Systems

Actual results:

A lot of Centos 7.0 systems

Expected results:

Only one Centos 7.0 system


Additional info:
I added screenshot.

Comment 1 RHEL Program Management 2014-10-08 10:23:21 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Jakub Bittner 2014-10-08 12:53:13 UTC
We fond that after every sync the Centos 7 operation system is being added to Operating System (3 times). So after 2 sync of Centos Product, you will have at least 9 Centos 7 operation systems

Comment 4 Jakub Bittner 2014-10-09 13:12:52 UTC
I can confirm this with Fedora 20 too.

Comment 5 Milan Zelenka 2014-10-16 09:08:03 UTC
I can confirm the same behaviour. Every sync of each repository (CentOS / Fedora) will add new item into "Operating system" tab...

Satellite 6.0.4

I will try it in latest Katello (2.0.0)...

Comment 6 Milan Zelenka 2014-10-19 12:35:43 UTC
It looks like Katello bug #7621 here: http://projects.theforeman.org/issues/7621

Comment 7 Mike McCune 2015-01-27 18:28:25 UTC
Reproduced this as well in our environment.  Will investigate a fix.

Comment 9 Justin Sherrill 2015-01-27 23:50:29 UTC
Connecting redmine issue http://projects.theforeman.org/issues/7621 from this bug

Comment 10 Mike McCune 2015-01-28 00:27:58 UTC
You can clean out the duplicate CentOS operating systems via a hammer command combination.  This will delete all but the 1st ID found in the database:

# hammer --output csv os list | tail -n +2 | grep "CentOS 7" | sort | tail -n +2 | awk -F "," '{print $1}' | xargs -n 1 hammer os delete --id 

You can change the grep "CentOS 7" to whatever dupe OS listings are showing up

An upcoming release will include the patch here:

https://github.com/Katello/katello/pull/4686.patch

which will stop the duplicates from showing up.

Comment 11 Bryan Kearney 2015-01-28 01:04:45 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7621 has been closed
-------------
Justin Sherrill
Applied in changeset commit:katello|7bf74589a76ac5d8295a0aeb2032e4c7fb5fe407.

Comment 17 errata-xmlrpc 2015-02-20 18:32:07 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-2015:0247