[Ovirt-devel] [PATCH server] set ip_forwarding=1 if not already enabled

Joey Boggs jboggs at redhat.com
Wed Feb 18 18:47:08 UTC 2009


This is the final portion for nat to work on the nodes

---
 installer/modules/ovirt/manifests/dhcp.pp |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/installer/modules/ovirt/manifests/dhcp.pp b/installer/modules/ovirt/manifests/dhcp.pp
index 8127646..3c03b10 100644
--- a/installer/modules/ovirt/manifests/dhcp.pp
+++ b/installer/modules/ovirt/manifests/dhcp.pp
@@ -18,6 +18,8 @@
 # Author: Joey Boggs <jboggs at redhat.com>
 #--
 
+import 'augeas'
+
 class dhcp::bundled {
 
         file {"/etc/dnsmasq.d/ovirt-dhcp.conf":
@@ -35,4 +37,12 @@ class dhcp::bundled {
         firewall_rule {"dhcpd": destination_port => '68', protocol => 'udp'}
         firewall_rule {"bootp": destination_port => '67', protocol => 'udp'}
 
+        augeas {"ip_forwarding":
+            context => "/files/etc/sysctl.conf",
+            changes => ["set net.ipv4.ip_forward 1"]
+        }
+
+        single_exec {"set_ip_fowarding_1":
+            command => "/sbin/sysctl -w net.ipv4.ip_forward=1"
+        }
 }
-- 
1.6.0.6




More information about the ovirt-devel mailing list