Seite 1 von 2
Troubles with pcproto.ini
Verfasst: 20 Mär 2013, 11:58
von ritsovih
Hi,
I've been trying to use the pcproto.ini file to automatically install a specific set off applications whenever I add a new OPSI client. However I can't get it to work.
The following is the contents of my pcproto.ini file (it was originally empty before I started editing it).
Code: Alles auswählen
[localboot_product_states]
7zip = not_installed:setup
videolan.vlc = not_installed:setup
When I create a new OPSI client and check it's ini-file in /var/lib/opsi/config/clients# I see the following:
Code: Alles auswählen
[info]
created = 2013-03-20 11:35:01
description =
hardwareaddress = aa:bb:cc:dd:ee:ff
inventorynumber =
ipaddress = 192.168.50.254
lastseen = 2013-03-20 11:35:01
notes =
[generalconfig]
clientconfig.depot.id = ["opsi.hivos.nl"]
[localboot_product_states]
7zip = not_installed:setup
videolan.vlc = not_installed:setup
However when I check the Product configuration tab on the opsi configuration editor for that client nothing changed in the Requested Action column. And nothing gets installed off course. See pic:
I'm still trying to find my way around the OPSI product, but atm I don't know where I went wrong or how to go about troubleshooting this. Can anybody give me some pointers, so I can get this to work?
cheers,
Ritch
Re: Troubles with pcproto.ini
Verfasst: 20 Mär 2013, 20:15
von d.oertel
Hi,
what is the output of
Code: Alles auswählen
opsi-admin -d method getProductActionRequests_listOfHashes <clientId>
regards
d.oertel
Re: Troubles with pcproto.ini
Verfasst: 21 Mär 2013, 09:11
von ritsovih
Hi d.oertel,
Thanks for replying. I don't get any output for the client that I've created via the config editor (Create new opsi client). When I manually assign 7zip to this client via the config editor I get the following output:
Code: Alles auswählen
[
{
"actionRequest" : "setup",
"productId" : "7zip"
}
]
Ritch
*edited, because of stupid initial example
Re: Troubles with pcproto.ini
Verfasst: 21 Mär 2013, 11:13
von Zakyl
I try this configuration too, that's really interesting. But my packages are not automatically deploy too like ritsovih
I'm interested by the answers

Re: Troubles with pcproto.ini
Verfasst: 21 Mär 2013, 12:35
von d.oertel
Hi,
what is the output of
Code: Alles auswählen
opsi-admin -d method productOnClient_getObjects '[]' '{"<clientId>"}'
regards
d.oertel
Re: Troubles with pcproto.ini
Verfasst: 21 Mär 2013, 13:55
von ritsovih
I created a new client from scratch: newclient.example.com
The newclient.example.com.ini contains the following
Code: Alles auswählen
[info]
created = 2013-03-21 13:40:12
description =
hardwareaddress = aa:bb:cc:dd:ee:ff
inventorynumber =
ipaddress = 192.168.50.254
lastseen = 2013-03-21 13:40:12
notes =
[generalconfig]
clientconfig.depot.id = ["opsi.example.com"]
[localboot_product_states]
7zip = not_installed:setup
videolan.vlc = not_installed:setup
when I run:
Code: Alles auswählen
opsi-admin -d method getProductActionRequests_listOfHashes newclientexample.com
I get no output
when I run the command you last suggested I get an error message:
Code: Alles auswählen
root@opsi:~# opsi-admin -d method productOnClient_getObjects '[]' '{"newclient.example.com"}'
[2] Traceback: (Logger.py|742)
[2] line 1569 in '<module>' in file '/usr/bin/opsi-admin' (Logger.py|742)
[2] line 304 in 'main' in file '/usr/bin/opsi-admin' (Logger.py|742)
[2] line 672 in 'execute' in file '/usr/bin/opsi-admin' (Logger.py|742)
[2] ==>>> Failed to execute 'method productOnClient_getObjects [] {"newclient.example.com"}': Expecting : delimiter: line 1 column 19 (char 19) (opsi-admin|1579)
if i just run the command:
Code: Alles auswählen
opsi-admin -d method productOnClient_getObjects '[]'|grep newclient.example.com
I don't get any output.
If I then manually assign the 7zip package to newclient.example.com and run the command:
Code: Alles auswählen
opsi-admin -d method productOnClient_getObjects '[]'|more
I get (among other clients off course) this output:
Code: Alles auswählen
{
"ident" : "7zip;LocalbootProduct;newclient.example.com",
"actionProgress" : null,
"actionResult" : null,
"clientId" : "newclient.example.com",
"modificationTime" : "2013-03-21 13:49:11",
"actionRequest" : "setup",
"targetConfiguration" : null,
"productVersion" : null,
"productType" : "LocalbootProduct",
"lastAction" : null,
"packageVersion" : null,
"actionSequence" : -1,
"type" : "ProductOnClient",
"installationStatus" : "not_installed",
"productId" : "7zip"
},
and if I run
opsi-admin -d method getProductActionRequests_listOfHashes newclient.example.com again I get:
Code: Alles auswählen
[
{
"actionRequest" : "setup",
"productId" : "7zip"
}
]
cheers,
Ritch
Re: Troubles with pcproto.ini
Verfasst: 21 Mär 2013, 14:32
von d.oertel
Hi,
sorry - the command was:
Code: Alles auswählen
opsi-admin -d method productOnClient_getObjects '[]' '{"clientId":"<clientId>"}'
However - looks fine.
Did you reload (multiple) / restart your configed ?
regards
d.oertel[/code]
Re: Troubles with pcproto.ini
Verfasst: 21 Mär 2013, 15:39
von Zakyl
For mine :
Code: Alles auswählen
root@ubuntest:~# opsi-admin -d method productOnClient_getObjects '[]' '{"clientId":"virtuel.opsi.local"}'
[
{
"ident" : "opsi-client-agent;LocalbootProduct;virtuel.opsi.local",
"actionProgress" : "",
"actionResult" : "successful",
"clientId" : "virtuel.opsi.local",
"modificationTime" : "2013-03-21 13:45:30",
"actionRequest" : "none",
"targetConfiguration" : null,
"productVersion" : "4.0.3.1",
"productType" : "LocalbootProduct",
"lastAction" : null,
"packageVersion" : "2",
"actionSequence" : -1,
"type" : "ProductOnClient",
"installationStatus" : "installed",
"productId" : "opsi-client-agent"
}
]
Reload / Restart do nothing for me.
Re: Troubles with pcproto.ini
Verfasst: 21 Mär 2013, 16:07
von ritsovih
Yep, several times. It has been a couple of days since I've been at this as well, but no change.
Re: Troubles with pcproto.ini
Verfasst: 21 Mär 2013, 17:22
von d.oertel
Hi,
it is very strange that you get with opsi-admin different results.
could you please post your /etc/opsi/backendManager/dispatch.conf
regards
d.oertel