Talk:OCS Inventory Tools

From SME Server
Jump to navigation Jump to search

known bugs

There are still some bugs in this RPM... Help us to fix them!

ipdiscover bug

ipdiscover and SME

We need to make ipdiscover working on SME.

The standalone command works:

# ipdiscover eth0 10

But IpDiscover is not launched when SME is the elected/forced client.

Agent is not well documented, I tried the debug mode:

# ocsinventory-agent -s localhost --debug
[debug] Failed to load `/etc/ocsinventory-agent/modules.conf': 0. No external module will be used.
[debug] Failed to load Ocsinventory::Agent::Backend::OS::BSD::Mem: Global symbol "$unit" requires explicit package name at /usr/lib/perl5/vendor_perl/5.8.5/Ocsinventory/Agent/Backend/OS/BSD/Mem.pm line 31.
Global symbol "$unit" requires explicit package name at /usr/lib/perl5/vendor_perl/5.8.5/Ocsinventory/Agent/Backend/OS/BSD/Mem.pm line 32.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.5/Ocsinventory/Agent/Backend.pm line 69.

I'm not sure about these errors, but we do not have BSD!

[debug] =BEGIN=SERVER RET======
[debug] $VAR1 = {
         'OPTION' => [
{
'NAME' => 'DOWNLOAD',
'PARAM' => [
{
'FRAG_LATENCY' => '10',
'TIMEOUT' => '30',
'PERIOD_LATENCY' => '0',
'ON' => '1',
'TYPE' => 'CONF',
'PERIOD_LENGTH' => '10',
'CYCLE_LATENCY' => '60'
}
]
}
],
'RESPONSE' => 'SEND',
'PROLOG_FREQ' => '24'
};
[debug] =END=SERVER RET======
[debug] No respHandlers avalaible for OPTION. The data returned by server in this hash will be lost.

This is more interesting: client doesn't gather IpDiscover info!

I checked that after changing other values in the web interface they were applied to the Agent, and they were... The problem is only for IpDiscover!!!

I also tryed to put manual changes in the /var/lib/ocsinventory-agent/localhost/ocsinv.conf file

<IPDISCOVER_VERSION>3</IPDISCOVER_VERSION>

Nothing is working @#$*!

The file that gathers options should be /usr/lib/perl5/vendor_perl/5.8.5/Ocsinventory/Agent/Option/Update.pm

ipdiscover-util.pl

This script used by the web interface do not seem to work too.

First thing to do is to change the password in this file...

...
my $dbhost = 'localhost';
my $dbuser = 'ocs';
my $dbpwd = 'ocs';
my $db = 'ocsweb';
my $dbp = '3306';

The password should be dynamical as this is a perl script. We need to use esmith::ConfigDB or something else to retrieve this value... I was unable to handle that.

Also a problem, the script cannot be executed. I try to add script handler for .pl but it didn't worked...

www/ocs/install.php bugs

New doc, enjoy!

=> Why do we need really an admin account? Why can't we use ocs?

If you encounter any problem with files insertion, try setting the global max_allowed_packet mysql value to at least 2M in your server config file.

How to set this value for ocs only?

=> install.php is needed, as you now know. But the file can be renamed or secured when not needed ;-)


I didn't use this screenshot finally... It shows default MaxUpload can be seen here & ocsagent.exe not present File:OCS-installphp-warning.png
Should we delete it?


future RPM

What will be fixed in next RPM release...

MaxUpload

Default value will raise to 100M (OpenOffice ready)

secure install.php

What is the best way to secure this file?

Move it?
Rename it?
chmod 400?

If this file is secured, we need to document that in the article.

/download

Now that we know that the activation warning can be skipped, can we delete in ocs Apache template:

<Directory /opt/inventory/ocs/download>
  Options None
-  Options +Indexes
-  Options +Includes
  AllowOverride None
  order deny,allow
  deny from all
  allow from { $localAccess }
  php_admin_value open_basedir /opt/inventory/ocs/download:/tmp
</Directory>

This will disallow files from being viewable (but still accessible for ocs?)

This would be more secure if it works! Need to test that!

dependencies

change the install method to install the perl dependencies that are available from existing repos.

Then you can reduce the number of perl rpms in your download the less you are responsible for the better

yum localinstall smeserver-inventory-tools* --enablerepo=dag --enablerepo=extras 

stephen


Is this just a doc issue or do I need to change the Requires? DOCUMENTATION, CHANGE THE INSTALL COMMAND

All needed deps are should be in extras and mostly in dag

Here's the actual list of Requires in the .spec file (edit if needed):

 - Requires:  e-smith-base  SN - NOT NEEDED IF YOU HAVE BELOW
 - Requires:  e-smith-release >= 7              # Note: SME >8 may need a fix if it uses mod_perl >=2  (could be good to test and be ready!)
 + DON'T WE HAVE SMESERVER-RELEASE >=7 ? CHECK, rpm -q ...
Requires:  mod_perl >= 1.99_16-4
Requires:  monitor-edid >= 1.11-1            #ocs Agent
Requires:  ocsinventory-ipdiscover >= 1.01-2 #ocs Agent => will remove this one as it's already a dependency of ocsinventory-agent
Requires:  ocsinventory-agent >= 0.0.6-1     #ocs Agent
Requires:  perl-Apache-DBI >= 0.9901-2.2
Requires:  perl-Archive-Tar >= 1.23-3.99_2
Requires:  perl-Compress-Zlib >= 1.42-1
Requires:  perl-Crypt-OpenSSL-Bignum >= 0.03-1.2
Requires:  perl-Crypt-OpenSSL-RSA >= 0.21-1.2
Requires:  perl-IO-Socket-SSL >= 1.01-1
Requires:  perl-IO-Zlib >= 1.04-2
Requires:  perl-Mail-DomainKeys >= 0.21-2
Requires:  perl-MIME-Lite >= 3.01-2.2
Requires:  perl-Net-IP >= 1.23-1
Requires:  perl-Net-Jabber >= 2.0-1.2
Requires:  perl-Net-XMPP >= 1.0-1.2
Requires:  perl-SOAP-Lite >= 0.69-1
Requires:  perl-XML-SAX >= -0.12-7
Requires:  perl-XML-Simple >= 2.14-4
Requires:  perl-XML-Stream >= 1.22-1.2
Conflicts: smeserver-ocs_inventory_ng  # old RPM version, here for safety!
Conflicts: smeserver-glpi              # old RPM version, here for safety!

=> fresh 7.1 final CD install - no updates

=> dag added to yum repos (disabled and invisible)

=> removed all perl dependencies:

A lot are missing... The RPM installed but I got an error trying to contact the server!

Cool34000


Add the dependacies and use the new yum command with --enablerepo.....