@@ -135,7 +135,7 @@ use sled_agent_types::rack_ops::RssStep;
135135use sled_agent_types:: sled:: StartSledAgentRequest ;
136136use sled_hardware_types:: underlay:: BootstrapInterface ;
137137use slog:: Logger ;
138- use slog_error_chain:: InlineErrorChain ;
138+ use slog_error_chain:: { InlineErrorChain , SlogInlineError } ;
139139use std:: collections:: { BTreeMap , BTreeSet , btree_map} ;
140140use std:: collections:: { HashMap , HashSet } ;
141141use std:: iter;
@@ -161,19 +161,19 @@ impl RssProgress {
161161}
162162
163163/// Describes errors which may occur while operating the setup service.
164- #[ derive( Error , Debug ) ]
164+ #[ derive( Error , Debug , SlogInlineError ) ]
165165pub enum SetupServiceError {
166- #[ error( "I/O error while {message}: {err} " ) ]
166+ #[ error( "I/O error while {message}" ) ]
167167 Io {
168168 message : String ,
169169 #[ source]
170170 err : std:: io:: Error ,
171171 } ,
172172
173- #[ error( "Failed to access ledger: {0} " ) ]
173+ #[ error( "Failed to access ledger" ) ]
174174 Ledger ( #[ from] ledger:: Error ) ,
175175
176- #[ error( "Cannot create plan for sled services: {0} " ) ]
176+ #[ error( "Cannot create plan for sled services" ) ]
177177 ServicePlan ( #[ from] ServicePlanError ) ,
178178
179179 #[ error( "Bad configuration for setting up rack: {0}" ) ]
@@ -203,37 +203,37 @@ pub enum SetupServiceError {
203203 #[ error( "Error resetting sled: {0}" ) ]
204204 SledReset ( String ) ,
205205
206- #[ error( "Error making HTTP request to Sled Agent: {0} " ) ]
206+ #[ error( "Error making HTTP request to Sled Agent" ) ]
207207 SledApi ( #[ from] SledAgentError < SledAgentTypes :: Error > ) ,
208208
209209 #[ error( "Sled config not yet reconciled: {0}" ) ]
210210 ConfigNotYetReconciled ( String ) ,
211211
212- #[ error( "Error making HTTP request to Nexus: {0} " ) ]
212+ #[ error( "Error making HTTP request to Nexus" ) ]
213213 NexusApi ( #[ from] NexusError < NexusTypes :: Error > ) ,
214214
215215 #[ error( "Error making HTTP request to NTP Admin Server" ) ]
216216 NtpAdminApi ( #[ from] NtpAdminError < ntp_admin_client:: types:: Error > ) ,
217217
218- #[ error( "Error contacting ddmd: {0} " ) ]
218+ #[ error( "Error contacting ddmd" ) ]
219219 DdmError ( #[ from] DdmError ) ,
220220
221- #[ error( "Failed to monitor for peers: {0} " ) ]
221+ #[ error( "Failed to monitor for peers" ) ]
222222 PeerMonitor ( #[ from] tokio:: sync:: broadcast:: error:: RecvError ) ,
223223
224- #[ error( "Failed to construct an HTTP client: {0} " ) ]
225- HttpClient ( reqwest:: Error ) ,
224+ #[ error( "Failed to construct an HTTP client" ) ]
225+ HttpClient ( # [ from ] reqwest:: Error ) ,
226226
227- #[ error( "Failed to access DNS servers: {0} " ) ]
227+ #[ error( "Failed to access DNS servers" ) ]
228228 Dns ( #[ from] DnsError ) ,
229229
230230 #[ error( "Error during request to Dendrite: {0}" ) ]
231231 Dendrite ( String ) ,
232232
233- #[ error( "Error during DNS lookup: {0} " ) ]
233+ #[ error( "Error during DNS lookup" ) ]
234234 DnsResolver ( #[ from] internal_dns_resolver:: ResolveError ) ,
235235
236- #[ error( "Bootstore error: {0} " ) ]
236+ #[ error( "Bootstore error" ) ]
237237 Bootstore ( #[ from] bootstore:: NodeRequestError ) ,
238238
239239 #[ error( "Failed to convert setup plan to blueprint: {0:#}" ) ]
@@ -417,11 +417,11 @@ impl ServiceInner {
417417 error,
418418 ) ) ) ;
419419 } ;
420- let log_failure = |error, delay| {
420+ let log_failure = |error : SetupServiceError , delay| {
421421 warn ! (
422422 log,
423423 "failed to set sled Omicron config" ;
424- "error" => #% error,
424+ & error,
425425 "retry_after" => ?delay,
426426 ) ;
427427 } ;
@@ -541,11 +541,11 @@ impl ServiceInner {
541541 ) )
542542 }
543543 } ;
544- let log_failure = |error, delay| {
544+ let log_failure = |error : SetupServiceError , delay| {
545545 warn ! (
546546 log,
547547 "sled config not yet reconciled" ;
548- "error" => #% error,
548+ & error,
549549 "retry_after" => ?delay,
550550 ) ;
551551 } ;
0 commit comments