Project

Profile

Help

Issue #3985

closed

Removing modules in Pulp2.17 rpm repo doesn't remove corresponding RPMs

Added by ragbalak about 6 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.17.1
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 43
Quarter:

Description

After installing Pulp2.17

Create a new Repo with the following feed URL :

pulp-admin rpm repo create --repo-id rpm_module --feed https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-modules/

Sync the Repo and checked whether it has all the module metadata ( 7 modulemd and 3 module,d_defaults)

pulp-admin rpm repo sync run --repo-id rpm_module 

The RPM repo list shows as

Id:                  rpm_module
Display Name:        None
Description:         None
Content Unit Counts: 
  Erratum:           6
  Modulemd:          7
  Modulemd Defaults: 3
  Package Category:  1
  Package Group:     2
  Package Langpacks: 1
  Rpm:               35

After creating , I used the pulp-smash utils to call the 'actions/unassociate method'

from pulp_smash import api,config
config = config.get_config()
client = api.Client(config, api.json_handler)
criteria = {'filters': {}, 'type_ids': ['modulemd']}
client.post('/pulp/api/v2/repositories/rpm_module/actions/unassociate/',{'criteria':criteria})

All the modules got deleted as expected, but the number of rpms remained the same

Id:                  rpm_module
Display Name:        None
Description:         None
Content Unit Counts:
  Erratum:           6
  Modulemd:          0
  Modulemd Defaults: 3
  Package Category:  1
  Package Group:     2
  Package Langpacks: 1
  Rpm:               35

The details of the pulp installation are as below

[root@rhel-7-pulp-2-17-nightly-ragbalak ~]# rpm -qa|grep pulp|sort
pulp-admin-client-2.17.0-1.git.88.ab3562d.el7.noarch
pulp-deb-admin-extensions-1.7.1-1.el7.noarch
pulp-deb-plugins-1.7.1-1.el7.noarch
pulp-docker-admin-extensions-3.2.0-1.git.88.ab3562d.el7.noarch
pulp-docker-plugins-3.2.0-1.git.88.ab3562d.el7.noarch
pulp-ostree-admin-extensions-1.3.0-1.el7.noarch
pulp-ostree-plugins-1.3.0-1.el7.noarch
pulp-puppet-admin-extensions-2.17.0-1.git.88.ab3562d.el7.noarch
pulp-puppet-plugins-2.17.0-1.git.88.ab3562d.el7.noarch
pulp-puppet-tools-2.17.0-1.git.88.ab3562d.el7.noarch
pulp-python-admin-extensions-2.0.3-1.el7.noarch
pulp-python-plugins-2.0.3-1.el7.noarch
pulp-rpm-admin-extensions-2.17.0-1.git.88.ab3562d.el7.noarch
pulp-rpm-plugins-2.17.0-1.git.88.ab3562d.el7.noarch
pulp-selinux-2.17.0-1.git.88.ab3562d.el7.noarch
pulp-server-2.17.0-1.git.88.ab3562d.el7.noarch
python-isodate-0.5.0-4.pulp.el7.noarch
python-pulp-bindings-2.17.0-1.git.88.ab3562d.el7.noarch
python-pulp-client-lib-2.17.0-1.git.88.ab3562d.el7.noarch
python-pulp-common-2.17.0-1.git.88.ab3562d.el7.noarch
python-pulp-deb-common-1.7.1-1.el7.noarch
python-pulp-docker-common-3.2.0-1.git.88.ab3562d.el7.noarch
python-pulp-oid_validation-2.17.0-1.git.88.ab3562d.el7.noarch
python-pulp-ostree-common-1.3.0-1.el7.noarch
python-pulp-puppet-common-2.17.0-1.git.88.ab3562d.el7.noarch
python-pulp-python-common-2.0.3-1.el7.noarch
python-pulp-repoauth-2.17.0-1.git.88.ab3562d.el7.noarch
python-pulp-rpm-common-2.17.0-1.git.88.ab3562d.el7.noarch
python-pulp-streamer-2.17.0-1.git.88.ab3562d.el7.noarch

The environment in which this was tested is

[root@rhel-7-pulp-2-17-nightly-ragbalak ~]# cat /etc/os-release 
NAME="Red Hat Enterprise Linux Server"
VERSION="7.5 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.5"
PRETTY_NAME="Employee SKU"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.5:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.5
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.5"

Also available in: Atom PDF