File tree 1 file changed +7
-2
lines changed
pkg/oc/admin/diagnostics/diagnostics/cluster/aggregated_logging
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -163,17 +163,22 @@ func (d *AggregatedLogging) Complete(logger *log.Logger) error {
163
163
d .Debug ("AGL0032" , fmt .Sprintf ("Project %q not found" , project ))
164
164
continue
165
165
}
166
- return fmt .Errorf ("failed fetching one of the default logging projects %q: %v" , project , err )
166
+ d .Error ("AGL0034" , err , fmt .Sprintf ("Fetching project %q returned with error" , project ))
167
+ return nil
167
168
}
168
169
169
170
d .Debug ("AGL0033" , fmt .Sprintf ("Found default logging project %q" , project ))
170
171
d .Project = project
171
172
return nil
172
173
}
173
- return fmt .Errorf ("default logging project not found, use '--%s' to specify logging project" , flagLoggingProject )
174
+ //tried to complete here but no known logging project exists, will be checked in CanRun()
175
+ return nil
174
176
}
175
177
176
178
func (d * AggregatedLogging ) CanRun () (bool , error ) {
179
+ if len (d .Project ) == 0 {
180
+ return false , errors .New ("Logging project does not exist" )
181
+ }
177
182
if d .OAuthClientClient == nil || d .ProjectClient == nil || d .RouteClient == nil || d .CRBClient == nil || d .DCClient == nil {
178
183
return false , errors .New ("Config must include a cluster-admin context to run this diagnostic" )
179
184
}
You can’t perform that action at this time.
0 commit comments