Project

Profile

Help

Story #949

closed

[RFE] Allow Pulp server to clean yum cache on consumer to take care of package rollback/update scenarios

Added by vijaykumar.jain@nomura.com over 9 years ago. Updated over 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
While deploying packages via admin cli, updating packages requires yum clean all(clearing yum cache) to get latest package from the repository.

Proposal to provide --force/--force-clean-cache to package deployment actions to ensure deployment runs only after yum cache is deleted (on similar lines of running a remote shell command with --reboot)

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

How reproducible:
install package and then try to update package.
package not updated.

Steps to Reproduce:
Create Repo
pulp-admin -u admin -p admin rpm repo create --repo-id testrollback
Successfully created repository [testrollback]

package contents
tree package
package
└── v2.5.1.txt

Create package
fpm -s dir -t rpm -n package -v 2.5.1 --prefix /local/0/pulptest package

Upload/Publish package
pulp-admin -u admin -p admin rpm repo uploads rpm --file ./package-2.5.1-1.x86_64.rpm --repo-id testrollback
pulp-admin -u admin -p admin rpm repo publish run --repo-id testrollback

Bind Repo to consumer
pulp-admin -u admin -p admin rpm consumer bind --repo-id testrollback --consumer-id server.example.com

Install package
pulp-admin -u admin -p admin rpm consumer package install run --consumer-id=server.example.com -n package

Install task created with id [ 90b179a2-f629-4d3f-a7a2-25ad7ccc9228 ]

This command may be exited via ctrl+c without affecting the request.

Refresh Repository Metadata [ OK ]
Downloading Packages [ OK ]
Check Package Signatures [ OK ]
Running Test Transaction [ OK ]
Running Transaction [ OK ]

Install Succeeded

--------------------------------------------------------------------
Installed
--------------------------------------------------------------------

Name: package
Version: 2.5.1
Arch: x86_64
Repoid: testrollback

Verify package package-2.5.1-1.x86_64 installed
rpm -qa | grep package-2.5
package-2.5.1-1.x86_64

create new package
tree package
package
├── v2.5.1.txt
└── v2.5.2.txt

fpm -s dir -t rpm -n package -v 2.5.2 --prefix /local/0/pulptest package

Upload/Publish Package
pulp-admin -u admin -p admin rpm repo uploads rpm --file ./package-2.5.2-1.x86_64.rpm --repo-id testrollback
pulp-admin -u admin -p admin rpm repo publish run --repo-id testrollback

Update package
pulp-admin -u admin -p admin rpm consumer package update run --consumer-id=server.example.com -n package

Update task created with id [ c33c2416-5a44-4dbb-b580-e269327b8928 ]

This command may be exited via ctrl+c without affecting the request.

Refresh Repository Metadata [ OK ]

Update Succeeded

Packages already updated

*********

Verify package updated to package-2.5.2-1.x86_64 (FAILED)
rpm -qa | grep package-2.5
package-2.5.1-1.x86_64

Run yum clean all on consumer
yum clean all

Run update again
pulp-admin -u admin -p admin rpm consumer package update run --consumer-id=server.example.com -n package --ticket 123 --repo-id foo
Update task created with id [ f03659a7-9425-4d0f-9c8f-ede066b7ba18 ]

This command may be exited via ctrl+c without affecting the request.

Refresh Repository Metadata [ OK ]
Downloading Packages [ OK ]
Check Package Signatures [ OK ]
Running Test Transaction [ OK ]
Running Transaction [ OK ]

Update Succeeded

--------------------------------------------------------------------
Updated
--------------------------------------------------------------------

Name: package
Version: 2.5.2
Arch: x86_64
Repoid: testrollback

Verify package updated to package-2.5.2-1.x86_64
rpm -qa | grep package-2.5
package-2.5.2-1.x86_64

Actual results:

pulp-admin -u admin -p admin rpm consumer package update run --consumer-id=server.example.com -n package

Update task created with id [ c33c2416-5a44-4dbb-b580-e269327b8928 ]

This command may be exited via ctrl+c without affecting the request.

Refresh Repository Metadata [ OK ]

Update Succeeded

Packages already updated

Expected results:

pulp-admin -u admin -p admin rpm consumer package update run --consumer-id=server.example.com -n package --ticket 123 --repo-id foo
Update task created with id [ f03659a7-9425-4d0f-9c8f-ede066b7ba18 ]

This command may be exited via ctrl+c without affecting the request.

Refresh Repository Metadata [ OK ]
Downloading Packages [ OK ]
Check Package Signatures [ OK ]
Running Test Transaction [ OK ]
Running Transaction [ OK ]

Update Succeeded

--------------------------------------------------------------------
Updated
--------------------------------------------------------------------

Name: package
Version: 2.5.2
Arch: x86_64
Repoid: testrollback

Verify package updated to package-2.5.2-1.x86_64
rpm -qa | grep package-2.5
package-2.5.2-1.x86_64

Additional info:

Also available in: Atom PDF