Fixes multiple issues with retry function in rhel-registration.
authorVincent S. Cojot <vincent@cojot.name>
Mon, 13 Mar 2017 18:39:16 +0000 (14:39 -0400)
committerVincent S. Cojot <vincent@cojot.name>
Mon, 20 Mar 2017 20:03:05 +0000 (20:03 +0000)
commit1652f1b2518a60bfbfbd1f3f3714e8c22d4e17e5
tree9a3fe2fb967d9e3bf519361e48583613b1d717a3
parent557b0214162ac60b65db93deb4af71dee14a28dd
Fixes multiple issues with retry function in rhel-registration.

There were multiple issues in retry() in rhel-registration:
 - There was no need for it to be recursive (local variables
   got overwritten)
 - There was no delay between multiple attempts, leading to faster but
   more frequent failures.
 - The max number of attempts was set too low for some environements.

With this patch, rhel-registration now works more reliably with slow-links
for portal registration and does not attempt to DDos the portal or your
satellite server.

Closes-Bug: #1674358
Change-Id: I594d3c94867b45a7a58766dbcc66edead78d6a4e
(cherry picked from commit 038eae089130bc3a814897c0e282223de16f4658)
extraconfig/pre_deploy/rhel-registration/scripts/rhel-registration