Bug 795819
| Summary: | Changeset#promote_content failed with TypeError: can't convert nil into String | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | John Matthews <jmatthew> |
| Component: | user-experience | Assignee: | Pradeep Kilambi <pkilambi> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.0.0 | CC: | inecas, jortel, omaciel, pkilambi, skarmark, 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: | 795816 | 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: | |
| Embargoed: | |||
| Bug Depends On: | 795816 | ||
| Bug Blocks: | |||
|
Description
John Matthews
2012-02-21 15:41:05 UTC
commit 33006d7e09b5093c64d31ee37554dfbcdbfd19c3 Test: * sync el6 repo from cdn (make sure repodata has href with a dir eg: Package/foo.rpm). regular repos dont show this as an issue * clone the el6 repo on pulp * now resync the cloned el6 repo * watch the logs to make sure you dont see any "No such file or directory" error * make sure the packages after resync are still under Packages/ dir in repodir and not under os dir build: 1.0.0-2 I can confirm this error, but I'm not sure it's related directly to the description of the original bug. When reproducing this one, I've seen the packages not being positioned correctly, but I haven't seen the 'No such file or directory' error. Also on the machine with the original bug, there were no packages in incorrect place. The original bug appears in packages synchronized from remote repo.The strange thing is that for some packages synchronized from remote repo the link is not created. However it seems the package should be there (when cloning, it shouts that the package is missing). So at the end, most (but not all) links are created. Another observation: Pulp says: 2012-02-21 17:58:16,785 11788:140544395171584: pulp.server.api.synchronizers:INFO : synchronizers:783 YumSynchronizer reported 5632 successes, 4729 downloads, 1 er rors But in grinder there are only 4729 lines with line like: grinder.log:2012-02-21 17:55:35,435 11788:140544374191872: grinder.BaseFetch:INFO: activeobject:160 Create a link in repo directory for the package at /var/lib/pulp//repos/Seattle/Library/content/dist/rhel/server/6/6.1/x86_64/os//Packages/zlib-1.2.3-25.el6.i686.rpm to ../../../../../../../../../../../../packages/zlib/1.2.3/25.el6/i686/36a/zlib-1.2.3-25.el6.i686.rpm So it seems like the link was not created for packages, that were already downloaded for another repo (e.g. 6.2) Althought there are also lines in grinder.log like: grinder.log:2012-02-21 17:54:09,017 11788:140544374191872: grinder.BaseFetch:INFO: activeobject:160 Symlink missing in repo directory. Creating link /var/lib/pulp//repos/Seattle/Library/content/dist/rhel/server/6/6.1/x86_64/os//Packages/xulrunner-1.9.2.20-2.el6_1.x86_64.rpm to ../../../../../../../../../../../../packages/xulrunner/1.9.2.20/2.el6_1/x86_64/dd4/xulrunner-1.9.2.20-2.el6_1.x86_64.rpm There are only 177 for the repo. So we still missing links for over 700 packages I suspect this lines starting grinder/BaseFetch.py:193 to cause this troubles:
# Acquire a write lock so no other process duplicates the effort
grinder_write_locker = GrinderLock(filePath + '.lock')
existing_lock_pid = grinder_write_locker.readlock()
new_pid = os.getpid()
if existing_lock_pid and int(existing_lock_pid) != new_pid and grinder_write_locker.isvalid(existing_lock_pid):
# If there is an existing write pid
# and if the pid is not same as the current pid
# and pid is valid there is another process alive
# and handling this, exit here.
LOG.debug("another process is already handling this path [%s] and is alive; no need to process this again " % filePath)
return (BaseFetch.STATUS_NOOP,None)
Bare in mind that synchronization of 6.1 and 6.2 repos runs concurrently, there might be situations, that the package is being downloaded for another repo. In this case it's skipped and the symlink is no longer created.
Ivan could you open a separate bug for remote sync issue you are mentioning against pulp. The issue i fixed and discussed with Og was related to promotions and syncing promoted repos. The issue you're mentioning seems possible if two concurrent repo syncs are running with same package being downloaded. Lets leave this current issue for promotions and track the remote sync issue as a separate bug. as per prad's comment above verifying the original issue found no errors in log on clone or re syncing the [root@preethi-el6-pulp ~]# rpm -q pulp pulp-1.0.0-2.el6.noarch [root@preethi-el6-pulp ~]# [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin repo create --id rhel6_2 --feed https://cdn.redhat.com/content/dist/rhel/rhui/server/6/6.2/x86_64/os/ --feed_ca CDN/cdn.redhat.com-chain.crt --feed_cert CDN/rhcontent.pem Successfully created repository [ rhel6_2 ] [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin repo sync --id rhel6_2 -F Sync for repository rhel6_2 started Sync: Finished 6880/6880 new items downloaded 0/6880 existing items processed Item Details: Tree Files: 6/6 RPMs: 6874/6874 [root@preethi-el6-pulp ~]# [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin repo clone --id rhel6_2 --clone_id=rhe6_2_clone-origin --feed=origin -F Repository [rhel6_2] is being cloned as [rhe6_2_clone-origin] Clone: Finished Item Details: Tree Files: 6/6 RPMs: 6874/6874 [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin repo sync --id=rhe6_2_clone-origin -F Sync for repository rhe6_2_clone-origin started Sync: Finished 0/6880 new items downloaded 6880/6880 existing items processed Item Details: Tree Files: 6/6 RPMs: 6874/6874 [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin repo clone --id rhel6_2 --clone_id=rhe6_2_clone-parent --feed=parent -F Repository [rhel6_2] is being cloned as [rhe6_2_clone-parent] Clone: Finished Item Details: Tree Files: 6/6 RPMs: 6874/6874 [root@preethi-el6-pulp ~]# [root@preethi-el6-pulp ~]# Write failed: Broken pipe [pthomas@pthomas-lt ~]$ ssh root.redhat.com root.redhat.com's password: Permission denied, please try again. root.redhat.com's password: Last login: Thu Feb 23 17:20:20 2012 from vpn-11-3.rdu.redhat.com [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin repo sync --id=rhe6_2_clone-parent -F Sync for repository rhe6_2_clone-parent started Sync: Finished 3525/6880 new items downloaded 3355/6880 existing items processed Item Details: Tree Files: 6/6 RPMs: 6874/6874 [root@preethi-el6-pulp ~]# ls -l /var/lib/pulp/ total 112 drwxr-xr-x. 3 apache apache 4096 Feb 23 17:19 cache drwxr-xr-x. 3 apache apache 4096 Feb 23 17:19 distributions -rw-r--r--. 1 root root 0 Feb 23 17:13 init.flag drwxr-xr-x. 2842 apache apache 90112 Feb 23 19:11 packages drwxr-xr-x. 6 apache apache 4096 Feb 23 17:10 plugins drwxr-xr-x. 5 apache apache 4096 Feb 23 20:20 published drwxr-xr-x. 5 apache apache 4096 Feb 23 22:50 repos [root@preethi-el6-pulp ~]# ls -l /var/lib/pulp/repos/ total 12 drwxr-xr-x. 3 apache apache 4096 Feb 23 17:17 content drwxrwxr-x. 6 apache apache 4096 Feb 23 21:17 rhe6_2_clone-origin drwxrwxr-x. 6 apache apache 4096 Feb 24 07:30 rhe6_2_clone-parent [root@preethi-el6-pulp ~]# ls -l /var/lib/pulp/repos/rhe6_2_clone-origin/ total 4604 drwxr-xr-x. 2 apache apache 4096 Feb 23 20:19 drpms drwxr-xr-x. 3 apache apache 4096 Feb 23 20:19 images drwxr-xr-x. 2 apache apache 643072 Feb 23 20:19 Packages drwxr-xr-x. 2 apache apache 4096 Feb 23 21:17 repodata lrwxrwxrwx. 1 apache apache 74 Feb 23 20:19 treeinfo -> ../../distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64/treeinfo -rw-r--r--. 1 apache apache 4047964 Feb 23 21:17 updateinfo.xml [root@preethi-el6-pulp ~]# ls -l /var/lib/pulp/repos/rhe6_2_clone-parent/ total 4604 drwxr-xr-x. 2 apache apache 4096 Feb 23 22:51 drpms drwxr-xr-x. 3 apache apache 4096 Feb 23 22:51 images drwxr-xr-x. 2 apache apache 643072 Feb 23 22:51 Packages drwxr-xr-x. 2 apache apache 4096 Feb 24 07:30 repodata lrwxrwxrwx. 1 apache apache 74 Feb 23 22:51 treeinfo -> ../../distributions/ks-Red Hat Enterprise Linux-Server-6.2-x86_64/treeinfo -rw-r--r--. 1 apache apache 4047964 Feb 24 07:30 updateinfo.xml [root@preethi-el6-pulp ~]# Cannot test it until pulp-1.0.0-2 lands with SE Pulp v1.0 is released Closed Current Release. Pulp v1.0 is released. |