OSDN Git Service

Addition of lxcf-sched service
authorHideyuki Niwa <niwa.hideyuki@jp.fujitsu.com>
Fri, 28 Mar 2014 08:00:01 +0000 (17:00 +0900)
committerHideyuki Niwa <niwa.hideyuki@jp.fujitsu.com>
Fri, 28 Mar 2014 08:00:01 +0000 (17:00 +0900)
lxcf/Makefile
lxcf/conf/lxcf-sched.service [new file with mode: 0644]
lxcf/lxcf.spec
lxcf/package/SPECS/lxcf.spec

index ebdff4d..aa3a789 100644 (file)
@@ -174,6 +174,9 @@ install_conf: .prepare
        install -d -m 755 $(DESTDIR)$(sysconfdir)/systemd/system/multi-user.target.wants
        ln -f -s $(systemddir)/system/lxcf.service \
            $(DESTDIR)$(sysconfdir)/systemd/system/multi-user.target.wants/lxcf.service
+       install -m 644 conf/lxcf-sched.service $(DESTDIR)$(systemddir)/system/lxcf-sched.service
+       ln -f -s $(systemddir)/system/lxcf-sched.service \
+           $(DESTDIR)$(sysconfdir)/systemd/system/multi-user.target.wants/lxcf-sched.service
        install -d -m 755 $(DESTDIR)$(localstatedir)/lib/libvirt/network
        install -m 644 conf/var_lxcfnet1.xml \
            $(DESTDIR)$(localstatedir)/lib/libvirt/network/lxcfnet1.xml
@@ -234,6 +237,7 @@ uninstall:
        rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/lxcfnet1.xml
        rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/lxcfnet1.xml
        rm -f $(DESTDIR)$(systemddir)/system/lxcf.service
+       rm -f $(DESTDIR)$(systemddir)/system/lxcf-sched.service
        rm -f $(DESTDIR)$(sysconfdir)/systemd/system/multi-user.target.wants/lxcf.service
        rm -f $(DESTDIR)$(localstatedir)/lib/libvirt/network/lxcfnet1.xml
        rm -f $(DESTDIR)$(mandir)/man1/lxcf.1.gz
diff --git a/lxcf/conf/lxcf-sched.service b/lxcf/conf/lxcf-sched.service
new file mode 100644 (file)
index 0000000..445ec34
--- /dev/null
@@ -0,0 +1,35 @@
+# LXCF - LXC Facility
+# copyright (C) 2014 FUJITSU LIMITED All Rights Reserved
+
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; version 2
+# of the License.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  
+# 02110-1301, USA.
+
+# This unit gets pulled automatically into multi-user.target by
+# lxcfsched.service
+[Unit]
+Description=lxcf-sched service 
+ConditionFileIsExecutable=/usr/lib/lxcf/lxcf-sched
+After=network.target
+
+[Service]
+ExecStart=/usr/lib/lxcf/lxcf-sched
+KillMode=process
+Restart=on-failure
+RestartSec=42s
+SysVStartPriority=99
+
+[Install]
+WantedBy=multi-user.target
+
index b6ffb77..9c16d50 100644 (file)
@@ -145,7 +145,9 @@ systemctl restart libvirtd
 %config(noreplace) /etc/libvirt/qemu/networks/lxcfnet1.xml
 /etc/libvirt/qemu/networks/autostart/lxcfnet1.xml
 /usr/lib/systemd/system/lxcf.service
+/usr/lib/systemd/system/lxcf-sched.service
 /etc/systemd/system/multi-user.target.wants/lxcf.service
+/etc/systemd/system/multi-user.target.wants/lxcf-sched.service
 /var/lib/libvirt/network/lxcfnet1.xml
 /var/log/lxcf/lxcf-messages
 
index b6ffb77..9c16d50 100644 (file)
@@ -145,7 +145,9 @@ systemctl restart libvirtd
 %config(noreplace) /etc/libvirt/qemu/networks/lxcfnet1.xml
 /etc/libvirt/qemu/networks/autostart/lxcfnet1.xml
 /usr/lib/systemd/system/lxcf.service
+/usr/lib/systemd/system/lxcf-sched.service
 /etc/systemd/system/multi-user.target.wants/lxcf.service
+/etc/systemd/system/multi-user.target.wants/lxcf-sched.service
 /var/lib/libvirt/network/lxcfnet1.xml
 /var/log/lxcf/lxcf-messages