[Ovirt-devel] [PATCH server] Replaced the config scripts with configuration encoding.

Daniel P. Berrange berrange at redhat.com
Wed Oct 8 20:05:27 UTC 2008


On Mon, Oct 06, 2008 at 01:39:33PM -0400, Darryl L. Pierce wrote:
> *** NOTE ***
> This patch is a request for comments. I'm looking for some feedback on the encoding
> strategy I'm using below. The goal is to get away from using embedded scripts and to
> instead just describe the desired state to the node.
> *** NOTE ***

> +# +ManagedNodeConfiguration+ generates a configuration file for an oVirt node
> +# based on information about the hardware submitted by the node and the 
> +# configuration details held in the database.
> +# 
> +# The configuration is returned as a series of encoded lines.
> +# 
> +# For a kernel module, the formation of the line is as follows:
> +# 
> +# kmod=[module name]|[module alias]|[module options]
> +# 
> +# An example would be for loading the +bonding+ kernel module to setup a bonded
> +# interface for load balancing. In this example, the bonded interface would be
> +# named +failover0+ on the node:
> +# 
> +# kmod=bonding|failover0|mode=2 miimon=100 downdelay=200

There shouldn't be any need for configuration keyed off the module.
As per the other mail i send, the only thing in modprobe.conf should
be an 'alias bond0 bonding'. Everything else is NIC device config.

> +# For a network interface (including a bonded interface) an example would be:
> +# 
> +# ifcfg=00:11:22:33:44|eth0|BOOTPROTO=dhcp|bridge=ovirtbr0|ONBOOT=yes
> +# 
> +# In this line, the network interface +eth0+ has a hardware MAC address of 
> +# +00:11:22:33:44+. It will use DHCP for retrieving it's IP address details, 
> +# and will use the +ovirtbr0+ interface as a bridge.



> +kmod=bonding|#{bonding.interface_name}|mode=#{bonding.bonding_type.mode} miimon=100 downdelay=200
> +ifcfg=none|#{bonding.interface_name}|BOOTPROTO=static|IPADDR=#{bonding.ip_addr}|NETMASK=#{bonding.netmask}|BROADCAST=#{bonding.broadcast}|ONBOOT=yes
> +ifcfg=#{nic1.mac}|eth0|MASTER=#{bonding.interface_name}|SLAVE=yes|ONBOOT=yes
> +ifcfg=#{nic2.mac}|eth1|MASTER=#{bonding.interface_name}|SLAVE=yes|ONBOOT=yes

So, in this exampe, move those kmod= bonding options into the ifcfg= line
that follows.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the ovirt-devel mailing list