Skip to content

Commit de4ebde

Browse files
committed
pkg/gather: analyze konnectivity failures
Adds error handling to report konnectivity specific failures when running gather bootstrap or analyze.
1 parent 81e413c commit de4ebde

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

pkg/gather/service/analyze.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,20 @@ func checkReleaseImageDownload(a analysis) bool {
114114
return false
115115
}
116116

117-
// bootstrap-verify-api-servel-urls.sh is currently running as part of the bootkube service.
118-
// And the verification of the API and API-Int URLs are the only stage where a failure is
119-
// currently reported. So, here we are able to conclude that a failure corresponds to a
120-
// failure to resolve either the API URL or API-Int URL or both. If that changes and if
121-
// any other stage in the bootkube service starts reporting a failure, we need to revisit
122-
// this. At that point verification of the URLs could be moved to its own service.
123117
func checkBootkubeService(a analysis) bool {
124118
if a.successful {
125119
return true
126120
}
127-
// Note: Even when there is a stage failure, we are not returning false here. That is
128-
// intentional because we donot want to report this as an error in the "analyze" output.
121+
switch a.failingStage {
122+
case "konnectivity-certs":
123+
logrus.Error("The bootstrap machine failed to generate konnectivity certificates")
124+
case "konnectivity-server-bootstrap":
125+
logrus.Error("The bootstrap machine failed to start the konnectivity server")
126+
case "konnectivity-agent-manifest":
127+
logrus.Error("The bootstrap machine failed to create konnectivity agent manifests")
128+
case "konnectivity-cleanup":
129+
logrus.Error("The bootstrap machine failed to clean up konnectivity resources")
130+
}
129131
a.logLastError()
130132
return true
131133
}

0 commit comments

Comments
 (0)