"Join" column empty after reimage + rejoin
-
Morning all.
Small reporting inconsistency in Reports > Directory Membership (FOG 1.6.0.158 stable, agent 0.1.28, AD join). Cosmetic, nothing breaks.
The “Join” column comes from
hdJoinAt. InDirectory_Membership::join()an emptyhdJoinAtwith no error is shown as empty, and the code comment says “Never attempted: the host is already joined, or it has never reported, or nothing has needed doing. Not a problem.”But a host that was reimaged and joined through the rejoin protocol (the result carries an
attempt_id, soDirectoryJoin::report()hands it toDirectoryRejoin::report()) never getshdJoinAtwritten. On top of that,TaskQueue::checkout()callsDirectoryJoin::forgetAttempt()when a Deploy completes, which setshdJoinAtback to NULL. So after every reinstall the host ends up like this:hdJoined=1,hdDomaincorrect, Drift “ok”,hdRejoinStatephaseverifiedhdJoinAtNULL,hdJoinErrorempty, so “Join” is blank
In our case two test VMs that we reinstall many times show a blank “Join” even though they joined correctly and automatically, while hosts joined with the older path (or by hand before) show “ok”. Looking at the report you can’t tell the two cases apart, and a blank reads as “never joined”.
I checked the unpatched
DirectoryRejoin.php(before our local #2122 patch) and it has nojoinAteither, so it is not caused by that.Thanks for the help.