@@ -712,15 +712,6 @@ impl CompletedCollectionStep {
712712 report. ereports = Some ( status) ;
713713 Status :: Ok
714714 }
715- CollectionStepOutput :: SavingSpDumps { listed_sps } => {
716- report. listed_sps = listed_sps;
717- Status :: Ok
718- }
719- CollectionStepOutput :: SpawnSleds { extra_steps } => {
720- report. listed_in_service_sleds = true ;
721- steps. extend ( extra_steps) ;
722- Status :: Ok
723- }
724715 CollectionStepOutput :: Spawn { extra_steps } => {
725716 steps. extend ( extra_steps) ;
726717 Status :: Ok
@@ -747,14 +738,7 @@ enum CollectionStepOutput {
747738 // It may have still saved a partial set of data to the bundle.
748739 Failed ( anyhow:: Error ) ,
749740 Ereports ( SupportBundleEreportStatus ) ,
750- SavingSpDumps { listed_sps : bool } ,
751- // NOTE: The distinction between this and "Spawn" is pretty artificial -
752- // it's just to preserve a part of the report which says "we tried to
753- // list in-service sleds".
754- //
755- // If we changed the collection report, this could easily be combined
756- // with the "Spawn" variant.
757- SpawnSleds { extra_steps : Vec < CollectionStep > } ,
741+ // The step spawned additional steps to execute
758742 Spawn { extra_steps : Vec < CollectionStep > } ,
759743 // The step completed with nothing to report, and no follow-up steps
760744 None ,
@@ -1232,7 +1216,7 @@ impl BundleCollection {
12321216 format ! ( "failed to save SP dump from: {} {}" , sp. type_, sp. slot)
12331217 } ) ?;
12341218
1235- Ok ( CollectionStepOutput :: SavingSpDumps { listed_sps : true } )
1219+ Ok ( CollectionStepOutput :: None )
12361220 }
12371221
12381222 // Perform the work of collecting the support bundle into a temporary directory
@@ -1268,25 +1252,25 @@ impl BundleCollection {
12681252
12691253 let steps: Vec < CollectionStep > = vec ! [
12701254 CollectionStep :: new(
1271- "bundle id" ,
1255+ SupportBundleCollectionStep :: STEP_BUNDLE_ID ,
12721256 Box :: new( |collection, dir| {
12731257 collection. collect_bundle_id( dir) . boxed( )
12741258 } ) ,
12751259 ) ,
12761260 CollectionStep :: new(
1277- "reconfigurator state" ,
1261+ SupportBundleCollectionStep :: STEP_RECONFIGURATOR_STATE ,
12781262 Box :: new( |collection, dir| {
12791263 collection. collect_reconfigurator_state( dir) . boxed( )
12801264 } ) ,
12811265 ) ,
12821266 CollectionStep :: new(
1283- "ereports" ,
1267+ SupportBundleCollectionStep :: STEP_EREPORTS ,
12841268 Box :: new( |collection, dir| {
12851269 collection. collect_ereports( dir) . boxed( )
12861270 } ) ,
12871271 ) ,
12881272 CollectionStep :: new(
1289- "sled cubby info" ,
1273+ SupportBundleCollectionStep :: STEP_SLED_CUBBY_INFO ,
12901274 Box :: new( {
12911275 let all_sleds = all_sleds. clone( ) ;
12921276 let mgs_client = mgs_client. clone( ) ;
@@ -1305,7 +1289,7 @@ impl BundleCollection {
13051289 } ) ,
13061290 ) ,
13071291 CollectionStep :: new(
1308- "spawn steps to query all SP dumps" ,
1292+ SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS ,
13091293 Box :: new( {
13101294 let mgs_client = mgs_client. clone( ) ;
13111295 move |collection, dir| {
@@ -1319,7 +1303,7 @@ impl BundleCollection {
13191303 } ) ,
13201304 ) ,
13211305 CollectionStep :: new(
1322- "spawn steps to query all sleds" ,
1306+ SupportBundleCollectionStep :: STEP_SPAWN_SLEDS ,
13231307 Box :: new( {
13241308 let all_sleds = all_sleds. clone( ) ;
13251309 move |collection, _| {
@@ -1369,7 +1353,7 @@ impl BundleCollection {
13691353 ) ) ;
13701354 }
13711355
1372- return Ok ( CollectionStepOutput :: SpawnSleds { extra_steps } ) ;
1356+ return Ok ( CollectionStepOutput :: Spawn { extra_steps } ) ;
13731357 }
13741358
13751359 // Collect data from a sled, storing it into a directory that will
@@ -2509,8 +2493,16 @@ mod test {
25092493 . expect ( "Collection should have succeeded under test" )
25102494 . expect ( "Collecting the bundle should have generated a report" ) ;
25112495 assert_eq ! ( report. bundle, bundle. id. into( ) ) ;
2512- assert ! ( report. listed_in_service_sleds) ;
2513- assert ! ( report. listed_sps) ;
2496+ // Verify that we spawned steps to query sleds and SPs
2497+ let step_names: Vec < _ > =
2498+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2499+ assert ! (
2500+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2501+ ) ;
2502+ assert ! (
2503+ step_names
2504+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2505+ ) ;
25142506 assert ! ( report. activated_in_db_ok) ;
25152507 assert_eq ! (
25162508 report. ereports,
@@ -2591,8 +2583,16 @@ mod test {
25912583 . expect ( "Collection should have succeeded under test" )
25922584 . expect ( "Collecting the bundle should have generated a report" ) ;
25932585 assert_eq ! ( report. bundle, bundle. id. into( ) ) ;
2594- assert ! ( report. listed_in_service_sleds) ;
2595- assert ! ( report. listed_sps) ;
2586+ // Verify that we spawned steps to query sleds and SPs
2587+ let step_names: Vec < _ > =
2588+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2589+ assert ! (
2590+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2591+ ) ;
2592+ assert ! (
2593+ step_names
2594+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2595+ ) ;
25962596 assert ! ( report. activated_in_db_ok) ;
25972597
25982598 let observed_bundle = datastore
@@ -2678,8 +2678,16 @@ mod test {
26782678 . expect ( "Collection should have succeeded under test" )
26792679 . expect ( "Collecting the bundle should have generated a report" ) ;
26802680 assert_eq ! ( report. bundle, bundle1. id. into( ) ) ;
2681- assert ! ( report. listed_in_service_sleds) ;
2682- assert ! ( report. listed_sps) ;
2681+ // Verify that we spawned steps to query sleds and SPs
2682+ let step_names: Vec < _ > =
2683+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2684+ assert ! (
2685+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2686+ ) ;
2687+ assert ! (
2688+ step_names
2689+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2690+ ) ;
26832691 assert ! ( report. activated_in_db_ok) ;
26842692
26852693 // This is observable by checking the state of bundle1 and bundle2:
@@ -2701,8 +2709,16 @@ mod test {
27012709 . expect ( "Collection should have succeeded under test" )
27022710 . expect ( "Collecting the bundle should have generated a report" ) ;
27032711 assert_eq ! ( report. bundle, bundle2. id. into( ) ) ;
2704- assert ! ( report. listed_in_service_sleds) ;
2705- assert ! ( report. listed_sps) ;
2712+ // Verify that we spawned steps to query sleds and SPs
2713+ let step_names: Vec < _ > =
2714+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2715+ assert ! (
2716+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2717+ ) ;
2718+ assert ! (
2719+ step_names
2720+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2721+ ) ;
27062722 assert ! ( report. activated_in_db_ok) ;
27072723
27082724 // After another collection request, we'll see that both bundles have
@@ -2827,8 +2843,16 @@ mod test {
28272843 . expect ( "Collection should have succeeded under test" )
28282844 . expect ( "Collecting the bundle should have generated a report" ) ;
28292845 assert_eq ! ( report. bundle, bundle. id. into( ) ) ;
2830- assert ! ( report. listed_in_service_sleds) ;
2831- assert ! ( report. listed_sps) ;
2846+ // Verify that we spawned steps to query sleds and SPs
2847+ let step_names: Vec < _ > =
2848+ report. steps . iter ( ) . map ( |s| s. name . as_str ( ) ) . collect ( ) ;
2849+ assert ! (
2850+ step_names. contains( & SupportBundleCollectionStep :: STEP_SPAWN_SLEDS )
2851+ ) ;
2852+ assert ! (
2853+ step_names
2854+ . contains( & SupportBundleCollectionStep :: STEP_SPAWN_SP_DUMPS )
2855+ ) ;
28322856 assert ! ( report. activated_in_db_ok) ;
28332857
28342858 // Cancel the bundle after collection has completed
0 commit comments