Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-20 10:15:20

0001 # Seed the first label-reliability rule of the error-correction root
0002 # (docs/ERROR_ATTRIBUTION.md): the pilot 1305 "bind mounting" text is
0003 # apptainer teardown noise the pilot picks up when the payload dies —
0004 # never the actual failure. Confirmed against payload logs (jobs
0005 # 2584600, 2690539, 2704064); the corrected reading refines from the
0006 # matched jobs' payload exit codes.
0007 from django.db import migrations
0008 
0009 
0010 def seed(apps, schema_editor):
0011     ErrorCorrectionRule = apps.get_model('monitor_app',
0012                                          'ErrorCorrectionRule')
0013     ErrorCorrectionRule.objects.get_or_create(
0014         component='pilot', code=1305,
0015         diag_substring='While bind mounting',
0016         defaults={
0017             'corrected_label': 'payload failure (mode undetermined); '
0018                                'the bind-mount text is container '
0019                                'teardown noise, not the cause',
0020             'note': 'The pilot reports stale apptainer stderr as the '
0021                     'payload failure. The real failure is in the '
0022                     'payload log; the exit-code profile gives the '
0023                     'mode. See docs/ERROR_ATTRIBUTION.md.',
0024             'evidence_url': 'https://github.com/BNLNPPS/swf-monitor/'
0025                             'blob/infra/baseline-v43/docs/'
0026                             'ERROR_ATTRIBUTION.md',
0027             'created_by': 'error-attribution',
0028         })
0029 
0030 
0031 def unseed(apps, schema_editor):
0032     ErrorCorrectionRule = apps.get_model('monitor_app',
0033                                          'ErrorCorrectionRule')
0034     ErrorCorrectionRule.objects.filter(
0035         component='pilot', code=1305,
0036         diag_substring='While bind mounting').delete()
0037 
0038 
0039 class Migration(migrations.Migration):
0040 
0041     dependencies = [
0042         ('monitor_app', '0010_errorcorrectionrule'),
0043     ]
0044 
0045     operations = [
0046         migrations.RunPython(seed, unseed),
0047     ]