[BlueOnyx:05912] Re: eth0 vs seth0 and adding new sites

Dennis daodennis at gmail.com
Tue Nov 23 19:57:54 -05 2010


On Fri, Nov 19, 2010 at 4:13 PM, Dennis <daodennis at gmail.com> wrote:
> Hi,
>
> I am running BlueOnyx in a HyperV environment and I enabled the seth0
> environment, and I can't seem to create any sites:
>
> Sorry, the route to [ipaddress] could not be added to the routing
> table. It is possible that the specified gateway, 0.0.0.0, is
> unreachable. The target is [ipaddress_network] which should be
> reachable via the gateway, 0.0.0.0, and the route is being added to
> the interface, Primary Interface (eth0).
>
> What do I have to do to change the scripts to do this for seth0
> instead of eth0?
>
> Where does it get this primary interface information from?
>
> Dennis
>

In case this helps anyone:

I ended up just manually changing these files in /usr/sausalito/

I didn't put into patch format since this takes away the ^eth[n]$
functionality anyway.

./schemas/base/network/network.schema:
Changed:  data="(^eth[0-9]+(:[0-9]+)?$)|(^venet[0-9]+(:[0-9]+)?$)"/>
	  data="(^[se]th[0-9]+(:[0-9]+)?$)|(^venet[0-9]+(:[0-9]+)?$)"/>


./ui/web/base/network/network_details.php
Changed the following lines that
  $list = $factory->getScrollList("amNetStats", array(' ', 'seth0', 'seth1'));
        $eth0_obj = $cce->getObject('Network', array('device' => 'venet0'));
        $eth1_obj = $cce->getObject('Network', array('device' => 'venet1'));
        $seth0_obj = $cce->getObject('Network', array('device' => 'seth0'));
        $seth1_obj = $cce->getObject('Network', array('device' => 'seth1'));
if ($seth0_obj['enabled']) {
                $eth0 = `grep venet0 /proc/net/dev`;
                $eth0 = `grep seth0 /proc/net/dev`;
  $seth0 = chop(ltrim($seth0));
  $seth0 = split("[^[:alnum:]]+", $seth0);
  $seth0['recv_bytes'] = $seth0[1];
  $seth0['recv_packets'] = $seth0[2];
  $seth0['sent_bytes'] = $seth0[9];
  $seth0['sent_packets'] = $seth0[10];
  $seth0['errors'] = $seth0[3] + $seth0[11];
  $seth0['collisions'] = $seth0[14];
  $seth0['recv_bytes'] = $seth0['recv_packets'] = $seth0['sent_bytes']  =
    $seth0['sent_packets'] = $seth0['errors'] = $seth0['collisions'] =
$i18n->interpolate('stats_disabled');
if ($seth1_obj['enabled']) {
  $seth1 = `grep seth1 /proc/net/dev`;
  $seth1 = chop(ltrim($seth1));
  $seth1 = split("[^[:alnum:]]+", $seth1);
  $seth1['recv_bytes'] = $seth1[1];
  $seth1['recv_packets'] = $seth1[2];
  $seth1['sent_bytes'] = $seth1[9];
  $seth1['sent_packets'] = $seth1[10];
  $seth1['errors'] = $seth1[3] + $seth1[11];
  $seth1['collisions'] = $seth1[14];
  $seth1['recv_bytes'] = $seth1['recv_packets'] = $seth1['sent_bytes']  =
    $seth1['sent_packets'] = $seth1['errors'] = $seth1['collisions'] =
$i18n->get('stats_disabled');




./ui/web/base/network/ethernet.php

if ($dev['seth0']) {
    $ipaddr = $dev['seth0']['ipaddr'];
    $netmask = $dev['seth0']['netmask'];
    $device = $dev['seth0']['device'];
    $mac = $dev['seth0']['mac'];
    $enabled = $dev['seth0']['enabled'];
    $bootproto = $dev['seth0']['bootproto'];
    // Netmask is not optional for the admin iface and for seth0
if ($dev['seth1']) {
    $ipaddr = $dev['seth1']['ipaddr'];
    $netmask = $dev['seth1']['netmask'];
    $device = $dev['seth1']['device'];
    $mac = $dev['seth1']['mac'];
    $enabled = $dev['seth1']['enabled'];
    $bootproto = $dev['seth1']['bootproto'];
if ($dev['seth2']) {
    $ipaddr = $dev['seth2']['ipaddr'];
    $netmask = $dev['seth2']['netmask'];
    $device = $dev['seth2']['device'];
    $mac = $dev['seth2']['mac'];
    $enabled = $dev['seth2']['enabled'];
    $bootproto = $dev['seth2']['bootproto'];
if ($dev['seth3']) {
    $ipaddr = $dev['seth3']['ipaddr'];
    $netmask = $dev['seth3']['netmask'];
    $device = $dev['seth3']['device'];
    $mac = $dev['seth3']['mac'];
    $enabled = $dev['seth3']['enabled'];
    $bootproto = $dev['seth3']['bootproto'];
$block->addFormField($factory->getTextField('adminIf', 'seth0', ''));


./ui/web/base/wizard/onepageHandler.php

$devices = array('seth0', 'seth1');
                // first migrate any aliases to seth0 (possibly do this better)
                        $new_device = find_free_device($cceClient, 'seth0');


./ui/web/base/wizard/onepageHandler.php
$adminIf = "seth1";
    $devices = array('seth0', 'seth1');
                // first migrate any aliases to seth0 (possibly do this better)
                        $new_device = find_free_device($cceClient, 'seth0');



./ui/web/base/wizard/onepage.php


                if ($device != 'seth0') {
                // IP is optional, if it isn't the admin iface or seth0
                if (!$is_admin_if && ($device != 'seth0'))
                if ($device != 'seth0') {
                // IP not optional for the admin interface and for seth0
                if (!$is_admin_if && ($device != 'seth0'))
        // use special help text for seth0 and eth1 to keep the qube happy
        if ($device == 'seth0')
        if ($device != 'seth0') {
        // Netmask is not optional for the admin iface and for seth0
        if (!$is_admin_if && ($device != 'seth0'))


./ui/web/base/wizard/networkHandler.php

$seth0 = $cceClient->getObject("Network", array("device" => "seth0"));
        $seth0 = $cceClient->getObject("Network", array("device" => "venet0"));
                                        array("device" => "seth1"));
                                "ipaddr" => $seth0["ipaddr"],




./handlers/base/system/System.pm

 $errors += $cce->validate('seth0_ipaddr', $re_dotquad );
  $errors += $cce->validate('seth0_netmask', $re_dotquad );
  $errors += $cce->validate('seth0_up', qr/.*/ );
  $errors += $cce->validate('seth1_ipaddr', $re_dotquad );
  $errors += $cce->validate('seth1_netmask', $re_dotquad );
  $errors += $cce->validate('seth1_up', qr/.*/ );


Thanks,

Dennis O.



More information about the Blueonyx mailing list