@@ -339,11 +339,7 @@ def summarize_check_results(results: list[bool], step_data: dict[Mode, list[Step
339339
340340 return False
341341
342- def do_interrupt (interrupt_data : str , root_mount : str , copy_dir : str , on_host : bool ) -> bool :
343- """
344- Run an interrupt if there hasn't been an interrupt already for the skyhook ID.
345- """
346-
342+ def make_config_data_from_resource_id () -> dict :
347343 SKYHOOK_RESOURCE_ID , _ = _get_env_config ()
348344
349345 # Interrupts don't really have config data we can read from the Package as it is run standalone.
@@ -354,6 +350,16 @@ def do_interrupt(interrupt_data: str, root_mount: str, copy_dir: str, on_host: b
354350 "package_name" : package ,
355351 "package_version" : version ,
356352 }
353+ return config_data
354+
355+ def do_interrupt (interrupt_data : str , root_mount : str , copy_dir : str , on_host : bool ) -> bool :
356+ """
357+ Run an interrupt if there hasn't been an interrupt already for the skyhook ID.
358+ """
359+
360+ SKYHOOK_RESOURCE_ID , _ = _get_env_config ()
361+
362+ config_data = make_config_data_from_resource_id ()
357363
358364 interrupt = interrupts .inflate (interrupt_data )
359365
@@ -514,11 +520,36 @@ def cli(sys_argv: list[str]=sys.argv):
514520 # new way with interrupt data
515521 mode , root_mount , copy_dir , interrupt_data = args
516522
517- if os .getenv ("COPY_RESOLV" , "true" ).lower () == "true" :
523+ copy_resolv = os .getenv ("COPY_RESOLV" , "true" ).lower () == "true"
524+ if copy_resolv :
518525 shutil .copyfile ("/etc/resolv.conf" , f"{ root_mount } /etc/resolv.conf" )
519526
520527 always_run_step = os .getenv ("OVERLAY_ALWAYS_RUN_STEP" , "false" ).lower () == "true"
521528
529+ # Print all of the configuration flags as a separate line
530+ print ("-" * 20 )
531+ print (str .center ("CLI CONFIGURATION" , 20 , "-" ))
532+ print (f"mode: { mode } " )
533+ print (f"root_mount: { root_mount } " )
534+ print (f"copy_dir: { copy_dir } " )
535+ print (f"interrupt_data: { interrupt_data } " )
536+ print (f"always_run_step: { always_run_step } " )
537+ print (str .center ("ENV CONFIGURATION" , 20 , "-" ))
538+ print (f"COPY_RESOLV: { copy_resolv } " )
539+ print (f"OVERLAY_ALWAYS_RUN_STEP: { always_run_step } " )
540+ SKYHOOK_RESOURCE_ID , SKYHOOK_DATA_DIR = _get_env_config ()
541+ print (f"SKYHOOK_RESOURCE_ID: { SKYHOOK_RESOURCE_ID } " )
542+ print (f"SKYHOOK_DATA_DIR: { SKYHOOK_DATA_DIR } " )
543+ print (f"SKYHOOK_AGENT_BUFFER_LIMIT: { buff_size } " )
544+ print (str .center ("Directory CONFIGURATION" , 20 , "-" ))
545+ # print flag dir and log dir
546+ config_data = make_config_data_from_resource_id ()
547+ print (f"flag_dir: { get_flag_dir (root_mount )} /{ config_data ['package_name' ]} /{ config_data ['package_version' ]} " )
548+ log_dir = '/' .join (get_log_file (root_mount , 'step' ,copy_dir , config_data , timestamp = 'timestamp' ).split ('/' )[:- 1 ])
549+ print (f"log_dir: { log_dir } " )
550+ print (f"history_file: { get_history_dir (root_mount )} /{ config_data ['package_name' ]} .json" )
551+ print ("-" * 20 )
552+
522553 return main (mode , root_mount , copy_dir , interrupt_data , always_run_step )
523554
524555
0 commit comments