ports/emulators/py-nova/files/01-firewall-manager.patch
Roman Bogorodskiy b7e05e4ed3 Add emulators/py-nova 14.0.2, Openstack Compute Service
Please note that this is a development version of nova.
Many features are not available.

Currently nova works on FreeBSD 11 and supports QEMU and Xen.

Common issues:
- Security groups are not implemented
- ARP spoofing, DHCP isolation protection are not implemented
- Nova services work from the root user
- No IPv6 support

QEMU issues:
- Need to enable serialconsole (TCP)
- Need to disable online CPU tracking
- Cannot mount cinder volumes

Xen issues:
- Live snapshots don't work
- No support for cinder volume hot-plugging
- XENBUS delay (5 min) when using qemu driver and COW images
- Some Linux images cannot be booted

For further FreeBSD specific notes please refer to port's pkg-message.

PR:		215151
Submitted by:	Alexander Nusov (alexander.nusov@nfvexpress.com)
2016-12-18 06:30:58 +00:00

60 lines
2.3 KiB
Diff

From 60668a502b5f7af77861507e94a89b7f4201c2cb Mon Sep 17 00:00:00 2001
From: Alexander Nusov <alexander.nusov@nfvexpress.com>
Date: Tue, 8 Nov 2016 16:52:29 +0300
Subject: [PATCH] add get_firewall_manager
---
nova/network/linux_net.py | 4 ++++
nova/network/manager.py | 8 ++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
index b10fa28..2637e26 100644
--- a/nova/network/linux_net.py
+++ b/nova/network/linux_net.py
@@ -1898,3 +1898,7 @@ def set_vf_interface_vlan(pci_addr, mac_addr, vlan=0):
port_state,
run_as_root=True,
check_exit_code=exit_code)
+
+
+def get_firewall_manager():
+ return iptables_manager
diff --git a/nova/network/manager.py b/nova/network/manager.py
index 9de53d9..f6eb106 100644
--- a/nova/network/manager.py
+++ b/nova/network/manager.py
@@ -1799,13 +1799,13 @@ class FlatDHCPManager(RPCAllocateFixedIP, floating_ips.FloatingIP,
ctxt = context.get_admin_context()
networks = objects.NetworkList.get_by_host(ctxt, self.host)
- self.driver.iptables_manager.defer_apply_on()
+ self.driver.get_firewall_manager().defer_apply_on()
self.l3driver.initialize(fixed_range=False, networks=networks)
super(FlatDHCPManager, self).init_host()
self.init_host_floating_ips()
- self.driver.iptables_manager.defer_apply_off()
+ self.driver.get_firewall_manager().defer_apply_off()
def _setup_network_on_host(self, context, network):
"""Sets up network on this host."""
@@ -1887,13 +1887,13 @@ class VlanManager(RPCAllocateFixedIP, floating_ips.FloatingIP, NetworkManager):
ctxt = context.get_admin_context()
networks = objects.NetworkList.get_by_host(ctxt, self.host)
- self.driver.iptables_manager.defer_apply_on()
+ self.driver.get_firewall_manager().defer_apply_on()
self.l3driver.initialize(fixed_range=False, networks=networks)
NetworkManager.init_host(self)
self.init_host_floating_ips()
- self.driver.iptables_manager.defer_apply_off()
+ self.driver.get_firewall_manager().defer_apply_off()
def allocate_fixed_ip(self, context, instance_id, network, **kwargs):
"""Gets a fixed IP from the pool."""
--
2.8.1