@@ -127,12 +127,17 @@ func runCoordinatorPipeline(body []byte, expectedSteps []string, expectedImages
127127 if ! ginkgo .CurrentSpecReport ().Failed () && ! printCoordinatorLogs {
128128 return
129129 }
130- dumpDeploymentLogs (nsName , "llm-d-coordinator" , "coordinator" )
131- dumpDeploymentLogs (nsName , eppName + "-encode" , "epp" )
132- dumpDeploymentLogs (nsName , eppName + "-prefill" , "epp" )
133- dumpDeploymentLogs (nsName , eppName + "-decode" , "epp" )
134- dumpDeploymentLogs (nsName , "envoy" , "envoy" )
135- dumpEnvoyClusters (nsName )
130+ args := []string {"logs" , "deployment/llm-d-coordinator" ,
131+ "-c" , "coordinator" , "--namespace=" + nsName }
132+ if k8sContext != "" {
133+ args = append (args , "--context=" + k8sContext )
134+ }
135+ out , err := exec .Command ("kubectl" , args ... ).CombinedOutput ()
136+ if err != nil {
137+ fmt .Fprintf (ginkgo .GinkgoWriter , "\n --- coordinator logs (kubectl error: %v) ---\n %s\n ---\n " , err , string (out ))
138+ } else {
139+ fmt .Fprintf (ginkgo .GinkgoWriter , "\n --- coordinator logs ---\n %s\n ---\n " , string (out ))
140+ }
136141 })
137142
138143 // Pools first so each EPP can resolve its --pool-name.
@@ -175,47 +180,6 @@ func runCoordinatorPipeline(body []byte, expectedSteps []string, expectedImages
175180 "coordinator returned non-200: body=%s" , string (raw ))
176181 gomega .Expect (raw ).NotTo (gomega .BeEmpty (), "coordinator returned empty body" )
177182 verifyCoordinatorSteps (nsName , expectedSteps , expectedImages , true , true )
178-
179- // Diagnostic: dump the coordinator logs once the request has completed. The
180- // per-step timestamps show when the request reached the coordinator (relative
181- // to when it was sent) and how long each pipeline step took, so we can tell
182- // late-arrival (gateway) from slow processing (pipeline). Also dump Envoy's
183- // access log so each request's gateway view (code/flags/cluster/upstream) is
184- // visible even on green runs, as a baseline to compare against a failure.
185- dumpDeploymentLogs (nsName , "llm-d-coordinator" , "coordinator" )
186- dumpDeploymentLogs (nsName , "envoy" , "envoy" )
187- }
188-
189- // dumpDeploymentLogs writes a deployment's container logs to the Ginkgo output.
190- // A kubectl error is reported inline rather than failing the spec.
191- func dumpDeploymentLogs (nsName , deployment , container string ) {
192- args := []string {"logs" , "deployment/" + deployment , "-c" , container , "--namespace=" + nsName }
193- if k8sContext != "" {
194- args = append (args , "--context=" + k8sContext )
195- }
196- out , err := exec .Command ("kubectl" , args ... ).CombinedOutput ()
197- if err != nil {
198- fmt .Fprintf (ginkgo .GinkgoWriter , "\n --- %s logs (kubectl error: %v) ---\n %s\n ---\n " , deployment , err , string (out ))
199- return
200- }
201- fmt .Fprintf (ginkgo .GinkgoWriter , "\n --- %s logs ---\n %s\n ---\n " , deployment , string (out ))
202- }
203-
204- // dumpEnvoyClusters writes Envoy's admin /clusters (resolved endpoints and health
205- // per cluster) to the Ginkgo output. Best-effort; yields nothing if the envoy
206- // image lacks a usable HTTP client.
207- func dumpEnvoyClusters (nsName string ) {
208- args := []string {"exec" , "deployment/envoy" , "-c" , "envoy" , "--namespace=" + nsName }
209- if k8sContext != "" {
210- args = append (args , "--context=" + k8sContext )
211- }
212- args = append (args , "--" , "curl" , "-s" , "http://localhost:19000/clusters" )
213- out , err := exec .Command ("kubectl" , args ... ).CombinedOutput ()
214- if err != nil {
215- fmt .Fprintf (ginkgo .GinkgoWriter , "\n --- envoy /clusters (kubectl error: %v) ---\n %s\n ---\n " , err , string (out ))
216- return
217- }
218- fmt .Fprintf (ginkgo .GinkgoWriter , "\n --- envoy /clusters ---\n %s\n ---\n " , string (out ))
219183}
220184
221185// verifyCoordinatorSteps fetches the coordinator pod logs and asserts that
0 commit comments