@@ -629,15 +629,6 @@ impl CompletedCollectionStep {
629629 report. ereports = Some ( status) ;
630630 Status :: Ok
631631 }
632- CollectionStepOutput :: SavingSpDumps { listed_sps } => {
633- report. listed_sps = listed_sps;
634- Status :: Ok
635- }
636- CollectionStepOutput :: SpawnSleds { extra_steps } => {
637- report. listed_in_service_sleds = true ;
638- steps. extend ( extra_steps) ;
639- Status :: Ok
640- }
641632 CollectionStepOutput :: Spawn { extra_steps } => {
642633 steps. extend ( extra_steps) ;
643634 Status :: Ok
@@ -664,14 +655,7 @@ enum CollectionStepOutput {
664655 // It may have still saved a partial set of data to the bundle.
665656 Failed ( anyhow:: Error ) ,
666657 Ereports ( SupportBundleEreportStatus ) ,
667- SavingSpDumps { listed_sps : bool } ,
668- // NOTE: The distinction between this and "Spawn" is pretty artificial -
669- // it's just to preserve a part of the report which says "we tried to
670- // list in-service sleds".
671- //
672- // If we changed the collection report, this could easily be combined
673- // with the "Spawn" variant.
674- SpawnSleds { extra_steps : Vec < CollectionStep > } ,
658+ // The step spawned additional steps to execute
675659 Spawn { extra_steps : Vec < CollectionStep > } ,
676660 // The step completed with nothing to report, and no follow-up steps
677661 None ,
@@ -1149,7 +1133,7 @@ impl BundleCollection {
11491133 format ! ( "failed to save SP dump from: {} {}" , sp. type_, sp. slot)
11501134 } ) ?;
11511135
1152- Ok ( CollectionStepOutput :: SavingSpDumps { listed_sps : true } )
1136+ Ok ( CollectionStepOutput :: None )
11531137 }
11541138
11551139 // Perform the work of collecting the support bundle into a temporary directory
@@ -1185,25 +1169,25 @@ impl BundleCollection {
11851169
11861170 let steps: Vec < CollectionStep > = vec ! [
11871171 CollectionStep :: new(
1188- "bundle id" ,
1172+ SupportBundleCollectionStep :: STEP_BUNDLE_ID ,
11891173 Box :: new( |collection, dir| {
11901174 collection. collect_bundle_id( dir) . boxed( )
11911175 } ) ,
11921176 ) ,
11931177 CollectionStep :: new(
1194- "reconfigurator state" ,
1178+ SupportBundleCollectionStep :: STEP_RECONFIGURATOR_STATE ,
11951179 Box :: new( |collection, dir| {
11961180 collection. collect_reconfigurator_state( dir) . boxed( )
11971181 } ) ,
11981182 ) ,
11991183 CollectionStep :: new(
1200- "ereports" ,
1184+ SupportBundleCollectionStep :: STEP_EREPORTS ,
12011185 Box :: new( |collection, dir| {
12021186 collection. collect_ereports( dir) . boxed( )
12031187 } ) ,
12041188 ) ,
12051189 CollectionStep :: new(
1206- "sled cubby info" ,
1190+ SupportBundleCollectionStep :: STEP_SLED_CUBBY_INFO ,
12071191 Box :: new( {
12081192 let all_sleds = all_sleds. clone( ) ;
12091193 let mgs_client = mgs_client. clone( ) ;
@@ -1222,7 +1206,7 @@ impl BundleCollection {
12221206 } ) ,
12231207 ) ,
12241208 CollectionStep :: new(
1225- "spawn steps to query all SP dumps" ,
1209+ SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS ,
12261210 Box :: new( {
12271211 let mgs_client = mgs_client. clone( ) ;
12281212 move |collection, dir| {
@@ -1236,7 +1220,7 @@ impl BundleCollection {
12361220 } ) ,
12371221 ) ,
12381222 CollectionStep :: new(
1239- "spawn steps to query all sleds" ,
1223+ SupportBundleCollectionStep :: STEP_SPAWN_SLEDS ,
12401224 Box :: new( {
12411225 let all_sleds = all_sleds. clone( ) ;
12421226 move |collection, _| {
@@ -1286,7 +1270,7 @@ impl BundleCollection {
12861270 ) ) ;
12871271 }
12881272
1289- return Ok ( CollectionStepOutput :: SpawnSleds { extra_steps } ) ;
1273+ return Ok ( CollectionStepOutput :: Spawn { extra_steps } ) ;
12901274 }
12911275
12921276 // Collect data from a sled, storing it into a directory that will
@@ -2425,8 +2409,16 @@ mod test {
24252409 . expect ( "Collection should have succeeded under test" )
24262410 . expect ( "Collecting the bundle should have generated a report" ) ;
24272411 assert_eq ! ( report. bundle, bundle. id. into( ) ) ;
2428- assert ! ( report. listed_in_service_sleds) ;
2429- assert ! ( report. listed_sps) ;
2412+ // Verify that we spawned steps to query sleds and SPs
2413+ let step_names: Vec < _ > =
2414+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2415+ assert ! (
2416+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2417+ ) ;
2418+ assert ! (
2419+ step_names
2420+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2421+ ) ;
24302422 assert ! ( report. activated_in_db_ok) ;
24312423 assert_eq ! (
24322424 report. ereports,
@@ -2502,8 +2494,16 @@ mod test {
25022494 . expect ( "Collection should have succeeded under test" )
25032495 . expect ( "Collecting the bundle should have generated a report" ) ;
25042496 assert_eq ! ( report. bundle, bundle. id. into( ) ) ;
2505- assert ! ( report. listed_in_service_sleds) ;
2506- assert ! ( report. listed_sps) ;
2497+ // Verify that we spawned steps to query sleds and SPs
2498+ let step_names: Vec < _ > =
2499+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2500+ assert ! (
2501+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2502+ ) ;
2503+ assert ! (
2504+ step_names
2505+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2506+ ) ;
25072507 assert ! ( report. activated_in_db_ok) ;
25082508
25092509 let observed_bundle = datastore
@@ -2591,8 +2591,16 @@ mod test {
25912591 . expect ( "Collection should have succeeded under test" )
25922592 . expect ( "Collecting the bundle should have generated a report" ) ;
25932593 assert_eq ! ( report. bundle, bundle1. id. into( ) ) ;
2594- assert ! ( report. listed_in_service_sleds) ;
2595- assert ! ( report. listed_sps) ;
2594+ // Verify that we spawned steps to query sleds and SPs
2595+ let step_names: Vec < _ > =
2596+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2597+ assert ! (
2598+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2599+ ) ;
2600+ assert ! (
2601+ step_names
2602+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2603+ ) ;
25962604 assert ! ( report. activated_in_db_ok) ;
25972605
25982606 // This is observable by checking the state of bundle1 and bundle2:
@@ -2614,8 +2622,16 @@ mod test {
26142622 . expect ( "Collection should have succeeded under test" )
26152623 . expect ( "Collecting the bundle should have generated a report" ) ;
26162624 assert_eq ! ( report. bundle, bundle2. id. into( ) ) ;
2617- assert ! ( report. listed_in_service_sleds) ;
2618- assert ! ( report. listed_sps) ;
2625+ // Verify that we spawned steps to query sleds and SPs
2626+ let step_names: Vec < _ > =
2627+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2628+ assert ! (
2629+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2630+ ) ;
2631+ assert ! (
2632+ step_names
2633+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2634+ ) ;
26192635 assert ! ( report. activated_in_db_ok) ;
26202636
26212637 // After another collection request, we'll see that both bundles have
@@ -2742,8 +2758,16 @@ mod test {
27422758 . expect ( "Collection should have succeeded under test" )
27432759 . expect ( "Collecting the bundle should have generated a report" ) ;
27442760 assert_eq ! ( report. bundle, bundle. id. into( ) ) ;
2745- assert ! ( report. listed_in_service_sleds) ;
2746- assert ! ( report. listed_sps) ;
2761+ // Verify that we spawned steps to query sleds and SPs
2762+ let step_names: Vec < _ > =
2763+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2764+ assert ! (
2765+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2766+ ) ;
2767+ assert ! (
2768+ step_names
2769+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2770+ ) ;
27472771 assert ! ( report. activated_in_db_ok) ;
27482772
27492773 // Cancel the bundle after collection has completed
0 commit comments