Bug #678

Startup should create dir for pid file if it does not exists

Added by Robert Schweikert about 10 years ago. Updated over 7 years ago.

Status:ClosedStart date:06/13/2011
Priority:LowDue date:
Assignee:Jaime Melis% Done:

0%

Category:Core & System
Target version:Release 4.4
Resolution:wontfix Pull request:
Affected Versions:OpenNebula 4.2

Description

It is perfectly reasonable for a sysadmin to locate /var/run on a tmpfs, thus everything written will be deleted at reboot time. The startup script should check for the existence /var/run/one and create it if it is not present. It should not be expected that the sysadmin wrap the "one" startup script.

oned startup will fail if the directory is not present.

Similar arguments can be made for /var/log/one and /var/lock/one. However, neither should be located on tmpfs (to the best of my knowledge) and thus creation of /var/log/one and /var/lock/one can be left to packagers and sysadmins as this is a one time task.

The attached patch addresses this problem.

0001-create-dir-for-pid-file-if-not-exist-check-write-per.patch Magnifier - patch to create /var/run/one and check write permissions (1.47 KB) Robert Schweikert, 06/13/2011 02:41 PM

Associated revisions

Revision e0c813b5
Added by Jaime Melis over 7 years ago

Bug #678: Startup should create dir for pid file if it does not exists

Revision 404a2fa1
Added by Jaime Melis over 7 years ago

Bug #678: Startup should create dir for pid file if it does not exists

(cherry picked from commit e0c813b59138aea45d44739d00abda7a9dc83abe)

History

#1 Updated by Ruben S. Montero about 8 years ago

  • Priority changed from Normal to Low

#2 Updated by Ruben S. Montero over 7 years ago

  • Target version set to Release 4.4
  • Affected Versions OpenNebula 4.2 added

#3 Updated by Ruben S. Montero over 7 years ago

  • Assignee changed from Ruben S. Montero to Jaime Melis

#4 Updated by Jaime Melis over 7 years ago

  • Status changed from New to Closed
  • Resolution set to wontfix

since openSUSE is now using systemd, this issue is not necessary any more

#5 Updated by Robert Schweikert over 7 years ago

Could you please reconsider.

I am still building packages for SUSE Linux Enterprise and it uses sysV init and SLE 11 will be supported for another 5 years or so. Also there are other distributions that still use sysV init and this patch is useful for them as well.

Last but not least this is generally useful when setting up OpenNabula from scratch not using specific distribution packages.

Thanks

#6 Updated by Jaime Melis over 7 years ago

Of course. Thanks for the patch and for explaining. Patch (with slight modification) applied.

Also available in: Atom PDF