Hi Philippe, I see. I think we should firstly fix the issue with the issue with the test.ping that you've mentioned in your github issue. Test.ping must work in a reliable way, since other Uyuni functionality (like the inactivity status) relies on that. I'll ask you for some additional info directly in your github issue. Cheers, Franky. On 2021-02-03 12:30, Bidault, Philippe wrote:
Hi Franky,
Thanks for the info, I will give a try to '--ssh-option'.
I am in fact trying to use salt-ssh command to have a status of my registered ssh-push clients because I have difficulties to know the real status of the registered clients. From what I can see, Uyuni checks the status of its registered salt-ssh clients by executing the salt test.ping command. However and surprisingly, when a test.ping fails for a reason or another (Root ssh login not authorized anymore, Salt SHIM corrupted, ....) , the registered client is not flagged as such, so it is really hard to know when a server is finally in a good state in Uyuni or not. I have however observed that when Uyuni has no more test.ping result after some days, it flags the clients as "Inactive" (a small circle with a question mark in it). But this only occurs when taskomatic is not able to trigger salt-ssh push jobs because of all the ssh-push workers being frozen.
I mention this on 2 tickets: https://github.com/uyuni-project/uyuni/issues/2595 https://github.com/uyuni-project/uyuni/issues/3182
Philippe.
Philippe Bidault | Unix Engineer | Getronics
M. 34617301667 | E. Philippe.Bidault@Getronics.com | W. www.getronics.com
Getronics CMC Service Desk Iberia S.L - VAT No:S.L.: B66686262. Registered Office - Getronics CMC Service Desk Iberia S.L, C/Rosselloi, Porcel, 21 planta 11, 08016 Barcelona, Spain. The information transmitted is intended only for use by the addressee and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of it, or the taking of any action in reliance upon this information by persons and/or entities other than the intended recipient is prohibited. If you received this in error, please inform the sender and/or addressee immediately and delete the material. Thank you.
Legal disclaimer: http://www.getronics.com/legal/ -----Original Message----- From: fkobzik@suse.de <fkobzik@suse.de> Sent: miércoles, 3 de febrero de 2021 9:45 To: Bidault, Philippe <Philippe.Bidault@Getronics.com> Cc: uyuni-users@opensuse.org Subject: Re: How to check salt-ssh clients status through Uyuni proxy
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi Philippe,
the salt-ssh clients via proxy don't necessarily need to be visible from the server. For managing salt-ssh clients via proxy, Uyuni server internally creates a
You have following options: 1. You could try running the test.ping from the Uyuni Web UI (in Salt -> Remote Commands). This should target all salt clients registered to Uyuni. 2. If you want to use command line, you can try to craft the ssh command yourself, but you need to tell salt-ssh to use the proxy as a jump host (I assume via '--ssh-option') 3. Maybe it would be enough for your purposes to use the Uyuni API: there are multiple endpoints that return systems together with their last checkin times in Uyuni. Check the: system.listSystems, system.listActiveSystems, system.listInactiveSystems, system.listUserSystems and system.searchByName
HTH
Cheers, Franky.
On 2021-02-01 09:56, Bidault, Philippe wrote:
Hi all,
I am able to check the status of a ssh_push registered clients by executing this command directly from the Uyuni server:
salt-ssh --priv /srv/susemanager/salt/salt_ssh/mgr_ssh_id 'my_ssh_push_registered_server' test.ping
However I am struggling trying to have this working for a server going through an Uyuni proxy and not registered directly on Uyuni.
Do you have an idea ?
Regards, Philippe.
Philippe Bidault | Unix Engineer | Getronics ________________________________ M. 34617301667 | E. Philippe.Bidault@Getronics.com | W. www.getronics.com<https://www.getronics.com>
[cid:3-lines_7512e235-163a-4853-8e4f-b0d4fc62ce73.png]<https://getroni cs.com/>
Getronics CMC Service Desk Iberia S.L - VAT No:S.L.: B66686262. Registered Office - Getronics CMC Service Desk Iberia S.L, C/Rosselloi, Porcel, 21 planta 11, 08016 Barcelona, Spain.
The information transmitted is intended only for use by the addressee and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of it, or the taking of any action in reliance upon this information by persons and/or entities other than the intended recipient is prohibited. If you received this in error, please inform the sender and/or addressee immediately and delete the material. Thank you. Legal disclaimer: http://www.getronics.com/legal/