Bug 486213

Summary: when cache dir is removed hald fails to start resulting in no devices for X
Product: [Fedora] Fedora Reporter: Dennis Gilmore <dennis>
Component: halAssignee: Richard Hughes <richard>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: richard
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-19 08:33:02 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:

Description Dennis Gilmore 2009-02-18 21:33:22 UTC
Description of problem:

after a wayward rm of mock cache /var/cache/hald/ was accidently removed.  on restart there were no devices for X.

15:23:21.885 [E] create_cache.c:638: Unable to open fdi cache '/var/cache/hald/fdi-cache~' file for writing: No such file or directory

manualyy starting hald remotely gave the above output.

Version-Release number of selected component (if applicable):


How reproducible:

always 

Steps to Reproduce:
1. rm -rf /var/cache/hald/
2. restart haldeamon
3.
  
Actual results:
haldaemon fails to start 

Expected results:
/var/cache/hald/ gets recreated and haldaemon starts up

Additional info:

considering cache dirs ar good targets for nuking  either intentionally or accidently hald should recreate its cache dir if its missing on startup.

Comment 1 Richard Hughes 2009-02-19 08:33:02 UTC
/var/cache/hald/ is a system directory with SELinux context, with specific owner and permissions. hald very quickly drops root privs, and therefore cannot recreate a directory with root:root, when running as hald. You shouldn't delete this directory, just like you shouldn't delete /var/cache/ccache.