Commit Graph

33 Commits

Author SHA1 Message Date
Guillaume Raffy 3f371e27c1 fixed bug in the cluster node automatic update system that caused the apt security updates to be ignored by the mechanism that checks if an update is required.
this misfunction was picked up by xymon/apt, which comainted that the Last apt update was too old

This regression was introduced in commit [29ce88975f], which replaced the unattended upgrade mechanism with the cluster cron based autoupdate mechanism (but only for alambix clustern, for some reason)

The bug in the cluster cron based autoupdate system was caused by the fact that the code forgot to update the package list before calling apt list --upgradable. As a result, the package list was never updated on alambix, and therefore scurity updates were never seen. This problem was not present on physix, which does still have the unattended upgrade mechansim along with the cluster cron based autoupdate system.

fixes [https://bugzilla.ipr.univ-rennes.fr/show_bug.cgi?id=3810]
2024-04-10 17:04:02 +02:00
Jeremy Gardais 15992d9393
Ignore error message for qconf result 2021-12-22 10:53:33 +01:00
Jeremy Gardais 1cd20da9b6
Use localhost as default master to allow host lookup 2021-12-15 05:59:02 +01:00
Jeremy Gardais 1d1bf88bd6
Get SGE master from config file 2021-12-09 15:33:27 +01:00
Jeremy Gardais 123f5afaa2
Also verify that node is a SGE submit host 2021-11-16 10:18:59 +01:00
Jeremy Gardais 194d488340
Test earlier if SGE Master is reachable 2021-04-20 07:41:38 +02:00
Jeremy Gardais 903143a00e
Check APT upgrade if SGE queue is already disable 2021-04-12 09:26:55 +02:00
Jeremy Gardais ecea1311cc
Exit earlier if APT temp file exists 2021-04-12 09:13:00 +02:00
Jeremy Gardais ba359c4f75
Exit if sge_qmaster host is not reachable 2021-03-11 14:50:25 +01:00
Jeremy Gardais 9617abc968
Test is_sge_host earlier 2021-01-26 20:02:22 +01:00
Jeremy Gardais 259fbd8531
Exit if SGE isn't available on a host 2021-01-26 18:23:01 +01:00
Jeremy Gardais c7093dd177
Re-add APT_TMP_FILE…
Due to a previous unwanted remove…
Otherwise the SGE queue is re-enable in the hour.
2020-12-29 11:40:13 +01:00
Jeremy Gardais 036975b8fc
Fix EMPTY_ONLY_MODE definition 2020-12-04 08:36:04 +01:00
Jeremy Gardais 4e87760e43
Add EMPTY_ONLY_MODE (exit if slots not empty) 2020-12-03 12:49:55 +01:00
Jeremy Gardais 06f7dadcd8
Remove too complicated tests (attempts, % used slots) 2020-12-03 12:38:50 +01:00
Jeremy Gardais fc37812f7b
Correct size of one line in temp file 2020-11-30 17:50:27 +01:00
Jeremy Gardais 2036f081fe
Allow to manage max_attempts with argument (-a,-t)
With -a, --attempt, --attempts, -t or --tries.
2020-11-30 15:31:02 +01:00
Jeremy Gardais fbe10bda8f
Rename days to attempts
If we run X times the script with available upgrade, the SGE queue will
be disabled.
2020-11-30 14:45:23 +01:00
Jeremy Gardais 62128c89bb
Test apt upgrade before all sub-tests 2020-09-25 15:08:51 +02:00
Jeremy Gardais 7c2edce71d
If no test succeed, just add content to temp file 2020-09-25 13:42:59 +02:00
Jeremy Gardais fed34bae66
Move some vars def to define_vars function 2020-09-25 13:39:27 +02:00
Jeremy Gardais 7f8947dac9
Disable queue if pending upgrade for more than 3 days 2020-09-25 13:24:20 +02:00
Jeremy Gardais d79c9fe833
Disable SGE queue if used slots is EMPTY 2020-09-25 11:36:12 +02:00
Jeremy Gardais d9beee6e27
Disable queue if used slots reach a percentage 2020-09-25 10:03:24 +02:00
Jeremy Gardais 8b7a32ccfb
Allow some basics options (-h and -d) 2020-09-24 15:18:09 +02:00
Jeremy Gardais e35b7af614
Disable queue when 0 pending jobs 2020-09-24 14:56:27 +02:00
Jeremy Gardais c1d23c04f6
debug func return 0 to allow chain function 2020-08-20 10:02:11 +02:00
Jeremy Gardais b13eaf3564
Remove APT warning 2020-06-25 08:50:17 +02:00
Jeremy Gardais 05bc7ac54e
Rename sge disable queue script 2020-06-22 11:25:11 +02:00
Jeremy Gardais 6a84224f8a
Create a temp file if APT upgrade is available 2020-06-18 08:45:28 +02:00
Jeremy Gardais 06b03ea27c
Exit with success if everything was ok 2020-06-15 13:49:25 +02:00
Jeremy Gardais 19a233d145
Forgot to update the vars after debug 2020-06-04 16:52:10 +02:00
Jeremy Gardais 8ea845f74e
Rename script to check APT updates 2020-06-04 16:43:17 +02:00