File tree 1 file changed +5
-2
lines changed
pkg/oc/admin/diagnostics/diagnostics/cluster/aggregated_logging
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -163,17 +163,20 @@ 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 )
167
166
}
168
167
169
168
d .Debug ("AGL0033" , fmt .Sprintf ("Found default logging project %q" , project ))
170
169
d .Project = project
171
170
return nil
172
171
}
173
- return fmt .Errorf ("default logging project not found, use '--%s' to specify logging project" , flagLoggingProject )
172
+ //tried to complete() here but no known logging project exists
173
+ return nil
174
174
}
175
175
176
176
func (d * AggregatedLogging ) CanRun () (bool , error ) {
177
+ if len (d .Project ) == 0 {
178
+ return false , errors .New ("Logging project does not exist" )
179
+ }
177
180
if d .OAuthClientClient == nil || d .ProjectClient == nil || d .RouteClient == nil || d .CRBClient == nil || d .DCClient == nil {
178
181
return false , errors .New ("Config must include a cluster-admin context to run this diagnostic" )
179
182
}
You can’t perform that action at this time.
0 commit comments