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"
Actions #1

Updated by ragbalak about 6 years ago

The same was tested in Fedora 28 OS and the same results were found


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

[root@fedora-28-pulp-2-17-nightly-ragbalak ~]# cat /etc/os-release
NAME=Fedora
VERSION="28 (Server Edition)"
ID=fedora
VERSION_ID=28
PLATFORM_ID="platform:f28"
PRETTY_NAME="Fedora 28 (Server Edition)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:28"
HOME_URL="https://fedoraproject.org/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=28
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=28
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Server Edition"
VARIANT_ID=server
Actions #2

Updated by CodeHeeler about 6 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 42
Actions #3

Updated by rchan about 6 years ago

  • Sprint changed from Sprint 42 to Sprint 43

Added by ttereshc about 6 years ago

Revision 7d5f18f9 | View on GitHub

Remove modular RPMs if a module is getting removed

closes #3985 https://pulp.plan.io/issues/3985

Actions #4

Updated by ttereshc about 6 years ago

  • Status changed from NEW to POST
  • Assignee set to ttereshc

Added by ttereshc about 6 years ago

Revision 0d9675b0 | View on GitHub

Rebuild content unit counts after unassociating units from a repo.

To avoid mistake sin counting removed units, especially in the cases when there are dependant units which are removed as well.

re #3985 https://pulp.plan.io/issues/3985

Actions #5

Updated by ttereshc about 6 years ago

  • Status changed from POST to MODIFIED
Actions #6

Updated by ttereshc about 6 years ago

  • Platform Release set to 2.17.1
Actions #7

Updated by ragbalak about 6 years ago

Thanks for the fix.

As a part of the fix are we recursively deleting the RPMs associated with the modulemd or non-recursively.
This part of the requirement is a little unclear on

https://github.com/PulpQE/pulp-smash/issues/1122

Added by ttereshc about 6 years ago

Revision 1c4aeab9 | View on GitHub

Remove modular RPMs if a module is getting removed

closes #3985 https://pulp.plan.io/issues/3985

(cherry picked from commit 7d5f18f909256df84c9273b5c682e009f2889380)

Added by ttereshc about 6 years ago

Revision a77c8fc2 | View on GitHub

Rebuild content unit counts after unassociating units from a repo.

To avoid mistake sin counting removed units, especially in the cases when there are dependant units which are removed as well.

re #3985 https://pulp.plan.io/issues/3985

(cherry picked from commit 0d9675b09e530a00e4704cf304783e2ab72d97b7)

Actions #9

Updated by ttereshc about 6 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions #10

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF