Wait for the device certificate before probing Linux enrollment
This commit is contained in:
@@ -194,7 +194,12 @@ def installed():
|
||||
def healthy(version, baseline, duration=90, pin=None):
|
||||
until = time.monotonic() + duration
|
||||
started = time.time()
|
||||
certificate_pointer = STATE / 'certificates/current.json'
|
||||
while time.monotonic() < until:
|
||||
# The agent writes this pointer after obtaining its first device certificate.
|
||||
if not certificate_pointer.is_file():
|
||||
time.sleep(2)
|
||||
continue
|
||||
try:
|
||||
record = installed()
|
||||
contact = record.get('last_contact_at')
|
||||
|
||||
Reference in New Issue
Block a user