Bug #7606
closedagent needs a timeout on zypper list-updates
Description
Poor thing is stuck on an unsigned repo.
AFAIK this is run without timeout? The result is that it will be stuck, badly.
@root@rudderc4 /data/admins/flo # /opt/rudder/bin/cf-agent -KI | grep -i pl1
2015-12-14T00:02:36+0100 info: /default/check_sudo_parameters/methods/'any'/default/check_sudo_installation/packages/'sudo'[0]: Q: zypper list-updates ...:File '/repodata/repomd.xml' not found on medium 'http://192.168.10.53/pulp/repos/sles11.3-os-pl1'
2015-12-14T00:04:49+0100 info: /default/check_sudo_parameters/methods/'any'/default/check_sudo_installation/packages/'sudo'[0]: Q: zypper list-updates ...:Abort, retry, ignore? [a/r/i/? shows all options] (a): Problem retrieving files from 'SLES11 SP3 PL1'.
2015-12-14T00:04:49+0100 info: /default/check_sudo_parameters/methods/'any'/default/check_sudo_installation/packages/'sudo'[0]: Q: zypper list-updates ...:File '/repodata/repomd.xml' not found on medium 'http://192.168.10.53/pulp/repos/sles11.3-os-pl1'
2015-12-14T00:04:49+0100 info: /default/check_sudo_parameters/methods/'any'/default/check_sudo_installation/packages/'sudo'[0]: Q: zypper list-updates ...:Warning: Disabling repository 'SLES11 SP3 PL1' because of the above error.
@
The nasty part is this way, even if you have a policy to delete the problematic repo, the agent seems to never reach it.
This one (demo) is stuck for over 10 minutes already.
It absolutely makes sense to allow "no timeout" for software installs, but for metadata fetch it's a bit of overkill. I think 15 seconds would be enough, this system has 8 repos assigned, so a maximum timeout could be under 5 minutes with this change.