Le "bug" est présent également sur la dernière nightly.
En revanche, si je vire "and setuphelpers.running_on_ac()" de la ligne 1725 du fichier waptservice/service.py, tout fonctionne comme sur des roulettes !

Le 07/03/2022 à 16:20, Jordi Morillo via WAPT a écrit :

Bonjour,

Pour le moment, l'agent Linux ne gère pas (encore) l'upgrade des packages au shutdown.

Du coup, j'ai voulu jouer avec l'option waptupgrade_task_period et me voila avec une question + 1 bug ?

1) pourquoi cette option est-elle à None par défaut sur un Linux ? :)

2) lorsque je set une valeur en minutes (ex: 60), j'ai une belle erreur:


Mar  7 16:15:35 pf4g5gb waptservice[2571]: 2022-03-07 16:15:35,137 [wapttasks WaptTaskManager 140356416648960] WARNING Error checking scheduled tasks : Traceback (most recent call last):
Mar  7 16:15:35 pf4g5gb waptservice[2571]:   File "/opt/wapt/waptservice/service.py", line 1784, in run
Mar  7 16:15:35 pf4g5gb waptservice[2571]:     self.running_task = self.tasks_queue.get(timeout=waptconfig.waptservice_poll_timeout)
Mar  7 16:15:35 pf4g5gb waptservice[2571]:   File "/opt/wapt/lib/python3.8/queue.py", line 178, in get
Mar  7 16:15:35 pf4g5gb waptservice[2571]:     raise Empty
Mar  7 16:15:35 pf4g5gb waptservice[2571]: _queue.Empty
Mar  7 16:15:35 pf4g5gb waptservice[2571]: During handling of the above exception, another exception occurred:
Mar  7 16:15:35 pf4g5gb waptservice[2571]: Traceback (most recent call last):
Mar  7 16:15:35 pf4g5gb waptservice[2571]:   File "/opt/wapt/waptservice/service.py", line 1857, in run
Mar  7 16:15:35 pf4g5gb waptservice[2571]:     self.check_scheduled_tasks()
Mar  7 16:15:35 pf4g5gb waptservice[2571]:   File "/opt/wapt/waptservice/service.py", line 1700, in check_scheduled_tasks
Mar  7 16:15:35 pf4g5gb waptservice[2571]:     if waptconfig.waptupgrade_task_period is not None and setuphelpers.running_on_ac():
Mar  7 16:15:35 pf4g5gb waptservice[2571]: AttributeError: module 'setuphelpers' has no attribute 'running_on_ac'




Bonne fin de journée à vous




_______________________________________________
WAPT mailing list
WAPT@lists.tranquil.it
http://lists.tranquil.it/listinfo/wapt
--
https://www.yeswehack.com/wp-content/uploads/2020/12/PICTO-red.png
Jordi MORILLO
System and Network Administrator

https://www.yeswehack.com/wp-content/uploads/2019/05/YWH-white-sans-cartouche.png

#1 European Bug Bounty & VDP Platform