why does useradd.bbclass loop retrying its commands?
The useradd, groupadd, and groupmems commands in useradd.bbclass are executed in a loop with up to 10 failed attempts before they give up. This appears to have always been the case, as long as that file has been present.
Is there any reason why an initial failed attempt to execute one of these commands would be expected to succeed on retry, other than because delaying failure gives a chance for concurrently executing task to complete and so satisfy a dependency?
(This isn't the root cause of the pseudo autobuilder failure under multilib, but it did look plausible for a while.)
Peter
Quoted 9 lines · Peter A. Bigot
The useradd, groupadd, and groupmems commands in useradd.bbclass are executed in a loop with up to 10 failed attempts before they give up. This appears to have always been the case, as long as that file has been present.
Is there any reason why an initial failed attempt to execute one of these commands would be expected to succeed on retry, other than because delaying failure gives a chance for concurrently executing task to complete and so satisfy a dependency?
Another recipe can be altering the files and holding the lock so in theory, yes, the retries can help.
Cheers,
Richard
Quoted 6 lines · Richard Purdie
Quoted 5 lines · Peter A. Bigot
The useradd, groupadd, and groupmems commands in useradd.bbclass are executed in a loop with up to 10 failed attempts before they give up. This appears to have always been the case, as long as that file has been present.
Quoted 6 lines
Quoted 4 lines
Is there any reason why an initial failed attempt to execute one of these commands would be expected to succeed on retry, other than because delaying failure gives a chance for concurrently executing task to complete and so satisfy a dependency?
Another recipe can be altering the files and holding the lock so in theory, yes, the retries can help.
Makes sense. I do see that extrausers.bbclass has a comment explaining why it only passes retries=1.
Peter
Quoted 4 lines · Peter A. Bigot
The useradd, groupadd, and groupmems commands in useradd.bbclass are executed in a loop with up to 10 failed attempts before they give up. This appears to have always been the case, as long as that file has been present.
If multiple recipes/packages have the user, group, or shadow databases open -- the system will block until they are done maniuplating the file.
Quoted 4 lines
Is there any reason why an initial failed attempt to execute one of these commands would be expected to succeed on retry, other than because delaying failure gives a chance for concurrently executing task to complete and so satisfy a dependency?
Depending on system, cores, etc.. we've seen easily it take up to 5-7 tries before the files unlock and are available for processing.
--Mark
Quoted 5 lines
(This isn't the root cause of the pseudo autobuilder failure under multilib, but it did look plausible for a while.)
Peter