sys-cluster/nova: units, tmpfile, logrotate

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-03-30 12:25:22 +02:00
parent 9dd644c92d
commit 533097a2ef
10 changed files with 124 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
/var/log/nova/*.log {
daily
missingok
compress
delaycompress
copytruncate
}

View File

@@ -0,0 +1 @@
d /run/nova 0755 nova nova -

View File

@@ -0,0 +1,15 @@
[Unit]
Description=OpenStack Nova API Server
After=syslog.target network.target
[Service]
Type=notify
NotifyAccess=all
TimeoutStartSec=0
Restart=always
User=nova
ExecStart=/usr/bin/nova-api --log-file /var/log/nova/api.log
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,16 @@
[Unit]
Description=OpenStack Nova Compute Server
After=syslog.target network.target libvirtd.service virtqemud.service
[Service]
Environment=LIBGUESTFS_ATTACH_METHOD=appliance
Type=notify
NotifyAccess=all
TimeoutStartSec=0
Restart=always
User=nova
ExecStart=/usr/bin/nova-compute --log-file /var/log/nova/compute.log
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,15 @@
[Unit]
Description=OpenStack Nova Conductor Server
After=syslog.target network.target
[Service]
Type=notify
NotifyAccess=all
TimeoutStartSec=0
Restart=always
User=nova
ExecStart=/usr/bin/nova-conductor --log-file /var/log/nova/conductor.log
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,15 @@
[Unit]
Description=OpenStack Nova Metadata API Server
After=syslog.target network.target
[Service]
Type=notify
NotifyAccess=all
TimeoutStartSec=0
Restart=always
User=nova
ExecStart=/usr/bin/nova-api-metadata --log-file /var/log/nova/metadata.log
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,13 @@
[Unit]
Description=OpenStack Nova NoVNC Proxy Server
After=syslog.target network.target
[Service]
Type=simple
User=nova
EnvironmentFile=-/etc/conf.d/openstack-nova-novncproxy
ExecStart=/usr/bin/nova-novncproxy --web /usr/share/webapps/novnc/ --log-file /var/log/nova/novnc.log $OPTIONS
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,14 @@
[Unit]
Description=OpenStack Nova Compute API Server
After=syslog.target network.target
[Service]
Type=notify
NotifyAccess=all
TimeoutStartSec=0
Restart=always
User=nova
ExecStart=/usr/bin/nova-api-os-compute --log-file /var/log/nova/api-os-compute.log
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,15 @@
[Unit]
Description=OpenStack Nova Scheduler Server
After=syslog.target network.target
[Service]
Type=notify
NotifyAccess=all
TimeoutStartSec=0
Restart=always
User=nova
ExecStart=/usr/bin/nova-scheduler --log-file /var/log/nova/scheduler.log
[Install]
WantedBy=multi-user.target

View File

@@ -6,7 +6,7 @@ EAPI=8
MYP="${P//_/}"
PYTHON_COMPAT=( python3_{8..9} )
inherit bash-completion-r1 distutils-r1 linux-info udev
inherit bash-completion-r1 distutils-r1 linux-info systemd tmpfiles udev
DESCRIPTION="Cloud computing fabric controller"
HOMEPAGE="
@@ -196,13 +196,13 @@ python_compile_all() {
python_install_all() {
distutils-r1_python_install_all
if use !compute-only; then
for svc in api conductor consoleauth network scheduler spicehtml5proxy xvpvncproxy; do
newinitd "${FILESDIR}/nova.initd" "nova-${svc}"
done
fi
use compute && newinitd "${FILESDIR}/nova.initd" "nova-compute"
use novncproxy && newinitd "${FILESDIR}/nova.initd" "nova-novncproxy"
for svc in api compute conductor consoleauth network novncproxy scheduler spicehtml5proxy xvpvncproxy; do
newinitd "${FILESDIR}/nova.initd" "nova-${svc}"
done
for svc in api compute conductor metadata-api novncproxy os-compute-api scheduler; do
systemd_dounit "${FILESDIR}/openstack-nova-${svc}.service"
done
diropts -m 0750 -o nova -g qemu
dodir /var/log/nova /var/lib/nova/instances
@@ -229,6 +229,11 @@ python_install_all() {
newbashcomp tools/nova-manage.bash_completion nova-manage
newtmpfiles "${FILESDIR}/nova.tmpfile" nova.conf
insinto /etc/logrotate.d
newins "${FILESDIR}/nova.logrotate" nova.conf
if use iscsi ; then
# Install udev rules for handle iscsi disk with right links under /dev
udev_newrules "${FILESDIR}/openstack-scsi-disk.rules" 60-openstack-scsi-disk.rules