Red Hat Capsule package count does not match with the package count of content views added to the Capsule server
Environment
- Red Hat Satellite 6
Issue
- Red Hat Capsule package count
Red Hat Satellite Web UI -> Infrastructure -> Capsules -> select external Capsule -> Contentand the package count of content views added to the Capsule does not match.
Root Cause
-
This is an expected behavior. The package count from content view is obtained after querying the Katello database. The count of packages in Capsule is obtained using a query to pulp API.
-
Katello does not count a package and/or errata twice if it belongs to two repositories inside the same content view.
-
Querying pulp API (the way through which the information about the number of packages in the Capsules is obtained), the pulp API will count the package twice if the same package is present in two repositories within the same content view.
For more KB articles/solutions related to Red Hat Satellite 6.x Content View Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Content View Issues
Diagnostic Steps
-
Deploy pulp-admin on Red Hat Satellite using solution.
-
Generate the list of enabled repositories on Satellite using below command:
# pulp-admin repo list -
Identify the repositories included in content view, the repository id format looks like:
1-<content-view-name>-<content-view-version>_0-<organization-name>-<repository-name/identifier> -
Get the list of RPM's/Errata from repositories included in content view using below command:
# pulp-admin rpm repo content rpm --repo-id <repository-id> --fields filename &> repositories1-rpms.txt # pulp-admin rpm repo content errata --repo-id <repository-d> --fields id &> repositories1-errata.txt -
The list of RPM's/Errata present in more than one repository can be obtained using below command:
# cat *rpms.txt | grep Filename | sort |uniq -c | grep -v ' 1' # cat *errata.txt |grep -v ^$ | cut -c 4-35 | tr -d ' ' |sort |uniq -c|grep -v ' 1'
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.