| Summary: | After deleting a file from a repo using content delete, 'repo content' and 'content list' commands result in traceback | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Sayli Karmarkar <skarmark> |
| Component: | user-experience | Assignee: | Pradeep Kilambi <pkilambi> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.0.0 | CC: | cperry, tsanders |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | 790285 | ||
| Bug Blocks: | |||
commit 6d1a00cffbea8f76cd026dc901512a561dbdb565 build: 0.267 [root@preethi ~]# rpm -q pulp
pulp-0.0.267-1.fc15.noarch
[root@preethi ~]#
[root@preethi ~]# pulp-admin content delete -f test.txt
error: operation failed: FileHasReferences: file [e6dbdfec-d7d5-4d0b-b35a-d0bc67d0e389] has references, delete not permitted
[root@preethi ~]# pulp-admin repo content --id=test
+------------------------------------------+
Contents of test
+------------------------------------------+
Packages in test:
gofer-0.32-1.fc14.noarch.rpm
m2crypto-0.21.1.pulp-7.fc15.x86_64.rpm
pulp-0.0.168-1.fc14.noarch.rpm
Errata in test:
none
Files in test:
test.txt
[root@preethi ~]# pulp-admin content list --repoid=test
gofer-0.32-1.fc14.noarch.rpm,af032f3119837475ede531a3b1b0fc44da1f9e3bbe2ca958fe4179cb19e12873
m2crypto-0.21.1.pulp-7.fc15.x86_64.rpm,187736f3c57ad951b3a131c9d7b019795684ee1fe292aad212ad040fb49cd6ad
pulp-0.0.168-1.fc14.noarch.rpm,8052aa889f23423d7a94548620ad1f01ff6862219357e41427fd4944535f4a52
test.txt,119e74eb7308817acef45688fac0e33262b960802f5fda45c55cd6093dd9d343
[root@preethi ~]#
[root@preethi ~]# pulp-admin repo remove_file --id=test -f test.txt
Successfully removed file [test.txt] from repo [test].
[root@preethi ~]# pulp-admin content list --repoid=test
gofer-0.32-1.fc14.noarch.rpm,af032f3119837475ede531a3b1b0fc44da1f9e3bbe2ca958fe4179cb19e12873
m2crypto-0.21.1.pulp-7.fc15.x86_64.rpm,187736f3c57ad951b3a131c9d7b019795684ee1fe292aad212ad040fb49cd6ad
pulp-0.0.168-1.fc14.noarch.rpm,8052aa889f23423d7a94548620ad1f01ff6862219357e41427fd4944535f4a52
[root@preethi ~]# pulp-admin content delete -f test.txt
Successfully deleted content [test.txt] from pulp server
[root@preethi ~]#
[root@preethi ~]#
[root@preethi ~]#
[root@preethi ~]# pulp-admin repo content --id=test
+------------------------------------------+
Contents of test
+------------------------------------------+
Packages in test:
gofer-0.32-1.fc14.noarch.rpm
m2crypto-0.21.1.pulp-7.fc15.x86_64.rpm
pulp-0.0.168-1.fc14.noarch.rpm
Errata in test:
none
Files in test:
none
[root@preethi ~]# pulp-admin content upload upload/test.txt -v
* Starting Content Upload
* Performing Content Uploads to Pulp server
Successfully uploaded [test.txt] to server
* Content Upload complete.
[root@preethi ~]# pulp-admin content delete -f test.txt
Successfully deleted content [test.txt] from pulp server
[root@preethi ~]# pulp-admin content upload upload/test.txt -r test -v
* Starting Content Upload
* Performing Content Uploads to Pulp server
Successfully uploaded [test.txt] to server
* Performing Repo Associations
Content association Complete for Repo [test]:
Packages:
None
Files:
test.txt
* Content Upload complete.
[root@preethi ~]# pulp-admin content delete -f test.txt
error: operation failed: FileHasReferences: file [884c4aea-6a22-43f9-b681-5c69dff6112c] has references, delete not permitted
[root@preethi ~]#
Pulp v1.0 is released Closed Current Release. Pulp v1.0 is released. |
Description of problem: After deleting a file using 'pulp-admin content delete' command, I get this traceback when trying to list contents of the repository from which file was deleted. $ sudo pulp-admin repo content --id test +------------------------------------------+ Contents of test +------------------------------------------+ Packages in test: pulp-large_100k_test-packageB-0.1.1-1.fc14.noarch.rpm pulp-large_100k_test-packageA-0.1.1-1.fc14.noarch.rpm pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm pulp-test-package-0.2.1-1.fc11.x86_64.rpm Errata in test: none Files in test: fileA.txt fileC.iso updateinfo.xml fileB.txt Traceback (most recent call last): File "/usr/bin/pulp-admin", line 7, in <module> execfile(__file__) File "/home/skarmark/git/pulp1/pulp/bin/pulp-admin", line 23, in <module> admin.main() File "/home/skarmark/git/pulp1/pulp/src/pulp/client/lib/cli.py", line 152, in main command.main(self.args[1:]) File "/home/skarmark/git/pulp1/pulp/src/pulp/client/pluginlib/command.py", line 129, in main action.main(args[1:]) File "/home/skarmark/git/pulp1/pulp/src/pulp/client/pluginlib/command.py", line 213, in main self.run() File "/home/skarmark/git/pulp1/pulp/src/pulp/client/admin/plugins/repo.py", line 422, in run print ' ' + f['filename'] TypeError: 'NoneType' object is not subscriptable $ sudo pulp-admin content list --repoid test pulp-large_100k_test-packageB-0.1.1-1.fc14.noarch.rpm,1952d421409af01b13d8a111a0b5a18431e6c21a00c10dc032e4da84d6bfd1bf pulp-large_100k_test-packageA-0.1.1-1.fc14.noarch.rpm,32762001d6e314a44b71c1b6f6bb8c01e2224d4b2f2b84e46a8550d96b2bbd4e pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm,435d92e6c09248b501b8d2ae786f92ccfad69fab8b1bc774e2b66ff6c0d83979 pulp-test-package-0.2.1-1.fc11.x86_64.rpm,4dbde07b4a8eab57e42ed0c9203083f1d61e0b13935d1a569193ed8efc9ecfd7 fileA.txt,22603a94360ee24b7034c74fa13d70dd122aa8c4be2010fc1361e1e6b0b410ab fileC.iso,099f2bafd533e97dcfee778bc24138c40f114323785ac1987a0db66e07086f74 updateinfo.xml,03776aa0d5d0ed3b3dd6d0a89171a90bf3102970c808845bd0c00a5c74f3c7c2 fileB.txt,8dc89e9883c098443f6616e60a8e489254bf239eeade6e4b4943b7c8c0c345a4 Traceback (most recent call last): File "/usr/bin/pulp-admin", line 7, in <module> execfile(__file__) File "/home/skarmark/git/pulp1/pulp/bin/pulp-admin", line 23, in <module> admin.main() File "/home/skarmark/git/pulp1/pulp/src/pulp/client/lib/cli.py", line 152, in main command.main(self.args[1:]) File "/home/skarmark/git/pulp1/pulp/src/pulp/client/pluginlib/command.py", line 129, in main action.main(args[1:]) File "/home/skarmark/git/pulp1/pulp/src/pulp/client/pluginlib/command.py", line 213, in main self.run() File "/home/skarmark/git/pulp1/pulp/src/pulp/client/admin/plugins/content.py", line 218, in run for checksum in pkg['checksum'].values(): TypeError: 'NoneType' object is not subscriptable