infix icon indicating copy to clipboard operation
infix copied to clipboard

Refactor bootstrap for developer debug

Open troglobit opened this issue 1 year ago • 0 comments

Currently a lot of system bootstrap tasks, like loading YANG models and startup-config, is done in runlevel S. When completed, the system proceeds to runlevel 2 to bring up networking and system services.

This presents bit of a problem for board bring-up and debugging.

An alternative bootstrap could be to let runlevel S only do the absolute minimal so that a kernel command line argument S could bring the system to single user mode (runlevel 1) without having loaded YANG models and startup-config, and thus leaving the system in a "debuggable" state -- provided of course the Infix image has password-less root login enabled.

The impact of the change on the system would be minimal (if any):

  • current runlevel S tasks move to runlevel 2
  • add a task in runlevel 2 that waits for startup-config to be loaded and trigger change to runlevel 3
  • all services currently starting in runlevel 2 would be moved to runlevel 3

Idea by: @wkz

troglobit avatar Mar 27 '24 08:03 troglobit