Wait for the device certificate before probing Linux enrollment

This commit is contained in:
2026-11-18 18:09:52 +01:00
parent bfdc3da8af
commit 4b3d0136e9
2 changed files with 40 additions and 0 deletions
+5
View File
@@ -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')