neutron: Fix build
- Add ovn-metadata-agent Change-Id: I72fbd842c5acccdb9e5349d3763f6df7374b0d7b
This commit is contained in:
parent
43fd4c71c8
commit
c2eb437700
|
@ -1,4 +1,4 @@
|
|||
From fb369bcf6764ad480cfd564c303edbe6158ac003 Mon Sep 17 00:00:00 2001
|
||||
From 89f96f408ac3988d455b0394b50082395b7643a8 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Bechtold <tbechtold@suse.com>
|
||||
Date: Wed, 11 Sep 2019 10:11:13 +0200
|
||||
Subject: [PATCH] Use sys.executable instead of 'python'
|
||||
|
@ -12,10 +12,10 @@ Change-Id: Iae44aa2f1c336a0f5501312af05b0133193c5462
|
|||
---
|
||||
neutron/agent/linux/daemon.py | 2 +-
|
||||
.../agent/linux/test_process_monitor.py | 3 +-
|
||||
.../functional/cmd/test_netns_cleanup.py | 7 +++--
|
||||
.../functional/cmd/test_netns_cleanup.py | 8 +++--
|
||||
.../unit/agent/common/test_async_process.py | 3 +-
|
||||
neutron/tests/unit/agent/linux/test_daemon.py | 29 ++++++++++---------
|
||||
5 files changed, 25 insertions(+), 19 deletions(-)
|
||||
5 files changed, 26 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/neutron/agent/linux/daemon.py b/neutron/agent/linux/daemon.py
|
||||
index 97194c3a00..0b52c3f980 100644
|
||||
|
@ -52,7 +52,7 @@ index 92d683c693..cd8e82e5de 100644
|
|||
"--pid_file=%s" % pidfile]
|
||||
return cmdline
|
||||
diff --git a/neutron/tests/functional/cmd/test_netns_cleanup.py b/neutron/tests/functional/cmd/test_netns_cleanup.py
|
||||
index d60ea6212e..56312f0bf7 100644
|
||||
index 495b98989e..9026e60bb5 100644
|
||||
--- a/neutron/tests/functional/cmd/test_netns_cleanup.py
|
||||
+++ b/neutron/tests/functional/cmd/test_netns_cleanup.py
|
||||
@@ -14,6 +14,7 @@
|
||||
|
@ -61,28 +61,29 @@ index d60ea6212e..56312f0bf7 100644
|
|||
import os
|
||||
+import sys
|
||||
|
||||
import eventlet
|
||||
import mock
|
||||
from neutron_lib import constants as n_const
|
||||
@@ -100,19 +101,19 @@ class NetnsCleanupTest(base.BaseSudoTestCase):
|
||||
@@ -110,19 +111,20 @@ class NetnsCleanupTest(base.BaseSudoTestCase):
|
||||
to test the cleanup functionality which will issue a SIGKILL
|
||||
to all remaining processes after the SIGTERM attempt
|
||||
"""
|
||||
- commands = [['python', process_spawn.__file__,
|
||||
+ commands = [[sys.executable, process_spawn.__file__,
|
||||
+ python_exec = os.path.basename(sys.executable)
|
||||
+ commands = [[python_exec, process_spawn.__file__,
|
||||
'-n', NUM_SUBPROCESSES,
|
||||
'-f', n_const.IPv4,
|
||||
'-p', n_const.PROTO_NAME_TCP,
|
||||
'--noignore_sigterm',
|
||||
'--parent_listen'],
|
||||
- ['python', process_spawn.__file__,
|
||||
+ [sys.executable, process_spawn.__file__,
|
||||
+ [python_exec, process_spawn.__file__,
|
||||
'-n', NUM_SUBPROCESSES,
|
||||
'-f', process_spawn.UNIX_FAMILY,
|
||||
'-p', n_const.PROTO_NAME_TCP,
|
||||
'--noignore_sigterm',
|
||||
'--noparent_listen'],
|
||||
- ['python', process_spawn.__file__,
|
||||
+ [sys.executable, process_spawn.__file__,
|
||||
+ [python_exec, process_spawn.__file__,
|
||||
'-n', NUM_SUBPROCESSES,
|
||||
'-f', n_const.IPv4,
|
||||
'-p', n_const.PROTO_NAME_UDP,
|
||||
|
@ -203,5 +204,5 @@ index f6ef0d68ef..7c0bb9caff 100644
|
|||
|
||||
def test_fork_parent(self):
|
||||
--
|
||||
2.23.0
|
||||
2.21.1
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ Source12: openstack-neutron-rpc-server.service
|
|||
Source13: openstack-neutron-netns-cleanup.service
|
||||
Source14: openstack-neutron-linuxbridge-cleanup.service
|
||||
Source15: openstack-neutron-ovs-cleanup.service
|
||||
Source16: openstack-neutron-ovn-metadata-agent.service
|
||||
Source20: openstack-neutron-server.defaultconf
|
||||
Source21: openstack-neutron.tmpfiles
|
||||
Source22: openstack-neutron-l2-agents.modules
|
||||
|
@ -207,6 +208,15 @@ Neutron is a virtual network service for Openstack.
|
|||
|
||||
This package contains the Neutron metadata Agent.
|
||||
|
||||
%package ovn-metadata-agent
|
||||
Summary: Neutron OVN metadata Agent
|
||||
Requires: {{ py2name() }} = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description ovn-metadata-agent
|
||||
Neutron is a virtual network service for Openstack.
|
||||
|
||||
This package contains the Neutron OVN metadata Agent.
|
||||
|
||||
%package metering-agent
|
||||
Summary: Neutron metering Agent
|
||||
Requires: iptables
|
||||
|
@ -268,6 +278,7 @@ Summary: Documentation for OpenStack Networking Service
|
|||
Group: Documentation/HTML
|
||||
BuildRequires: {{ py3('Sphinx') }}
|
||||
BuildRequires: {{ py3('openstackdocstheme') }}
|
||||
BuildRequires: {{ py3('sphinx-feature-classification') }}
|
||||
BuildRequires: {{ py3('tenacity') }}
|
||||
|
||||
%description doc
|
||||
|
@ -318,6 +329,7 @@ install -p -D -m 640 etc/api-paste.ini %{buildroot}%{_sysconfdir}/{{ pypi_name }
|
|||
install -p -D -m 640 etc/l3_agent.ini %{buildroot}%{_sysconfdir}/{{ pypi_name }}/l3_agent.ini
|
||||
install -p -D -m 640 etc/dhcp_agent.ini %{buildroot}%{_sysconfdir}/{{ pypi_name }}/dhcp_agent.ini
|
||||
install -p -D -m 640 etc/metadata_agent.ini %{buildroot}%{_sysconfdir}/{{ pypi_name }}/metadata_agent.ini
|
||||
install -p -D -m 640 etc/neutron_ovn_metadata_agent.ini %{buildroot}%{_sysconfdir}/{{ pypi_name }}/ovn_metadata_agent.ini
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/{{ pypi_name }}.conf.d
|
||||
install -D -m 640 %{SOURCE20} %{buildroot}/%{_sysconfdir}/{{ pypi_name }}/{{ pypi_name }}.conf.d/010-neutron.conf
|
||||
install -D -m 440 %{SOURCE90} %{buildroot}/%{_sysconfdir}/{{ pypi_name }}/README.config
|
||||
|
@ -371,13 +383,14 @@ install -p -D -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/openstack-neutron-rpc-s
|
|||
install -p -D -m 644 %{SOURCE13} %{buildroot}%{_unitdir}/openstack-neutron-netns-cleanup.service
|
||||
install -p -D -m 644 %{SOURCE14} %{buildroot}%{_unitdir}/openstack-neutron-linuxbridge-cleanup.service
|
||||
install -p -D -m 644 %{SOURCE15} %{buildroot}%{_unitdir}/openstack-neutron-ovs-cleanup.service
|
||||
install -p -D -m 644 %{SOURCE16} %{buildroot}%{_unitdir}/openstack-neutron-ovn-metadata-agent.service
|
||||
|
||||
# Create config dirs for all services that can be populated by users with custom *.conf files
|
||||
for service in server rpc-server ovs-cleanup netns-cleanup linuxbridge-cleanup macvtap-agent; do
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/{{ pypi_name }}/neutron-$service.conf.d
|
||||
done
|
||||
# Create config dirs for all agents that can be populated by users with custom *.conf files
|
||||
for service in linuxbridge openvswitch dhcp l3 metadata metering sriov-nic; do
|
||||
for service in linuxbridge openvswitch dhcp l3 metadata metering ovn-metadata sriov-nic; do
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/{{ pypi_name }}/neutron-$service-agent.conf.d
|
||||
done
|
||||
|
||||
|
@ -458,6 +471,15 @@ python3 -m stestr.cli --test-path neutron/tests/unit run
|
|||
%postun metadata-agent
|
||||
%systemd_postun_with_restart openstack-neutron-metadata-agent.service
|
||||
|
||||
%post ovn-metadata-agent
|
||||
%systemd_post openstack-neutron-ovn-metadata-agent.service
|
||||
|
||||
%preun ovn-metadata-agent
|
||||
%systemd_preun openstack-neutron-ovn-metadata-agent.service
|
||||
|
||||
%postun ovn-metadata-agent
|
||||
%systemd_postun_with_restart openstack-neutron-ovn-metadata-agent.service
|
||||
|
||||
%post metering-agent
|
||||
%systemd_post openstack-neutron-metering-agent.service
|
||||
|
||||
|
@ -513,7 +535,6 @@ python3 -m stestr.cli --test-path neutron/tests/unit run
|
|||
%{_bindir}/neutron-pd-notify
|
||||
%{_bindir}/neutron-rootwrap
|
||||
%{_bindir}/neutron-rootwrap-daemon
|
||||
%{_bindir}/neutron-rootwrap-xen-dom0
|
||||
%{_bindir}/neutron-sanity-check
|
||||
%{_bindir}/neutron-status
|
||||
%{_bindir}/neutron-usage-audit
|
||||
|
@ -527,6 +548,7 @@ python3 -m stestr.cli --test-path neutron/tests/unit run
|
|||
%config(noreplace) %attr(0640, root, {{ pypi_name }}) %{_sysconfdir}/{{ pypi_name }}/dhcp_agent.ini
|
||||
%config(noreplace) %attr(0640, root, {{ pypi_name }}) %{_sysconfdir}/{{ pypi_name }}/l3_agent.ini
|
||||
%config(noreplace) %attr(0640, root, {{ pypi_name }}) %{_sysconfdir}/{{ pypi_name }}/metadata_agent.ini
|
||||
%config(noreplace) %attr(0640, root, {{ pypi_name }}) %{_sysconfdir}/{{ pypi_name }}/ovn_metadata_agent.ini
|
||||
%config(noreplace) %attr(0640, root, {{ pypi_name }}) %{_sysconfdir}/{{ pypi_name }}/metering_agent.ini
|
||||
%config(noreplace) %attr(0640, root, {{ pypi_name }}) %{_sysconfdir}/{{ pypi_name }}/rootwrap.conf
|
||||
%config(noreplace) %attr(0640, root, {{ pypi_name }}) %{_sysconfdir}/{{ pypi_name }}/{{ pypi_name }}.conf
|
||||
|
@ -603,6 +625,12 @@ python3 -m stestr.cli --test-path neutron/tests/unit run
|
|||
%{_unitdir}/openstack-neutron-metadata-agent.service
|
||||
%dir %{_sysconfdir}/{{ pypi_name }}/neutron-metadata-agent.conf.d
|
||||
|
||||
%files ovn-metadata-agent
|
||||
%license LICENSE
|
||||
%{_bindir}/neutron-ovn-metadata-agent
|
||||
%{_unitdir}/openstack-neutron-ovn-metadata-agent.service
|
||||
%dir %{_sysconfdir}/{{ pypi_name }}/neutron-ovn-metadata-agent.conf.d
|
||||
|
||||
%files metering-agent
|
||||
%license LICENSE
|
||||
%{_unitdir}/openstack-neutron-metering-agent.service
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=OpenStack Neutron OVN Metadata Agent
|
||||
After=syslog.target network.target
|
||||
After=mariadb.service postgresql.service rabbitmq-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=neutron
|
||||
Group=neutron
|
||||
WorkingDirectory=/var/lib/neutron
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
ExecStart=/usr/bin/neutron-ovn-metadata-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/ovn_metadata_agent.ini
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue