os-autoinst / openQA

openQA web-frontend, scheduler and tools.
http://openqa.opensuse.org/
GNU General Public License v2.0
314 stars 206 forks source link

Prevent failure when restarting Minion-related services #5761

Closed Martchus closed 1 month ago

Martchus commented 1 month ago

Not all services we are trying to restart might be installed, e.g. in production setups workers are on separate hosts and therefore no cache service units are present. This change treats the restart still as success if not all units can be found.

Related ticket: https://progress.opensuse.org/issues/163013

Martchus commented 1 month ago

I tested this by modifying the unit locally to include units that don't exist. I checked whether the units that do exist are still restarted when some don't and they are. I also tested the case when all units exists and it works (so exit code 0 doesn't need to be mentioned explicitly).