Talk:OCS Inventory Tools

From SME Server
Jump to navigationJump to search

ipdiscover bug

We need to confirm that ipdiscover works when the smeserver is the forced client.

I Tried the following:

ipdiscover eth0 10
Important.png Note:
Usage : ipdiscover [iface name] [latency in ms]


Here's what I got on my server:

<IPDISCOVER>
<H>192.168.0.100<M>00:xx:xx:xx:xx:xx</M><N>pc-00100.mydomain.com</N></H>
<H>192.168.0.253<M>00:xx:xx:xx:xx:xx</M><N>pc-00253.mydomain.com</N></H>
<H>192.168.0.254<M>00:xx:xx:xx:xx:xx</M><N>pc-00254.mydomain.com</N></H>
</IPDISCOVER>

Sounds like it's working for me... But IpDiscover discovers nothing when launched by SME OCS' Agent. There must be a problem here!

Windows Agent don't have this problem...

Cool34000


deployment

deletion bug

When you delete a package, ocs complains, but it deletes the files anyway, document later

Stefen


The only way I was able to reproduce an error on package deletion is when I refreshed the page (as files were already removed, I got an error)

Could you be more clear on this bug? How did it happened?

Cool34000


add a package, deploy > activate > click on the red X

ERROR: Can't delete directory /opt/inventory/ocs/download/1194511477

I have documented that you can ignore the error, maybe i should say if you see the error you can ignore?

stephen


Upload size limit

Must document that on the Wiki:

Max allowed packet value is locked at 10M by default on SME.

No need to create a custom template: DB values already exist for this! They are hidden in php.ini templates 40DataHandling and 60FileUploads

What is the impact of setting large values on the server?


php Values can be changed with the following:

config setprop php UploadMaxFilesize 50M PostMaxSize 50M
expand-template /etc/php.ini
signal-event ocsglpi-update

I will add php.ini to the list of templates2expand

Let's delete the mysql custom-template in the RPM and document how to change both values to allow uploading larger files!


Cool34000


I think you should restrict the affect to just the ocs directory

config setprop ocs MaxUpload 50M
php_admin_value post_max_size $ocs{'MaxUpload'}
php_admin_value upload_max_filesize $ocs{'MaxUpload'}
expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith condrestart

$ocs{'MaxUpload'} default = 10M

yes delete /etc/e-smith/templates-custom/etc/my.cnf/005mysqld

stephen



you have to set a db value anyway so you may as well add it to the ocs fragment


Yes, I tried to limit changes to ocs in the template, but it didn't worked for me.

Maybe I was missing this line:

/etc/init.d/httpd-e-smith condrestart

Testing this now, of course it would be better to limit these values only for ocs!

=> Still doesn't work... Values are expanded but can't upload file >10M... Looks like this value must be global.

Here's the non working template:

#--------------------------------------------------------------
# OCS Inventory Next Generation
#--------------------------------------------------------------
Alias /download /opt/inventory/ocs/download
Alias /ocs      /opt/inventory/ocs/ocsreports
+{
+    if (exists $ocs{'URL'})
+      { $OUT .= "Alias  /$ocs{'URL'} /opt/inventory/ocs/ocsreports"; }
+}

<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
+  php_admin_value post_max_size $ocs{'MaxUpload'}
+  php_admin_value upload_max_filesize $ocs{'MaxUpload'}
</Directory>
config setprop ocs MaxUpload 50M
signal-event ocsglpi-update
/etc/init.d/httpd-e-smith condrestart

Cool34000


aliases

Future RPM will allow to add aliases using 'URL' value to ocs and glpi

{
  if (exists $foo{'URL'})
  { $OUT .= "Alias  /$foo{'URL'}  /opt/foo\n"; }
}