Hi,
aktuell wird der Status von Paketinstallationen nur noch NACH der Installation angepasst. Was die Implementation von "opsi-cli messagebus wait-for-installation" nicht mehr funktionieren lässt. Sprich, wenn ein Paket mit eine vorigen erfolgreichen Installation mit einer neuen Version installiert wird, bleibt der Status während der Installation auf "installed" und wird nicht mehr auf "unknown" gesetzt. Dadurch wird direkt zum Start der Installation auf dem Messagebus eine erfolgreiche Installation gemeldet obwohl die Installation nicht abgeschlossen ist. Währenddessen ist der configeditor geöffnet (falls das was zur Sache tut).
Installierte Pakete:
opsi-server-full.noarch 4.3.5.1-1.1
opsi-utils.x86_64 4.3.16.0-1.1
opsiconfd.x86_64 4.3.33.9-1.1
LOG:
[root@opsi ~]# opsi-cli -l5 client-action --clients <<client>> trigger-event
[5] [2025-07-24 15:08:41.557] [ ] opsi-cli version 4.3.24.1 starting (__main__.py:202)
[5] [2025-07-24 15:08:42.535] [ ] Selected clients: {'<<client>>'} (client_action_worker.py:185)
[5] [2025-07-24 15:08:42.543] [ ] Triggering event 'on_demand' on clients {'<<client>>'} (host_control_worker.py:88)
[5] [2025-07-24 15:08:42.560] [ ] Successfully triggered event on 1 clients (host_control_worker.py:144)
Successfully triggered event on 1 clients
[root@opsi ~]# opsi-cli -l5 messagebus wait-for-installation <<client>> memoq installed
[5] [2025-07-24 15:08:44.679] [ ] opsi-cli version 4.3.24.1 starting (__main__.py:202)
[5] [2025-07-24 15:08:45.729] [ ] Waiting for event of type {'productOnClient_updated'} with data [{'clientId': '<<client>>', 'productId': 'memoq', 'installationStatus': 'installed', 'actionResult': 'successful'}, {'clientId': '<<client>>', 'productId': 'memoq', 'installationStatus': 'unknown', 'actionResult': 'failed'}] to occur (__init__.py:104)
[5] [2025-07-24 15:08:46.730] [ ] Connecting to opsi messagebus (opsiservice.py:2147)
[5] [2025-07-24 15:08:46.745] [ ] Connected to opsi messagebus (id='140106341301760') (opsiservice.py:1917)
[5] [2025-07-24 15:08:46.747] [ ] Subscribing to channels: ['event:productOnClient_updated'] (messagebus.py:132)
[5] [2025-07-24 15:08:49.575] [ ] Received event with matching data: (event, event:productOnClient_updated, service_worker:opsi:1) (data={'productId': 'memoq', 'productType': 'LocalbootProduct', 'clientId': '<<client>>', 'installationStatus': 'installed', 'actionRequest': 'setup', 'actionResult': 'successful'}) (__init__.py:75)
[5] [2025-07-24 15:08:49.575] [ ] Disconnecting from opsi messagebus (id='140106341301760') (opsiservice.py:2250)
{
"productId": "memoq",
"productType": "LocalbootProduct",
"clientId": "<<client>>",
"installationStatus": "installed",
"actionRequest": "setup",
"actionResult": "successful"
}
Im Instlog:
(229) [1] [2025-07-24 15:09:52.665] [memoq] script finished: success