Bug 641912

Summary: pulp.log does not get logged when the syncs are run with repo schedules
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: z_otherAssignee: Jeff Ortel <jortel>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: tsanders
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-17 16:51:48 UTC 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:    
Bug Blocks: 647488    

Description Preethi Thomas 2010-10-11 14:00:24 UTC
Description of problem:

If you set up a repo with --schedules option and tail pulp.log you can see that the repo sync is not logged in the pulp.log. If you check /var/lib/pulp/
you can see that the repo sync is completed



Here is the irc conversation for reference

<preethi> jdob, ping
<jdob> preethi: pong
<preethi> jdob, so the sync that is setup through schedules, does not get logged in the pulp.log, is that the correct behavior
<jdob> hrm, you mean the sync itself when it runs doesnt get logged?
<jdob> oh, ya know what, you're right
<jdob> cause it runs outside of the server where logging is configured
<jdob> please file a bug for that
<jdob> i totally hadnt thought of that

Comment 1 Jay Dobies 2010-10-20 20:47:43 UTC
commit	7df333427617a0246a0611791ed624761c51b7db
tree	5ddbaa9535f2e96af906c0919c44d56342580cd9


641912 - Added call to start logging on cron initiated scripts.


src/pulp/server/api/repo.py
src/pulp/server/auditing.py 


I added the logging configuration call to the auditing cull operations which function according to the same model.

Comment 2 Jay Dobies 2010-10-26 14:47:13 UTC
Fixed in build 0.76.

Comment 3 Preethi Thomas 2010-10-28 13:10:44 UTC
logging is being done now.

Reopening though as I see this error in pulp.log

2010-10-28 09:15:07,257 [INFO][MainThread] mkdir() @ keystore.py:176 - mkdir: /var/lib/pulp/published/gpg/tmp/pulp_schedule_test
2010-10-28 09:15:07,262 [ERROR][MainThread] keyfiles() @ keystore.py:135 - /var/lib/pulp/repos/tmp/pulp_schedule_test/packages
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/api/keystore.py", line 129, in keyfiles
    f = open(fp)
IOError: [Errno 21] Is a directory: u'/var/lib/pulp/repos/tmp/pulp_schedule_test/packages'
2010-10-28 09:15:07,273 [ERROR][MainThread] keyfiles() @ keystore.py:135 - /var/lib/pulp/repos/tmp/pulp_schedule_test/repodata
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/api/keystore.py", line 129, in keyfiles
    f = open(fp)
IOError: [Errno 21] Is a directory: u'/var/lib/pulp/repos/tmp/pulp_schedule_test/repodata'
2010-10-28 09:15:07,770 [INFO][MainThread] add_packages_from_dir() @ repo_sync.py:161 - No image files to import to repo..

Comment 4 Jay Dobies 2010-10-28 13:24:59 UTC
Jeff - Can you take a look at this? For some reason the repo sync schedules are barfing due to GPG related issues.

Comment 5 Jeff Ortel 2010-10-28 15:21:13 UTC
Fixed: 75ad0cc598217c9b2726a7a5d636c21767f034f3

Directories skipped.

Comment 6 Jay Dobies 2010-10-29 16:58:23 UTC
Fixed in 0.77.

Comment 7 Jay Dobies 2010-11-03 19:35:22 UTC
Fixed in build 0.78.

Comment 8 Preethi Thomas 2010-11-08 15:35:11 UTC
There is another bug open on the error we see in the pulp.log

verified

[root@preethi ~]#  pulp-admin -u admin -p admin repo create --id=f13_test_relative  --feed=yum:http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-13/x86_64/  --schedule="*/5 * * * *" --relativepath=/tmp/pulp_schedule_test/
Successfully created repository [ f13_test_relative ]

[root@preethi ~]#  pulp-admin repo schedules
+------------------------------------------+
       Available Repository Schedules
+------------------------------------------+

Label              	f13_test_relative        
Schedule           	*/5 * * * *              


Label              	f14                      
Schedule           	None                     


Label              	f13                      
Schedule           	None                     





tail -f /var/log/pulp/pulp.log


2010-11-08 10:40:04,632 [INFO][MainThread] mkdir() @ keystore.py:178 - mkdir: /var/lib/pulp/published/gpg/tmp/pulp_schedule_test
2010-11-08 10:40:04,634 [ERROR][MainThread] keyfiles() @ keystore.py:137 - /var/lib/pulp/repos/tmp/pulp_schedule_test/packages
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/api/keystore.py", line 131, in keyfiles
    f = open(fp)
IOError: [Errno 21] Is a directory: u'/var/lib/pulp/repos/tmp/pulp_schedule_test/packages'
2010-11-08 10:40:04,635 [ERROR][MainThread] keyfiles() @ keystore.py:137 - /var/lib/pulp/repos/tmp/pulp_schedule_test/repodata
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/api/keystore.py", line 131, in keyfiles
    f = open(fp)
IOError: [Errno 21] Is a directory: u'/var/lib/pulp/repos/tmp/pulp_schedule_test/repodata'
2010-11-08 10:40:05,170 [INFO][MainThread] add_packages_from_dir() @ repo_sync.py:161 - No image files to import to repo..

Comment 9 Preethi Thomas 2011-02-17 16:51:48 UTC
Closing with community release 

pulp-0.0.139-1.fc14.noarch