@@ -848,8 +848,8 @@ pub struct PlanningZoneUpdatesStepReport {
848848 pub out_of_date_zones : BTreeMap < SledUuid , Vec < PlanningOutOfDateZone > > ,
849849 pub expunged_zones : BTreeMap < SledUuid , Vec < BlueprintZoneConfig > > ,
850850 pub updated_zones : BTreeMap < SledUuid , Vec < BlueprintZoneConfig > > ,
851- pub unsafe_zones : BTreeMap < BlueprintZoneConfig , ZoneUnsafeToShutdown > ,
852- pub waiting_zones : BTreeMap < BlueprintZoneConfig , ZoneWaitingToExpunge > ,
851+ pub unsafe_zones : BTreeMap < OmicronZoneUuid , ZoneUnsafeToShutdown > ,
852+ pub waiting_zones : BTreeMap < OmicronZoneUuid , ZoneWaitingToExpunge > ,
853853}
854854
855855impl PlanningZoneUpdatesStepReport {
@@ -934,15 +934,15 @@ impl PlanningZoneUpdatesStepReport {
934934 zone : & BlueprintZoneConfig ,
935935 reason : ZoneUnsafeToShutdown ,
936936 ) {
937- self . unsafe_zones . insert ( zone. clone ( ) , reason) ;
937+ self . unsafe_zones . insert ( zone. id , reason) ;
938938 }
939939
940940 pub fn waiting_zone (
941941 & mut self ,
942942 zone : & BlueprintZoneConfig ,
943943 reason : ZoneWaitingToExpunge ,
944944 ) {
945- self . waiting_zones . insert ( zone. clone ( ) , reason) ;
945+ self . waiting_zones . insert ( zone. id , reason) ;
946946 }
947947}
948948
@@ -1001,28 +1001,16 @@ impl fmt::Display for PlanningZoneUpdatesStepReport {
10011001 if !unsafe_zones. is_empty ( ) {
10021002 let ( n, s) = plural_map ( unsafe_zones) ;
10031003 writeln ! ( f, "* {n} zone{s} not ready to shut down safely:" ) ?;
1004- for ( zone, reason) in unsafe_zones. iter ( ) {
1005- writeln ! (
1006- f,
1007- " * zone {} ({}): {}" ,
1008- zone. id,
1009- zone. zone_type. kind( ) . report_str( ) ,
1010- reason,
1011- ) ?;
1004+ for ( zone_id, reason) in unsafe_zones. iter ( ) {
1005+ writeln ! ( f, " * zone {zone_id}: {reason}" ) ?;
10121006 }
10131007 }
10141008
10151009 if !waiting_zones. is_empty ( ) {
10161010 let ( n, s) = plural_map ( waiting_zones) ;
10171011 writeln ! ( f, "* {n} zone{s} waiting to be expunged:" ) ?;
1018- for ( zone, reason) in waiting_zones. iter ( ) {
1019- writeln ! (
1020- f,
1021- " * zone {} ({}): {}" ,
1022- zone. id,
1023- zone. zone_type. kind( ) . report_str( ) ,
1024- reason,
1025- ) ?;
1012+ for ( zone_id, reason) in waiting_zones. iter ( ) {
1013+ writeln ! ( f, " * zone {zone_id}: {reason}" ) ?;
10261014 }
10271015 }
10281016
@@ -1076,7 +1064,9 @@ pub enum ZoneUnsafeToShutdown {
10761064impl fmt:: Display for ZoneUnsafeToShutdown {
10771065 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
10781066 match self {
1079- Self :: Cockroachdb { reason } => write ! ( f, "{reason}" ) ,
1067+ Self :: Cockroachdb { reason } => {
1068+ write ! ( f, "cockroach unsafe to shut down: {reason}" )
1069+ }
10801070 Self :: BoundaryNtp {
10811071 total_boundary_ntp_zones : t,
10821072 synchronized_count : s,
@@ -1107,7 +1097,7 @@ impl fmt::Display for ZoneWaitingToExpunge {
11071097 Self :: Nexus { zone_generation } => {
11081098 write ! (
11091099 f,
1110- "image out-of-date, but zone's nexus_generation \
1100+ "nexus image out-of-date, but nexus_generation \
11111101 {zone_generation} is still active"
11121102 )
11131103 }
0 commit comments