add spec and source packages
This commit is contained in:
parent
7ed20a4470
commit
dbfa31cf64
BIN
nova-22.0.0.tar.gz
Normal file
BIN
nova-22.0.0.tar.gz
Normal file
Binary file not shown.
19
nova-dist.conf
Normal file
19
nova-dist.conf
Normal file
@ -0,0 +1,19 @@
|
||||
[DEFAULT]
|
||||
log_dir = /var/log/nova
|
||||
state_path = /var/lib/nova
|
||||
lock_path = /var/lib/nova/tmp
|
||||
injected_network_template = /usr/share/nova/interfaces.template
|
||||
libvirt_nonblocking = True
|
||||
libvirt_inject_partition = -1
|
||||
compute_driver = libvirt.LibvirtDriver
|
||||
rootwrap_config = /etc/nova/rootwrap.conf
|
||||
use_stderr = False
|
||||
|
||||
[database]
|
||||
connection = mysql://nova:nova@localhost/nova
|
||||
max_retries = -1
|
||||
|
||||
[keystone_authtoken]
|
||||
auth_host = 127.0.0.1
|
||||
auth_port = 35357
|
||||
auth_protocol = http
|
||||
15
nova-ifc-template
Normal file
15
nova-ifc-template
Normal file
@ -0,0 +1,15 @@
|
||||
DEVICE="{{ name }}"
|
||||
NM_CONTROLLED="no"
|
||||
ONBOOT=yes
|
||||
TYPE=Ethernet
|
||||
BOOTPROTO=static
|
||||
IPADDR={{ address }}
|
||||
NETMASK={{ netmask }}
|
||||
BROADCAST={{ broadcast }}
|
||||
GATEWAY={{ gateway }}
|
||||
DNS1={{ dns }}
|
||||
|
||||
#if $use_ipv6
|
||||
IPV6INIT=yes
|
||||
IPV6ADDR={{ address_v6 }}
|
||||
#end if
|
||||
65
nova-migration-wrapper
Normal file
65
nova-migration-wrapper
Normal file
@ -0,0 +1,65 @@
|
||||
#!/usr/bin/python2
|
||||
import os
|
||||
import sys
|
||||
import syslog
|
||||
|
||||
command = os.environ.get('SSH_ORIGINAL_COMMAND')
|
||||
ssh_connection = os.environ.get('SSH_CONNECTION')
|
||||
if command is None:
|
||||
sys.stderr.write('This command must be run via SSH ForceCommand (see man 5 sshd_config).\n')
|
||||
sys.exit(1)
|
||||
|
||||
syslog.openlog('nova_migration_wrapper')
|
||||
|
||||
def allow_command(user, args):
|
||||
syslog.syslog(syslog.LOG_INFO, "Allowing connection='{}' command={} ".format(
|
||||
ssh_connection,
|
||||
repr(args)
|
||||
))
|
||||
os.execlp('sudo', 'sudo', '-u', user, *args)
|
||||
|
||||
def deny_command(args):
|
||||
syslog.syslog(syslog.LOG_ERR, "Denying connection='{}' command={}".format(
|
||||
ssh_connection,
|
||||
repr(args)
|
||||
))
|
||||
sys.stderr.write('Forbidden\n')
|
||||
sys.exit(1)
|
||||
|
||||
# Handle libvirt ssh tunnel script snippet
|
||||
# https://github.com/libvirt/libvirt/blob/f0803dae93d62a4b8a2f67f4873c290a76d978b3/src/rpc/virnetsocket.c#L890
|
||||
libvirt_sock = '/var/run/libvirt/libvirt-sock'
|
||||
live_migration_tunnel_cmd = "sh -c 'if 'nc' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then " \
|
||||
"ARG=-q0;" \
|
||||
"else " \
|
||||
"ARG=;" \
|
||||
"fi;" \
|
||||
"'nc' $ARG -U {}'".format(libvirt_sock)
|
||||
|
||||
cold_migration_root = '/var/lib/nova/instances/'
|
||||
cold_migration_cmds = [
|
||||
['mkdir', '-p'],
|
||||
['rm', '-rf'],
|
||||
['touch'],
|
||||
['rm'],
|
||||
['scp', '-r', '-t'],
|
||||
['scp', '-r', '-f'],
|
||||
['scp', '-t'],
|
||||
['scp', '-f'],
|
||||
]
|
||||
rootwrap_args = ['/usr/bin/nova-rootwrap', '/etc/nova/migration/rootwrap.conf']
|
||||
|
||||
def validate_cold_migration_cmd(args):
|
||||
target_path = os.path.normpath(args[-1])
|
||||
cmd = args[:-1]
|
||||
return cmd in cold_migration_cmds and target_path.startswith(cold_migration_root)
|
||||
|
||||
# Rules
|
||||
args = command.split(' ')
|
||||
if command == live_migration_tunnel_cmd:
|
||||
args = ['nc', '-U', libvirt_sock]
|
||||
allow_command('nova', args)
|
||||
if validate_cold_migration_cmd(args):
|
||||
args = rootwrap_args + args
|
||||
allow_command('root', args)
|
||||
deny_command(args)
|
||||
4
nova-ssh-config
Normal file
4
nova-ssh-config
Normal file
@ -0,0 +1,4 @@
|
||||
Host *
|
||||
User nova_migration
|
||||
UserKnownHostsFile /dev/null
|
||||
IdentityFile /etc/nova/migration/identity
|
||||
4
nova-sudoers
Normal file
4
nova-sudoers
Normal file
@ -0,0 +1,4 @@
|
||||
Defaults:nova !requiretty
|
||||
|
||||
nova ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf *
|
||||
nova ALL = (root) NOPASSWD: /usr/bin/privsep-helper *
|
||||
7
nova.logrotate
Normal file
7
nova.logrotate
Normal file
@ -0,0 +1,7 @@
|
||||
/var/log/nova/*.log {
|
||||
rotate 14
|
||||
size 10M
|
||||
missingok
|
||||
compress
|
||||
copytruncate
|
||||
}
|
||||
6
nova_migration-rootwrap.conf
Normal file
6
nova_migration-rootwrap.conf
Normal file
@ -0,0 +1,6 @@
|
||||
[DEFAULT]
|
||||
use_syslog=True
|
||||
syslog_log_facility=syslog
|
||||
syslog_log_level=ERROR
|
||||
filters_path=/etc/nova/migration/rootwrap.d
|
||||
|
||||
9
nova_migration-rootwrap_cold_migration
Normal file
9
nova_migration-rootwrap_cold_migration
Normal file
@ -0,0 +1,9 @@
|
||||
[Filters]
|
||||
create_file: PathFilter, /usr/bin/touch, nova, /var/lib/nova/instances/
|
||||
remove_file: PathFilter, /usr/bin/rm, nova, /var/lib/nova/instances/
|
||||
create_dir: PathFilter, /usr/bin/mkdir, nova, -p, /var/lib/nova/instances/
|
||||
remove_dir: PathFilter, /usr/bin/rm, nova, -rf, /var/lib/nova/instances/
|
||||
copy_file_local_to_remote_recursive: PathFilter, /usr/bin/scp, nova, -r, -t, /var/lib/nova/instances/
|
||||
copy_file_remote_to_local_recursive: PathFilter, /usr/bin/scp, nova, -r, -f, /var/lib/nova/instances/
|
||||
copy_file_local_to_remote: PathFilter, /usr/bin/scp, nova, -t, /var/lib/nova/instances/
|
||||
copy_file_remote_to_local: PathFilter, /usr/bin/scp, nova, -f, /var/lib/nova/instances/
|
||||
4
nova_migration-sudoers
Normal file
4
nova_migration-sudoers
Normal file
@ -0,0 +1,4 @@
|
||||
Defaults:nova_migration !requiretty
|
||||
|
||||
nova_migration ALL = (nova) NOPASSWD: /usr/bin/nc -U /var/run/libvirt/libvirt-sock
|
||||
nova_migration ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/migration/rootwrap.conf *
|
||||
4
nova_migration_authorized_keys
Normal file
4
nova_migration_authorized_keys
Normal file
@ -0,0 +1,4 @@
|
||||
# SSH authorized_keys file for Openstack Nova migration
|
||||
#
|
||||
# This controls with hosts are allowed to migration VMs to this host.
|
||||
# Append the SSH public keys of authorized hosts to this file.
|
||||
6
nova_migration_identity
Normal file
6
nova_migration_identity
Normal file
@ -0,0 +1,6 @@
|
||||
# SSH identity file (private key) for Openstack Nova migration
|
||||
#
|
||||
# Generate an ssh key pair for this host.
|
||||
# Add the private key (e.g id_rsa) to this file.
|
||||
# Add the public key (e.g id_rsa.pub) to /etc/nova/migration/authorized_keys
|
||||
# on the migration target hosts.
|
||||
15
openstack-nova-api.service
Normal file
15
openstack-nova-api.service
Normal 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
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
16
openstack-nova-compute.service
Normal file
16
openstack-nova-compute.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=OpenStack Nova Compute Server
|
||||
After=syslog.target network.target libvirtd.service
|
||||
|
||||
[Service]
|
||||
Environment=LIBGUESTFS_ATTACH_METHOD=appliance
|
||||
Type=notify
|
||||
NotifyAccess=all
|
||||
TimeoutStartSec=0
|
||||
Restart=always
|
||||
User=nova
|
||||
ExecStart=/usr/bin/nova-compute
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
15
openstack-nova-conductor.service
Normal file
15
openstack-nova-conductor.service
Normal 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
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
15
openstack-nova-metadata-api.service
Normal file
15
openstack-nova-metadata-api.service
Normal 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
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
13
openstack-nova-novncproxy.service
Normal file
13
openstack-nova-novncproxy.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=OpenStack Nova NoVNC Proxy Server
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nova
|
||||
EnvironmentFile=-/etc/sysconfig/openstack-nova-novncproxy
|
||||
ExecStart=/usr/bin/nova-novncproxy --web /usr/share/novnc/ $OPTIONS
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
2
openstack-nova-novncproxy.sysconfig
Normal file
2
openstack-nova-novncproxy.sysconfig
Normal file
@ -0,0 +1,2 @@
|
||||
# You may specify other parameters to the nova-novncproxy here
|
||||
#OPTIONS=
|
||||
14
openstack-nova-os-compute-api.service
Normal file
14
openstack-nova-os-compute-api.service
Normal 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
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
15
openstack-nova-scheduler.service
Normal file
15
openstack-nova-scheduler.service
Normal 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
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
13
openstack-nova-serialproxy.service
Normal file
13
openstack-nova-serialproxy.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=OpenStack Nova Serial Proxy Server
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nova
|
||||
ExecStart=/usr/bin/nova-serialproxy
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
13
openstack-nova-spicehtml5proxy.service
Normal file
13
openstack-nova-spicehtml5proxy.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=OpenStack Nova Spice HTML5 Proxy Server
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=nova
|
||||
ExecStart=/usr/bin/nova-spicehtml5proxy
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
610
openstack-nova.spec
Normal file
610
openstack-nova.spec
Normal file
@ -0,0 +1,610 @@
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
%global with_doc 0
|
||||
%global distro openEuler
|
||||
%global qemu_version 3.1.0
|
||||
%global libvirt_version 5.0.0
|
||||
|
||||
Name: openstack-nova
|
||||
Epoch: 1
|
||||
Version: 22.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: OpenStack Compute (nova)
|
||||
License: Apache-2.0
|
||||
URL: http://openstack.org/projects/compute/
|
||||
Source0: https://tarballs.openstack.org/nova/nova-%{upstream_version}.tar.gz
|
||||
Source1: nova-dist.conf
|
||||
Source6: nova.logrotate
|
||||
Source10: openstack-nova-api.service
|
||||
Source12: openstack-nova-compute.service
|
||||
Source15: openstack-nova-scheduler.service
|
||||
Source25: openstack-nova-metadata-api.service
|
||||
Source26: openstack-nova-conductor.service
|
||||
Source28: openstack-nova-spicehtml5proxy.service
|
||||
Source29: openstack-nova-novncproxy.service
|
||||
Source31: openstack-nova-serialproxy.service
|
||||
Source32: openstack-nova-os-compute-api.service
|
||||
Source22: nova-ifc-template
|
||||
Source24: nova-sudoers
|
||||
Source30: openstack-nova-novncproxy.sysconfig
|
||||
Source34: policy.json
|
||||
Source35: nova_migration-sudoers
|
||||
Source36: nova-ssh-config
|
||||
Source37: nova-migration-wrapper
|
||||
Source38: nova_migration_identity
|
||||
Source39: nova_migration_authorized_keys
|
||||
Source40: nova_migration-rootwrap.conf
|
||||
Source41: nova_migration-rootwrap_cold_migration
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: openstack-macros
|
||||
BuildRequires: intltool
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: git
|
||||
BuildRequires: python3-oslo-cache
|
||||
BuildRequires: python3-os-traits
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-netaddr
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-oslo-i18n
|
||||
BuildRequires: python3-cryptography >= 2.1
|
||||
BuildRequires: python3-oslo-policy
|
||||
BuildRequires: python3-barbicanclient
|
||||
BuildRequires: python3-ddt
|
||||
BuildRequires: python3-ironicclient
|
||||
BuildRequires: python3-os-testr
|
||||
BuildRequires: python3-os-vif
|
||||
BuildRequires: python3-oslo-rootwrap
|
||||
BuildRequires: python3-oslotest
|
||||
BuildRequires: python3-osprofiler
|
||||
BuildRequires: python3-subunit
|
||||
BuildRequires: python3-testrepository
|
||||
BuildRequires: python3-testresources
|
||||
BuildRequires: python3-testscenarios
|
||||
BuildRequires: python3-tooz
|
||||
BuildRequires: python3-oslo-vmware
|
||||
BuildRequires: python3-cursive
|
||||
BuildRequires: python3-os-service-types
|
||||
BuildRequires: python3-os-resource-classes
|
||||
|
||||
BuildRequires: python3-requests-mock
|
||||
BuildRequires: /usr/bin/pathfix.py
|
||||
|
||||
Requires: openstack-nova-compute = %{epoch}:%{version}-%{release}
|
||||
Requires: openstack-nova-scheduler = %{epoch}:%{version}-%{release}
|
||||
Requires: openstack-nova-api = %{epoch}:%{version}-%{release}
|
||||
Requires: openstack-nova-conductor = %{epoch}:%{version}-%{release}
|
||||
Requires: openstack-nova-novncproxy = %{epoch}:%{version}-%{release}
|
||||
Requires: openstack-nova-migration = %{epoch}:%{version}-%{release}
|
||||
%description
|
||||
OpenStack Compute (Nova)
|
||||
|
||||
%package common
|
||||
Summary: Components common to all OpenStack Nova services
|
||||
Obsoletes: openstack-nova-cert <= 1:16.0.0-1
|
||||
Obsoletes: openstack-nova-cells < 1:20.0.0
|
||||
Requires: python3-nova = %{epoch}:%{version}-%{release}
|
||||
%{?systemd_ordering}
|
||||
Requires(pre): shadow-utils
|
||||
BuildRequires: systemd
|
||||
BuildRequires: python3-castellan >= 0.16.0
|
||||
BuildRequires: python3-glanceclient
|
||||
BuildRequires: python3-keystonemiddleware
|
||||
BuildRequires: python3-microversion-parse >= 0.2.1
|
||||
BuildRequires: python3-os-brick
|
||||
BuildRequires: python3-oslo-db
|
||||
BuildRequires: python3-oslo-reports
|
||||
BuildRequires: python3-oslo-service
|
||||
BuildRequires: python3-oslo-versionedobjects
|
||||
BuildRequires: python3-paramiko
|
||||
BuildRequires: python3-babel
|
||||
BuildRequires: python3-lxml
|
||||
BuildRequires: python3-websockify >= 0.9.0
|
||||
|
||||
|
||||
%description common
|
||||
OpenStack Compute (Nova)
|
||||
This package contains scripts, config and dependencies shared
|
||||
between all the OpenStack nova services.
|
||||
|
||||
%package compute
|
||||
Summary: OpenStack Nova Virtual Machine control service
|
||||
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
|
||||
Requires: curl
|
||||
Requires: iscsi-initiator-utils
|
||||
Requires: iptables
|
||||
Requires: iptables-services
|
||||
Requires: ipmitool
|
||||
Requires: /usr/bin/virsh
|
||||
Requires: openssh-clients
|
||||
Requires: rsync
|
||||
Requires: lvm2
|
||||
Requires: python3-cinderclient >= 3.3.0
|
||||
Requires: genisoimage
|
||||
Requires(pre): qemu >= %{qemu_version}
|
||||
Requires(pre): qemu-block-rbd >= %{qemu_version}
|
||||
Requires(pre): qemu-block-ssh >= %{qemu_version}
|
||||
Requires(pre): python3-libvirt >= %{libvirt_version}
|
||||
Requires(pre): libvirt-daemon-driver-nodedev >= %{libvirt_version}
|
||||
Requires(pre): libvirt-daemon-driver-nwfilter >= %{libvirt_version}
|
||||
Requires(pre): libvirt-daemon-driver-secret >= %{libvirt_version}
|
||||
Requires(pre): libvirt-daemon-driver-qemu >= %{libvirt_version}
|
||||
Requires(pre): libvirt-daemon-driver-storage-core >= %{libvirt_version}
|
||||
|
||||
Requires: sg3_utils
|
||||
Requires: sysfsutils
|
||||
Requires: libosinfo
|
||||
Requires: python3-libguestfs
|
||||
Requires: python3-libvirt
|
||||
|
||||
%description compute
|
||||
OpenStack Compute (Nova)
|
||||
This package contains the Nova service for controlling Virtual Machines.
|
||||
|
||||
%package scheduler
|
||||
Summary: OpenStack Nova VM distribution service
|
||||
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description scheduler
|
||||
OpenStack Compute (Nova)
|
||||
This package contains the service for scheduling where
|
||||
to run Virtual Machines in the cloud.
|
||||
|
||||
%package api
|
||||
Summary: OpenStack Nova API services
|
||||
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
|
||||
Requires: python3-cinderclient >= 3.3.0
|
||||
|
||||
%description api
|
||||
OpenStack Compute (Nova)
|
||||
This package contains the Nova services providing programmatic access.
|
||||
|
||||
%package conductor
|
||||
Summary: OpenStack Nova Conductor services
|
||||
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description conductor
|
||||
OpenStack Compute (Nova)
|
||||
This package contains the Nova services providing database access for
|
||||
the compute service
|
||||
|
||||
%package novncproxy
|
||||
Summary: OpenStack Nova noVNC proxy service
|
||||
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
|
||||
Requires: novnc
|
||||
Requires: python3-websockify >= 0.9.0
|
||||
|
||||
%description novncproxy
|
||||
OpenStack Compute (Nova)
|
||||
This package contains the Nova noVNC Proxy service that can proxy
|
||||
VNC traffic over browser websockets connections.
|
||||
|
||||
%package spicehtml5proxy
|
||||
Summary: OpenStack Nova Spice HTML5 console access service
|
||||
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
|
||||
Requires: python3-websockify >= 0.9.0
|
||||
|
||||
%description spicehtml5proxy
|
||||
OpenStack Compute (Nova)
|
||||
This package contains the Nova services providing the
|
||||
spice HTML5 console access service to Virtual Machines.
|
||||
|
||||
%package serialproxy
|
||||
Summary: OpenStack Nova serial console access service
|
||||
Requires: openstack-nova-common = %{epoch}:%{version}-%{release}
|
||||
Requires: python3-websockify >= 0.9.0
|
||||
|
||||
%description serialproxy
|
||||
OpenStack Compute (Nova)
|
||||
This package contains the Nova services providing the
|
||||
serial console access service to Virtual Machines.
|
||||
|
||||
%package migration
|
||||
Summary: OpenStack Nova Migration
|
||||
Requires: openstack-nova-compute = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description migration
|
||||
OpenStack Compute (Nova)
|
||||
This package contains scripts and config to support VM migration in Nova.
|
||||
|
||||
%package -n python3-nova
|
||||
Summary: Nova Python libraries
|
||||
%{?python_provide:%python_provide python3-nova}
|
||||
Requires: openssl
|
||||
Requires: openssh
|
||||
Requires: sudo
|
||||
Requires: python3-paramiko >= 2.7.1
|
||||
Requires: python3-eventlet >= 0.22.0
|
||||
Requires: python3-iso8601 >= 0.1.11
|
||||
Requires: python3-netaddr >= 0.7.18
|
||||
Requires: python3-boto
|
||||
Requires: python3-stevedore >= 1.20.0
|
||||
Requires: python3-sqlalchemy
|
||||
Requires: python3-alembic >= 0.8.0
|
||||
Requires: python3-routes >= 2.3.1
|
||||
Requires: python3-webob >= 1.8.2
|
||||
Requires: python3-castellan >= 0.16.0
|
||||
Requires: python3-cryptography >= 2.7
|
||||
Requires: python3-cursive >= 0.2.1
|
||||
Requires: python3-dataclasses >= 0.7
|
||||
Requires: python3-glanceclient >= 1:2.8.0
|
||||
Requires: python3-greenlet >= 0.4.13
|
||||
Requires: python3-keystonemiddleware >= 4.20.0
|
||||
Requires: python3-keystoneauth1 >= 3.16.0
|
||||
Requires: python3-jinja2
|
||||
Requires: python3-jsonschema >= 2.6.0
|
||||
Requires: python3-microversion-parse >= 0.2.1
|
||||
Requires: python3-neutronclient >= 6.7.0
|
||||
Requires: python3-novaclient >= 2.30.1
|
||||
Requires: python3-openstacksdk >= 0.35.0
|
||||
Requires: python3-os-brick >= 3.1.0
|
||||
Requires: python3-os-resource-classes >= 0.4.0
|
||||
Requires: python3-os-traits >= 2.4.0
|
||||
Requires: python3-oslo-cache >= 1.26.0
|
||||
Requires: python3-oslo-concurrency >= 3.29.0
|
||||
Requires: python3-oslo-config >= 6.8.0
|
||||
Requires: python3-oslo-context >= 2.22.0
|
||||
Requires: python3-oslo-db >= 4.44.0
|
||||
Requires: python3-oslo-i18n >= 3.15.3
|
||||
Requires: python3-oslo-log >= 3.36.0
|
||||
Requires: python3-oslo-messaging >= 10.3.0
|
||||
Requires: python3-oslo-middleware >= 3.31.0
|
||||
Requires: python3-oslo-policy >= 3.4.0
|
||||
Requires: python3-oslo-privsep >= 1.33.2
|
||||
Requires: python3-oslo-reports >= 1.18.0
|
||||
Requires: python3-oslo-rootwrap >= 5.8.0
|
||||
Requires: python3-oslo-serialization >= 2.21.1
|
||||
Requires: python3-oslo-service >= 1.40.1
|
||||
Requires: python3-oslo-upgradecheck >= 0.1.1
|
||||
Requires: python3-oslo-utils >= 4.5.0
|
||||
Requires: python3-oslo-versionedobjects >= 1.35.0
|
||||
Requires: python3-os-vif >= 1.14.0
|
||||
Requires: python3-oslo-vmware >= 1.16.0
|
||||
Requires: python3-pbr
|
||||
Requires: python3-prettytable >= 0.7.1
|
||||
Requires: python3-psutil
|
||||
Requires: python3-requests >= 2.22.0
|
||||
Requires: python3-rfc3986 >= 1.2.0
|
||||
Requires: python3-six >= 1.11.0
|
||||
Requires: python3-taskflow >= 3.8.0
|
||||
Requires: python3-tooz >= 1.58.0
|
||||
Requires: python3-os-service-types >= 1.7.0
|
||||
Requires: python3-dateutil >= 2.5.3
|
||||
Requires: python3-futurist >= 1.8.0
|
||||
Requires: python3-decorator >= 4.1.0
|
||||
Requires: python3-lxml >= 4.2.3
|
||||
Requires: python3-ldap
|
||||
Requires: python3-memcached
|
||||
Requires: python3-migrate >= 0.13.0
|
||||
Requires: python3-paste
|
||||
Requires: python3-paste-deploy >= 1.5.0
|
||||
Requires: python3-netifaces >= 0.10.4
|
||||
Requires: python3-retrying
|
||||
%if 0%{?rhel} == 8
|
||||
Requires: python3-PyYAML
|
||||
%else
|
||||
Requires: python3-PyYAML >= 3.13
|
||||
%endif
|
||||
|
||||
%description -n python3-nova
|
||||
OpenStack Compute (Nova)
|
||||
This package contains the nova Python library.
|
||||
|
||||
%package -n python3-nova-tests
|
||||
Summary: Nova tests
|
||||
%{?python_provide:%python_provide python3-nova-tests}
|
||||
Requires: openstack-nova = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description -n python3-nova-tests
|
||||
OpenStack Compute (Nova)
|
||||
This package contains the nova Python library.
|
||||
|
||||
%if 0%{?with_doc}
|
||||
%package doc
|
||||
Summary: Documentation for OpenStack Compute
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: python3-openstackdocstheme
|
||||
BuildRequires: python3-sphinxcontrib-actdiag
|
||||
BuildRequires: python3-sphinxcontrib-seqdiag
|
||||
BuildRequires: python3-boto
|
||||
BuildRequires: python3-eventlet
|
||||
BuildRequires: python3-barbicanclient
|
||||
BuildRequires: python3-cinderclient
|
||||
BuildRequires: python3-keystoneclient
|
||||
BuildRequires: python3-neutronclient
|
||||
BuildRequires: python3-os-win
|
||||
BuildRequires: python3-oslo-config
|
||||
BuildRequires: python3-oslo-log
|
||||
BuildRequires: python3-oslo-messaging
|
||||
BuildRequires: python3-oslo-utils
|
||||
BuildRequires: python3-rfc3986 >= 1.1.0
|
||||
BuildRequires: python3-routes
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: python3-sphinxcontrib-actdiag
|
||||
BuildRequires: python3-sphinxcontrib-seqdiag
|
||||
BuildRequires: python3-sqlalchemy
|
||||
BuildRequires: python3-webob
|
||||
BuildRequires: python3-iso8601
|
||||
BuildRequires: python3-redis
|
||||
BuildRequires: python3-zmq
|
||||
BuildRequires: python3-migrate
|
||||
|
||||
%description doc
|
||||
OpenStack Compute (Nova)
|
||||
This package contains documentation files for nova.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n nova-%{upstream_version} -S git
|
||||
|
||||
find . \( -name .gitignore -o -name .placeholder \) -delete
|
||||
find nova -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
|
||||
%py_req_cleanup
|
||||
|
||||
%build
|
||||
PYTHONPATH=. oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
|
||||
PYTHONPATH=. oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf
|
||||
|
||||
%{py3_build}
|
||||
%{__python3} setup.py compile_catalog -d build/lib/nova/locale -D nova
|
||||
sed -i 's|group/name|group;name|; s|\[DEFAULT\]/|DEFAULT;|' etc/nova/nova.conf.sample
|
||||
sed -i '/^[^#[]/{s/^/#/; s/ //g}; /^#[^ ]/s/ = /=/' etc/nova/nova.conf.sample
|
||||
|
||||
while read name eq value; do
|
||||
test "$name" && test "$value" || continue
|
||||
sed -i "0,/^# *$name=/{s!^# *$name=.*!#$name=$value!}" etc/nova/nova.conf.sample
|
||||
done < %{SOURCE1}
|
||||
|
||||
%install
|
||||
%{py3_install}
|
||||
|
||||
export PYTHONPATH=.
|
||||
%if 0%{?with_doc}
|
||||
sphinx-build -b html doc/source doc/build/html
|
||||
rm -rf doc/build/html/.{doctrees,buildinfo}
|
||||
%endif
|
||||
|
||||
%if 0%{?with_doc}
|
||||
sphinx-build -b man doc/source doc/build/man
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
install -p -D -m 644 doc/build/man/*.1 %{buildroot}%{_mandir}/man1/
|
||||
%endif
|
||||
|
||||
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova
|
||||
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/buckets
|
||||
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/instances
|
||||
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/keys
|
||||
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/networks
|
||||
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/tmp
|
||||
install -d -m 750 %{buildroot}%{_localstatedir}/log/nova
|
||||
install -d -m 700 %{buildroot}%{_sharedstatedir}/nova/.ssh
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/nova
|
||||
install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datarootdir}/nova/nova-dist.conf
|
||||
install -p -D -m 640 etc/nova/nova.conf.sample %{buildroot}%{_sysconfdir}/nova/nova.conf
|
||||
install -p -D -m 640 etc/nova/rootwrap.conf %{buildroot}%{_sysconfdir}/nova/rootwrap.conf
|
||||
install -p -D -m 640 etc/nova/api-paste.ini %{buildroot}%{_sysconfdir}/nova/api-paste.ini
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/nova/migration
|
||||
install -p -D -m 600 %{SOURCE38} %{buildroot}%{_sysconfdir}/nova/migration/identity
|
||||
install -p -D -m 644 %{SOURCE39} %{buildroot}%{_sysconfdir}/nova/migration/authorized_keys
|
||||
install -p -D -m 640 %{SOURCE40} %{buildroot}%{_sysconfdir}/nova/migration/rootwrap.conf
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/nova/migration/rootwrap.d
|
||||
install -p -D -m 640 %{SOURCE41} %{buildroot}%{_sysconfdir}/nova/migration/rootwrap.d/cold_migration.filters
|
||||
install -p -D -m 640 %{SOURCE34} %{buildroot}%{_sysconfdir}/nova/policy.json
|
||||
|
||||
cat > %{buildroot}%{_sysconfdir}/nova/release <<EOF
|
||||
[Nova]
|
||||
vendor = %{distro}
|
||||
product = OpenStack Compute
|
||||
package = %{release}
|
||||
EOF
|
||||
|
||||
install -p -D -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/openstack-nova-api.service
|
||||
install -p -D -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/openstack-nova-compute.service
|
||||
install -p -D -m 644 %{SOURCE15} %{buildroot}%{_unitdir}/openstack-nova-scheduler.service
|
||||
install -p -D -m 644 %{SOURCE25} %{buildroot}%{_unitdir}/openstack-nova-metadata-api.service
|
||||
install -p -D -m 644 %{SOURCE26} %{buildroot}%{_unitdir}/openstack-nova-conductor.service
|
||||
install -p -D -m 644 %{SOURCE28} %{buildroot}%{_unitdir}/openstack-nova-spicehtml5proxy.service
|
||||
install -p -D -m 644 %{SOURCE29} %{buildroot}%{_unitdir}/openstack-nova-novncproxy.service
|
||||
install -p -D -m 644 %{SOURCE31} %{buildroot}%{_unitdir}/openstack-nova-serialproxy.service
|
||||
install -p -D -m 644 %{SOURCE32} %{buildroot}%{_unitdir}/openstack-nova-os-compute-api.service
|
||||
|
||||
rm -f %{buildroot}%{_bindir}/nova-network
|
||||
|
||||
install -p -D -m 440 %{SOURCE24} %{buildroot}%{_sysconfdir}/sudoers.d/nova
|
||||
install -p -D -m 440 %{SOURCE35} %{buildroot}%{_sysconfdir}/sudoers.d/nova_migration
|
||||
install -p -D -m 600 %{SOURCE36} %{buildroot}%{_sharedstatedir}/nova/.ssh/config
|
||||
install -p -D -m 755 %{SOURCE37} %{buildroot}%{_bindir}/nova-migration-wrapper
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/nova-migration-wrapper
|
||||
install -p -D -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-nova
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/run/nova
|
||||
install -p -D -m 644 %{SOURCE22} %{buildroot}%{_datarootdir}/nova/interfaces.template
|
||||
mkdir -p %{buildroot}%{_datarootdir}/nova/rootwrap/
|
||||
install -p -D -m 644 etc/nova/rootwrap.d/* %{buildroot}%{_datarootdir}/nova/rootwrap/
|
||||
install -d %{buildroot}%{_sysconfdir}/sysconfig
|
||||
install -p -m 0644 %{SOURCE30} %{buildroot}%{_sysconfdir}/sysconfig/openstack-nova-novncproxy
|
||||
install -d -m 755 %{buildroot}%{_datadir}
|
||||
rm -f %{buildroot}%{python3_sitelib}/nova/locale/*/LC_*/nova*po
|
||||
rm -f %{buildroot}%{python3_sitelib}/nova/locale/*pot
|
||||
mv %{buildroot}%{python3_sitelib}/nova/locale %{buildroot}%{_datadir}/locale
|
||||
|
||||
%find_lang nova --all-name
|
||||
|
||||
rm -f %{buildroot}%{_bindir}/nova-debug
|
||||
rm -fr %{buildroot}%{python3_sitelib}/run_tests.*
|
||||
rm -f %{buildroot}%{_bindir}/nova-combined
|
||||
rm -f %{buildroot}/usr/share/doc/nova/README*
|
||||
rm -rf %{buildroot}%{_prefix}/etc/nova
|
||||
|
||||
%if 0%{!?dlrn}
|
||||
%check
|
||||
mkdir -p os_xenapi
|
||||
touch os_xenapi/__init__.py
|
||||
cat > os_xenapi/client.py <<EOF
|
||||
class session:
|
||||
def XenAPISession():
|
||||
pass
|
||||
XenAPI = None
|
||||
exception = None
|
||||
EOF
|
||||
|
||||
OS_TEST_PATH=./nova/tests/unit ostestr -c 2 --black-regex 'xenapi|test_compute_xen'
|
||||
rm -rf os_xenapi
|
||||
%endif
|
||||
|
||||
%pre common
|
||||
getent group nova >/dev/null || groupadd -r nova --gid 162
|
||||
if ! getent passwd nova >/dev/null; then
|
||||
useradd -u 162 -r -g nova -G nova,nobody -d %{_sharedstatedir}/nova -s /sbin/nologin -c "OpenStack Nova Daemons" nova
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%pre compute
|
||||
usermod -a -G qemu nova
|
||||
usermod -a -G libvirt nova
|
||||
%pre migration
|
||||
getent group nova_migration >/dev/null || groupadd -r nova_migration
|
||||
getent passwd nova_migration >/dev/null || \
|
||||
useradd -r -g nova_migration -d / -s /bin/bash -c "OpenStack Nova Migration" nova_migration
|
||||
exit 0
|
||||
%post compute
|
||||
%systemd_post %{name}-compute.service
|
||||
%post scheduler
|
||||
%systemd_post %{name}-scheduler.service
|
||||
%post api
|
||||
%systemd_post %{name}-api.service %{name}-metadata-api.service %{name}-os-compute-api.service
|
||||
%post conductor
|
||||
%systemd_post %{name}-conductor.service
|
||||
%post novncproxy
|
||||
%systemd_post %{name}-novncproxy.service
|
||||
%post spicehtml5proxy
|
||||
%systemd_post %{name}-spicehtml5proxy.service
|
||||
%post serialproxy
|
||||
%systemd_post %{name}-serialproxy.service
|
||||
%preun compute
|
||||
%systemd_preun %{name}-compute.service
|
||||
%preun scheduler
|
||||
%systemd_preun %{name}-scheduler.service
|
||||
%preun api
|
||||
%systemd_preun %{name}-api.service %{name}-metadata-api.service %{name}-os-compute-api.service
|
||||
%preun conductor
|
||||
%systemd_preun %{name}-conductor.service
|
||||
%preun novncproxy
|
||||
%systemd_preun %{name}-novncproxy.service
|
||||
%preun spicehtml5proxy
|
||||
%systemd_preun %{name}-spicehtml5proxy.service
|
||||
%preun serialproxy
|
||||
%systemd_preun %{name}-serialproxy.service
|
||||
%postun compute
|
||||
%systemd_postun_with_restart %{name}-compute.service
|
||||
%postun scheduler
|
||||
%systemd_postun_with_restart %{name}-scheduler.service
|
||||
%postun api
|
||||
%systemd_postun_with_restart %{name}-api.service %{name}-metadata-api.service %{name}-os-compute-api.service
|
||||
%postun conductor
|
||||
%systemd_postun_with_restart %{name}-conductor.service
|
||||
%postun novncproxy
|
||||
%systemd_postun_with_restart %{name}-novncproxy.service
|
||||
%postun spicehtml5proxy
|
||||
%systemd_postun_with_restart %{name}-spicehtml5proxy.service
|
||||
%postun serialproxy
|
||||
%systemd_postun_with_restart %{name}-serialproxy.service
|
||||
%files
|
||||
%files common -f nova.lang
|
||||
%license LICENSE
|
||||
%doc etc/nova/policy.yaml.sample
|
||||
%dir %{_datarootdir}/nova
|
||||
%attr(-, root, nova) %{_datarootdir}/nova/nova-dist.conf
|
||||
%{_datarootdir}/nova/interfaces.template
|
||||
%dir %{_sysconfdir}/nova
|
||||
%{_sysconfdir}/nova/release
|
||||
%config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/nova.conf
|
||||
%config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/api-paste.ini
|
||||
%config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/rootwrap.conf
|
||||
%config(noreplace) %attr(-, root, nova) %{_sysconfdir}/nova/policy.json
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-nova
|
||||
%config(noreplace) %{_sysconfdir}/sudoers.d/nova
|
||||
|
||||
%dir %attr(0750, nova, root) %{_localstatedir}/log/nova
|
||||
%dir %attr(0755, nova, root) %{_localstatedir}/run/nova
|
||||
|
||||
%{_bindir}/nova-manage
|
||||
%{_bindir}/nova-policy
|
||||
%{_bindir}/nova-rootwrap
|
||||
%{_bindir}/nova-rootwrap-daemon
|
||||
%{_bindir}/nova-status
|
||||
|
||||
%if 0%{?with_doc}
|
||||
%{_mandir}/man1/nova*.1.gz
|
||||
%endif
|
||||
|
||||
%defattr(-, nova, nova, -)
|
||||
%dir %{_sharedstatedir}/nova
|
||||
%dir %{_sharedstatedir}/nova/buckets
|
||||
%dir %{_sharedstatedir}/nova/instances
|
||||
%dir %{_sharedstatedir}/nova/keys
|
||||
%dir %{_sharedstatedir}/nova/networks
|
||||
%dir %{_sharedstatedir}/nova/tmp
|
||||
|
||||
%files compute
|
||||
%{_bindir}/nova-compute
|
||||
%{_unitdir}/openstack-nova-compute.service
|
||||
%{_datarootdir}/nova/rootwrap/compute.filters
|
||||
|
||||
%files scheduler
|
||||
%{_bindir}/nova-scheduler
|
||||
%{_unitdir}/openstack-nova-scheduler.service
|
||||
|
||||
%files api
|
||||
%{_bindir}/nova-api*
|
||||
%{_bindir}/nova-metadata-wsgi
|
||||
%{_unitdir}/openstack-nova-*api.service
|
||||
|
||||
%files conductor
|
||||
%{_bindir}/nova-conductor
|
||||
%{_unitdir}/openstack-nova-conductor.service
|
||||
|
||||
%files novncproxy
|
||||
%{_bindir}/nova-novncproxy
|
||||
%{_unitdir}/openstack-nova-novncproxy.service
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/openstack-nova-novncproxy
|
||||
|
||||
%files spicehtml5proxy
|
||||
%{_bindir}/nova-spicehtml5proxy
|
||||
%{_unitdir}/openstack-nova-spicehtml5proxy.service
|
||||
|
||||
%files serialproxy
|
||||
%{_bindir}/nova-serialproxy
|
||||
%{_unitdir}/openstack-nova-serialproxy.service
|
||||
|
||||
%files migration
|
||||
%{_bindir}/nova-migration-wrapper
|
||||
%config(noreplace) %{_sysconfdir}/sudoers.d/nova_migration
|
||||
%dir %attr(0700, nova, nova) %{_sharedstatedir}/nova/.ssh
|
||||
%attr(0600, nova, nova) %{_sharedstatedir}/nova/.ssh/config
|
||||
%dir %{_sysconfdir}/nova/migration
|
||||
%config(noreplace) %attr(0640, root, nova_migration) %{_sysconfdir}/nova/migration/authorized_keys
|
||||
%config(noreplace) %attr(0600, nova, nova) %{_sysconfdir}/nova/migration/identity
|
||||
%config(noreplace) %attr(0640, root, root) %{_sysconfdir}/nova/migration/rootwrap.conf
|
||||
%dir %{_sysconfdir}/nova/migration/rootwrap.d
|
||||
%config(noreplace) %attr(0640, root, root) %{_sysconfdir}/nova/migration/rootwrap.d/cold_migration.filters
|
||||
|
||||
%files -n python3-nova
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/nova
|
||||
%{python3_sitelib}/nova-*.egg-info
|
||||
%exclude %{python3_sitelib}/nova/tests
|
||||
|
||||
%files -n python3-nova-tests
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/nova/tests
|
||||
|
||||
%if 0%{?with_doc}
|
||||
%files doc
|
||||
%license LICENSE
|
||||
%doc doc/build/html
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jan 15 2021 joec88 <joseph.chn1988@gmail.com>
|
||||
- openEuler build version
|
||||
2
policy.json
Normal file
2
policy.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user