Skip to content

Commit 5021027

Browse files
calmkartaylei
authored andcommitted
FIX:issue52, in Fork && AgentLess mode, we'll delete the agentPod if Fork pod error (#67)
1 parent 8da3fdc commit 5021027

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/plugin/cmd.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ func (o *DebugOptions) Run() error {
345345
agentPod = o.getAgentPod()
346346
agentPod, err = o.launchPod(agentPod)
347347
if err != nil {
348+
fmt.Fprintf(o.Out, "the agentPod is not running, you should check the reason and delete the failed agentPod and retry.\n")
348349
return err
349350
}
350351
}
@@ -356,6 +357,8 @@ func (o *DebugOptions) Run() error {
356357
pod = copyAndStripPod(pod, containerName)
357358
pod, err = o.launchPod(pod)
358359
if err != nil {
360+
fmt.Fprintf(o.Out, "the ForkedPod is not running, you should check the reason and delete the failed ForkedPod and retry\n")
361+
o.deleteAgent(agentPod)
359362
return err
360363
}
361364
}

0 commit comments

Comments
 (0)