mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-26 10:03:37 +03:00
Bug #1277: fix services files ~ In all cases using the [Exec] section is incorrect, the user and group settings are not applied as expected. ~ The name for the remote fs, i.e. nfs target is remote-fs.target and not remote_fs.target, the broken service file cuases improper service order startup and thus triggers non obvious failures. (one_scheduler.service and one.service) ~ one.service is missing conditions thus it would be possible to start the service in an inconsistent state.
This commit is contained in:
parent
9fc914f458
commit
fdcf102cbc
@ -2,22 +2,27 @@
|
||||
Description=OpenNebula Cloud Controller Daemon
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
After=remote_fs.target
|
||||
After=remote-fs.target
|
||||
Before=one_scheduler.service
|
||||
# Do not start if the scheduler does not exist
|
||||
ConditionFileIsExecutable=/usr/bin/mm_sched
|
||||
!ConditionFileExists=/var/run/one/oned.pid
|
||||
# Directory lock and run directories must exist
|
||||
ConditionPathIsDirectory=/var/lock/one
|
||||
ConditionPathIsDirectory=/var/run/one
|
||||
# The PID file for the process should not exist, we either have a
|
||||
# running process or the previous run did not exit cleanly
|
||||
!ConditionPathExists=/var/run/one/oned.pid
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/oned
|
||||
# Start daemon in forground mode, when starting as forking process the
|
||||
# daemon shuts down without obvious reason.
|
||||
ExecStart=/usr/bin/oned -f
|
||||
# Log file location must exist
|
||||
ExecStartPre=/bin/mkdir -p /var/log/one
|
||||
ExecStartPre=/bin/chown oneadmin:cloud /var/log/one
|
||||
ExecStop=/bin/kill -TERM $MAINPID
|
||||
PIDFile=/var/run/one/oned.pid
|
||||
Type=forking
|
||||
|
||||
[Exec]
|
||||
Type=simple
|
||||
Group=cloud
|
||||
User=oneadmin
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Description=OpenNebula Cloud Scheduler Daemon
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
After=remote_fs.target
|
||||
After=remote-fs.target
|
||||
After=one.service
|
||||
BindTo=one.service
|
||||
!ConditionFileExists=/var/run/one/sched.pid
|
||||
@ -13,8 +13,6 @@ ExecStart=/usr/bin/mm_sched -p $PORT -t 30 -m 300 -d 30 -h 1
|
||||
ExecStop=/bin/kill -TERM $MAINPID
|
||||
PIDFile=/var/run/one/sched.pid
|
||||
Type=simple
|
||||
|
||||
[Exec]
|
||||
Group=cloud
|
||||
User=oneadmin
|
||||
|
||||
|
@ -13,8 +13,6 @@ ExecStartPost=/usr/bin/touch /var/lock/one/.ozones.lock
|
||||
ExecStop=/bin/kill -INT $MAINPID
|
||||
PIDFile=/var/run/one/ozones.pid
|
||||
Type=simple
|
||||
|
||||
[Exec]
|
||||
Group=cloud
|
||||
User=oneadmin
|
||||
|
||||
|
@ -8,12 +8,10 @@ BindTo=one.service
|
||||
!ConditionFileExists=/var/lock/one/.sunstone.lock
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c "/usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb > /var/log/one/sunstone.log 2>&1"
|
||||
ExecStart=/bin/bash -c "/usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb > /var/log/one/sunstone.log 2>/var/log/one/sunstone.error"
|
||||
ExecStop=/bin/kill -INT $MAINPID
|
||||
PIDFile=/var/run/one/sunstone.pid
|
||||
Type=simple
|
||||
|
||||
[Exec]
|
||||
Group=cloud
|
||||
User=oneadmin
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user