Story #949
closed[RFE] Allow Pulp server to clean yum cache on consumer to take care of package rollback/update scenarios
0%
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:
Updated by bmbouter over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter over 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.
Updated by bmbouter over 4 years ago
- Category deleted (
14)
We are removing the 'API' category per open floor discussion June 16, 2020.