-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Minor
-
Component/s: accurev-plugin
-
None
-
Environment:AccuRev server authentication using "accurev_login" or "custom" authentication.
AccuRev has a "feature" whereby clients can be (spontaneously and unpredictably) logged out.
e.g. if the slave's DHCP-assigned IP address changes (AccuRev say that this is "working as designed" and anyone using accurev shouldn't use DHCP), or someone else (on another machine) tries to use the same authentication token (they'll fail, but the server will log out the official owner of that token causing a denial-of-service), or another process (e.g. anti-virus) on the local machine has locked the file that contains the authentication token and thus made it (temporarily) unavailable at the time that the client process tried to read it.
This all means that any accurev client command can exit(1) and report "Not authenticated. Please use the 'login' command to authenticate.", for any accurev command, seemingly at random (from the slave's point of view), which is then highly likely to cause the build to be reported as a failure.
JENKINS-9629 implemented a partial workaround for this, coping with situations where the client was logged out in between builds, however this is insufficent to cope with all scenarios - one still gets build failures due to accurev deciding (part-way through the series of accurev commands) that it isn't logged in, and if one has enabled snapshots then the "retry if the SCM fails" mechanism won't work, resulting in a failed build.
What's needed is for the plugin to check the result of each and every accurev command (except logins), look for the "Not authenticated" error and automatically re-login and retry the command whenever it occurrs.