glpi-project / glpi-agent

GLPI Agent
GNU General Public License v2.0
212 stars 51 forks source link

Task Deploy isn't working #701

Closed JSRubio-i3Data closed 1 day ago

JSRubio-i3Data commented 2 days ago

Bug reporting acknowledgment

Yes, I read it

Professional support

Yes, I know

Describe the bug

I'm trying to deploy via GLPiInventory.

I follow the intructions of this document (https://faq.teclib.com/03_knowledgebase/inventory/glpiinventory_deploy/), and I have one packge and one task.

The task has as target my package and as actor one computer.

I install the msi from the command line like this: start /wait msiexec.exe /i "GLPI-Agent-1.9-x64.msi" /qn /norestart TAG=intranet ADD_FIREWALL_EXCEPTION=1 RUNNOW=1 AGENTMONITOR=1 SERVER=%server% DEBUG=0 TASKS=inventory,deploy.

The problem is the client never tries to run the deploy task.

In fact, in the agent logs, I never find an entry with: "....[info] running task Deploy".

In fact, if I search the registry, i find the entry "HKEY_LOCAL_MACHINE\SOFTWARE\GLPI-Agent\tasks" with tle value "inventory,deploy"

To reproduce

The agent logs says:


[Sun Jun 30 19:12:54 2024][info] GLPI Agent service starting
[Sun Jun 30 19:12:54 2024][info] [http server] HTTPD service started on port 62354
[Sun Jun 30 19:12:56 2024][info] GLPI Agent memory usage: WSS=3694592 PFU=114155520
[Sun Jun 30 19:12:56 2024][info] target server0: next run: Sun Jun 30 19:12:54 2024 - https://midominio.local/
[Sun Jun 30 19:12:56 2024][info] target server0: server https://midominio.local/
[Sun Jun 30 19:12:56 2024][info] sending prolog request to server0
[Sun Jun 30 19:13:06 2024][info] server0 answer shows it supports GLPI Agent protocol
[Sun Jun 30 19:13:07 2024][info] running task Inventory
[Sun Jun 30 19:13:07 2024][info] New inventory from XXXXXXXX-2024-06-30-19-12-54 for server0 (tag=intranet)
[Sun Jun 30 19:15:05 2024][info] target server0: next run: Sun Jun 30 20:10:23 2024 - https://midominio.local/
[Sun Jun 30 19:15:05 2024][info] GLPI Agent memory usage: WSS=3624960 PFU=136400896

Expected behavior

I don't why the agent doesn't start the Deploy task.

Operating system

Windows

GLPI Agent version

1.9

GLPI version

10.0.14

GLPIInventory plugin or other plugin version

GLPI Inventory v1.3.5

Additional context

No response

g-bougard commented 1 day ago

Hi @JSRubio-i3Data

as announced in glpi-agent 1.8, Deploy task is no more installed by default.

To have it installed, you need to use the ADDLOCAL option, see https://glpi-agent.readthedocs.io/en/latest/installation/windows-command-line.html#command-line-parameters for more details.

In your case, to just add Deploy task installation, you just need to add ADDLOCAL=feat_DEPLOY on your installer commandline.

As a side comment, I would advise you to better use the VBS for large installations as it includes a check which will prevent the installer to fail if the MSI service is still busy.