[Ovirt-devel] [PATCH recipe] Changes to support removal of second network interface on the appliance

Perry Myers pmyers at redhat.com
Sun Nov 9 07:50:35 UTC 2008


Old appliance had:
eth0 - libvirt default network (used for forwarding and upstream access)
eth1 - ovirtbr0 for fake node access and bridging to oVirt network

The forwarding/NAT and upstream access has been merged into ovirtbr0
eliminating the need for eth0/default.  So eth0 becomes bridged
to ovirtbr0 and eth1 is removed.

To support this, the create-ovirt-appliance script needs to be
modified to set up the host network appropriately.  This is done
in a related patch in the ovirt-appliance repo.

The appliance is no longer used as a gateway, the host is the
default gateway.  So the sections for NAT are removed from the puppet
config.

Signed-off-by: Perry Myers <pmyers at redhat.com>
---
 appliances/ovirt/files/ovirt-server-appliance |    6 +++---
 appliances/ovirt/ovirt.pp.in                  |   19 ++-----------------
 2 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/appliances/ovirt/files/ovirt-server-appliance b/appliances/ovirt/files/ovirt-server-appliance
index 5cf530d..4dabce0 100644
--- a/appliances/ovirt/files/ovirt-server-appliance
+++ b/appliances/ovirt/files/ovirt-server-appliance
@@ -12,7 +12,7 @@ TARGET_ID=32101
 
 start() {
     echo -n "Starting ovirt-server-appliance: "
-    dnsmasq -i eth1 -F 192.168.50.6,192.168.50.252 \
+    dnsmasq -i eth0 -F 192.168.50.6,192.168.50.252 \
         -G 00:16:3e:12:34:57,192.168.50.3 -G 00:16:3e:12:34:58,192.168.50.4 \
         -G 00:16:3e:12:34:59,192.168.50.5 \
         -s priv.ovirt.org \
@@ -23,9 +23,9 @@ start() {
         -W _qpidd._tcp,management.priv.ovirt.org,5672 \
         -W _identify._tcp,management.priv.ovirt.org,12120 \
         --enable-tftp --tftp-root=/var/lib/tftpboot -M pxelinux.0 \
-        -O option:router,192.168.50.2 -O option:ntp-server,192.168.50.2 \
+        -O option:router,192.168.50.1 -O option:ntp-server,192.168.50.2 \
         --dhcp-option=12 \
-        -R --local /priv.ovirt.org/ --server 192.168.122.1
+        -R --local /priv.ovirt.org/ --server 192.168.50.1
 
     # Set up the fake iscsi target
     tgtadm --lld iscsi --op new --mode target --tid $TARGET_ID \
diff --git a/appliances/ovirt/ovirt.pp.in b/appliances/ovirt/ovirt.pp.in
index 299a11d..ab52d57 100644
--- a/appliances/ovirt/ovirt.pp.in
+++ b/appliances/ovirt/ovirt.pp.in
@@ -46,8 +46,8 @@ postgres::setup{$appliance_name:}
 firewall::setup{$appliance_name: status => "enabled"}
 
 $net_changes = [
-    "set /files/etc/sysconfig/network-scripts/ifcfg-eth0/PEERDNS no",
-    "set /files/etc/sysconfig/network-scripts/ifcfg-eth1/DNS1 192.168.50.2"
+    "set /files/etc/sysconfig/network-scripts/ifcfg-eth0/DNS1 192.168.50.2",
+    "set /files/etc/sysconfig/network-scripts/ifcfg-eth0/GATEWAY 192.168.50.1"
 ]
 
 augeas {"network_scripts":
@@ -96,14 +96,6 @@ file {"/boot/grub/splash.xpm.gz":
     source => "puppet:///ovirt/ovirt-splash.xpm.gz"
 }
 
-firewall_rule {"ovirt_nat":
-    table => "nat",
-    chain => "POSTROUTING",
-    out_interface => "eth0",
-    action => "MASQUERADE",
-    protocol => ''
-}
-
 firewall_rule {"ssh": destination_port => '22'}
 firewall_rule {"http": destination_port => '80'}
 firewall_rule {"https": destination_port => '443'}
@@ -129,13 +121,6 @@ firewall_rule {"krb5kdc": destination_port => '88', protocol => 'udp'}
 firewall_rule {"cobblerd": destination_port => "25150"}
 firewall_rule {"cobblerd-mgmt": destination_port => "25151"}
 
-file_replacement{"nat_forwarding" :
-    file => "/etc/sysctl.conf",
-    pattern => "^net.ipv4.ip_forward = .*",
-    replacement => "net.ipv4.ip_forward = 1",
-    notify => Service[network]
-}
-
 service {"nfs":
     ensure => "running",
     enable => true,
-- 
1.6.0.3




More information about the ovirt-devel mailing list