Discussion:
Linux discovery questions
Stéphane Urbanovski
2010-02-11 10:09:07 UTC
Permalink
Hello

Networks.pm for now only reports interfaces that have an affected IP address. We would like to also report unconfigured interfaces.
Wat is the best way to achieve this ? client side configuration ? server side configuration ?

We also would like to report bonded interfaces and report enslaved devices. Any advices how to extends the actual schema ?

The same way, we would like to report multipathed storage luns (/dev/mpath/* or /dev/dm-*) with their enslaved drives.
--
Stéphane Urbanovski
Gonéri Le Bouder
2010-02-11 10:17:03 UTC
Permalink
Post by Stéphane Urbanovski
Hello
Networks.pm for now only reports interfaces that have an affected IP
address. We would like to also report unconfigured interfaces.
Wat is the best way to achieve this ? client side configuration ? server
side configuration ?
We also would like to report bonded interfaces and report enslaved devices.
Any advices how to extends the actual schema ?
The same way, we would like to report multipathed storage luns (/dev/mpath/*
or /dev/dm-*) with their enslaved drives.
Hi Stéphane,

Are you sure? This is something that had been changed in the 1.1
agent. I checked on a Linux and the tun* and lo0 interfaces are in the
XML.
For the multipathed storage luns, do you know how you want to store
that in the XML?

Cheers,
--
Gonéri Le Bouder
Stéphane Urbanovski
2010-02-11 11:29:21 UTC
Permalink
Post by Gonéri Le Bouder
Post by Stéphane Urbanovski
Hello
Networks.pm for now only reports interfaces that have an affected IP
address. We would like to also report unconfigured interfaces.
Wat is the best way to achieve this ? client side configuration ? server
side configuration ?
We also would like to report bonded interfaces and report enslaved devices.
Any advices how to extends the actual schema ?
The same way, we would like to report multipathed storage luns (/dev/mpath/*
or /dev/dm-*) with their enslaved drives.
Hi Stéphane,
Are you sure? This is something that had been changed in the 1.1
agent. I checked on a Linux and the tun* and lo0 interfaces are in the
XML.
I'm using 1.1 agents.
Unconfigured interfaces are not reported (see Networks.pm around line 88)
Channel bonding use bondX devices.
Post by Gonéri Le Bouder
For the multipathed storage luns, do you know how you want to store
that in the XML?
We need to know when a drive is part of a multipathed device.

I'll try to provide a patch using <SLAVES> tags.
--
Stéphane
Gonéri Le Bouder
2010-02-11 11:36:23 UTC
Permalink
Post by Stéphane Urbanovski
I'm using 1.1 agents.
Unconfigured interfaces are not reported (see Networks.pm around line 88)
Can you please submit a patch regarding that?
Post by Stéphane Urbanovski
Channel bonding use bondX devices.
Post by Gonéri Le Bouder
For the multipathed storage luns, do you know how you want to store
that in the XML?
We need to know when a drive is part of a multipathed device.
I'll try to provide a patch using <SLAVES> tags.
Can you give a full example of the data structure?

Cheers!
--
Gonéri Le Bouder
Stéphane Urbanovski
2010-02-11 16:43:11 UTC
Permalink
Post by Gonéri Le Bouder
Post by Stéphane Urbanovski
I'm using 1.1 agents.
Unconfigured interfaces are not reported (see Networks.pm around line 88)
Can you please submit a patch regarding that?
Post by Stéphane Urbanovski
Channel bonding use bondX devices.
Post by Gonéri Le Bouder
For the multipathed storage luns, do you know how you want to store
that in the XML?
We need to know when a drive is part of a multipathed device.
I'll try to provide a patch using <SLAVES> tags.
Can you give a full example of the data structure?
Cheers!
For Database :
ALTER TABLE `networks` ADD `SLAVES` VARCHAR( 128 ) CHARACTER SET ascii COLLATE ascii_bin NOT NULL COMMENT 'List enslaved interfaces';


In Apache/Ocsinventory/Map.pm (server side) :
-------------------------------------------------------
@@ -293,7 +293,8 @@
STATUS => {},
IPGATEWAY => {},
IPDHCP => {},
- VIRTUALDEV => {}
+ VIRTUALDEV => {},
+ SLAVES => {}
}
},

-------------------------------------------------------

In XML/Inventory.pm (client side), I suggest the following rewrite (includes SLAVES support) :

-------------------------------------------------------
=item addNetwork()

Register a network interface in the inventory.

=cut
sub addNetwork {
my ($self, $args) = @_;

my %tmpXml = ();

foreach my $item ('DESCRIPTION','DRIVER','IPADDRESS','IPDHCP','IPGATEWAY','IPMASK','IPSUBNET','MACADDR','PCISLOT','STATUS','TYPE','VIRTUALDEV','SLAVES') {
$tmpXml{$item} = [$args->{$item} ? $args->{$item} : ''];
}
push (@{$self->{h}{CONTENT}{NETWORKS}},\%tmpXml);

}
-------------------------------------------------------


Networks.pm (agent side) has been partially rewritten, so here is the whole file.
--
Stéphane Urbanovski
Gonéri Le Bouder
2010-02-12 13:34:27 UTC
Permalink
(...)
Post by Stéphane Urbanovski
Networks.pm (agent side) has been partially rewritten, so here is the whole file.
Indeed and I've no Solaris machines. I would prefer you ask Jerome
Lebas first if he's ok with the changes.

Cheers,
--
Gonéri Le Bouder
Stéphane Urbanovski
2010-02-12 15:32:56 UTC
Permalink
Post by Gonéri Le Bouder
(...)
Post by Stéphane Urbanovski
Networks.pm (agent side) has been partially rewritten, so here is the whole file.
Indeed and I've no Solaris machines. I would prefer you ask Jerome
Lebas first if he's ok with the changes.
I didn't change the check logic.
The main change was to add bonding support and to use $ifData{PROPERTY} instead of individual $property declarations.
--
Stéphane
Stéphane Urbanovski
2010-02-13 08:34:24 UTC
Permalink
Post by Stéphane Urbanovski
Post by Gonéri Le Bouder
(...)
Post by Stéphane Urbanovski
Networks.pm (agent side) has been partially rewritten, so here is the
whole
file.
Indeed and I've no Solaris machines. I would prefer you ask Jerome
Lebas first if he's ok with the changes.
I didn't change the check logic.
The main change was to add bonding support and to use $ifData{PROPERTY}
instead of individual $property declarations.
I forget something : unconfigured interfaces are now reported.
I don't know how this may impact actual installations.
--
Stéphane Urbanovski
Gonéri Le Bouder
2010-02-12 15:51:52 UTC
Permalink
Post by Stéphane Urbanovski
Post by Gonéri Le Bouder
(...)
Post by Stéphane Urbanovski
Networks.pm (agent side) has been partially rewritten, so here is the
whole
file.
Indeed and I've no Solaris machines. I would prefer you ask Jerome
Lebas first if he's ok with the changes.
I didn't change the check logic.
The main change was to add bonding support and to use $ifData{PROPERTY}
instead of individual $property declarations.
Ok. I commited the agent changes in the FusionInventory agent 1.2.x
branch ( http://fusioninventory.org/wordpress/contribute/ ).
--
Gonéri Le Bouder
Loading...