Bug 754306

Summary: katello-configure fails on service start, possible race condition
Product: Red Hat Satellite Reporter: Jeff Weiss <jweiss>
Component: InfrastructureAssignee: Lukas Zapletal <lzap>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: dajohnso, kbidarka, lzap, sghai
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 754430 (view as bug list) Environment:
Last Closed: 2012-08-22 18:06:55 UTC 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:    
Bug Blocks: 747354    

Description Jeff Weiss 2011-11-16 02:36:00 UTC
Description of problem:
katello-configure sometimes fails with a filesystem permission problem.  The fact that it doesn't always fail, even with the same build and the exact same disk image in the same initial state, leads me to believe it's a race condition.  I am going to guess that puppet runs two processes in parallel, that affect this pid directory, whichever one finishes first determines whether this error occurs or not.

Version-Release number of selected component (if applicable):
katello-0.1.104-1.git.57.dab58b8.el6.x86_64

How reproducible:
intermittent

Steps to Reproduce:
1. run katello-configure on a clean machine
2.
3.
  
Actual results:
error, see below

Expected results:
successful install

Additional info:

/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/pidfile.rb:94:in `initialize': Permission denied - /usr/share/katello/tmp/p
ids/delayed_job.pid (Errno::EACCES)
	from /usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/pidfile.rb:94:in `open'
	from /usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/pidfile.rb:94:in `pid='
	from /usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/application.rb:253:in `start_proc'
	from /usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/application.rb:293:in `start'
	from /usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/controller.rb:70:in `run'
	from /usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons.rb:195:in `run_proc'
	from /usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/cmdline.rb:109:in `call'
	from /usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/cmdline.rb:109:in `catch_exceptions'
	from /usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons.rb:194:in `run_proc'
	from /usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:81:in `run_process'
	from /usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:75:in `daemonize'
	from /usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:73:in `times'
	from /usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:73:in `daemonize'
	from script/delayed_job:5

Comment 1 Jeff Weiss 2011-11-16 03:07:26 UTC
/usr/share/katello/scripts/reset-oauth
chown katello:katello /usr/share/katello/tmp/pids/
and then restart all services seems to work around the problem

Comment 2 Lukas Zapletal 2011-11-16 14:34:03 UTC
Fixed one moment ago with this one:

https://bugzilla.redhat.com/show_bug.cgi?id=754430

979a137 754430 - Product promotion fails as katello-jobs doesn't start

Comment 3 Jeff Weiss 2011-11-16 14:35:43 UTC
*** Bug 754430 has been marked as a duplicate of this bug. ***

Comment 4 Kedar Bidarkar 2011-11-23 07:11:39 UTC
We are now able to promote the product, 

[root@xxxx f15]# ll repodata
total 14124
-rw-r--r--. 1 apache apache 1924731 Nov 22 21:27 2837838aa7c648a3b6cd5eb754dee7b1df7b98bc42c58532937d9e4f397db7e8-2837838aa7c648a3b6cd5eb754dee7b1df7b98bc42c58532937d9e4f397db7e8-2837838aa7c648a3b6cd5eb754dee7b1df7b98bc42c58532937d9e4f397db7e8-Fedora-15-comps.xml
-rw-r--r--. 1 apache apache 2553262 Nov 22 21:27 3cf365d993797a14c3dea1123b0a9710b29f738c63c344c2872eea1dc15c00e5-filelists.xml.gz
-rw-r--r--. 1 apache apache 1173299 Nov 22 21:27 4aebc3111fe9765c9840cfbfb06ef7a732b22bf12727c3918039e51d09554e35-other.xml.gz
-rw-r--r--. 1 apache apache  432787 Nov 22 21:27 abc7535f603fe8d62395a8d9cf105290ed5edd343926a62c0f0fa2ffee194738-2837838aa7c648a3b6cd5eb754dee7b1df7b98bc42c58532937d9e4f397db7e8-2837838aa7c648a3b6cd5eb754dee7b1df7b98bc42c58532937d9e4f397db7e8-Fedora-15-comps.xml.gz
-rw-r--r--. 1 apache apache 1204882 Nov 22 21:27 d1c2af1b09141dbece7c79e09f91db3ae5d51dc704ef3f29a80a442ef7386bb1-primary.xml.gz
-rw-r--r--. 1 apache apache 1130424 Nov 22 21:27 d513243eeec7fe5409052d97fa270d72fa8dbb3e85e8a96cabd68d0c7d06178c-other.sqlite.bz2
-rw-r--r--. 1 apache apache  432725 Nov 22 21:23 def5c8e98370f4976e1d00bd1808499d82519bd64fb836b7c38ecd1a3a24f465-2837838aa7c648a3b6cd5eb754dee7b1df7b98bc42c58532937d9e4f397db7e8-Fedora-15-comps.xml.gz
-rw-r--r--. 1 apache apache 2905233 Nov 22 21:27 e334acca5bf136b5e72c83d58fdec9ba189a1b0c1afd260e3eac11771d09feca-filelists.sqlite.bz2
-rw-r--r--. 1 apache apache  432639 Nov 22 21:23 e67f6e07e869158b8ae94de833adf43fe14c4fdd90d8cf7c01fab221e9716684-Fedora-15-comps.xml.gz
-rw-r--r--. 1 apache apache 2249869 Nov 22 21:27 e9e94ba04f4e3d9124759c354e3270ae68032e438ba8c88ee1fc8ca464b6d1d4-primary.sqlite.bz2
-rw-r--r--. 1 apache apache    4007 Nov 22 21:27 repomd.xml
[root@xxx f15]# pwd
/var/lib/pulp/repos/ACME_Corporation/Dev/fedora-15/f15