Skip to content

Commit

Permalink
Fix(curveadm deploy): newer version ss answers invalid arument
Browse files Browse the repository at this point in the history
Signed-off-by: caoxianfei1 <caoxianfei@corp.netease.com>
  • Loading branch information
caoxianfei1 committed Nov 23, 2023
1 parent 003ad85 commit 534e2cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/task/task/checker/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ func checkPortInUse(success *bool, out *string, host string, port int) step.Lamb
}

if len(*out) > 0 {
if *out == "RTNETLINK answers: Invalid argument" {
return nil
}

return errno.ERR_PORT_ALREADY_IN_USE.
F("host=%s, port=%d", host, port)
}

return nil
}
}
Expand Down Expand Up @@ -103,6 +108,7 @@ func (s *step2CheckPortStatus) Execute(ctx *context.Context) error {
steps = append(steps, &step.ContainerExec{
ContainerId: s.containerId,
Command: command,
Success: s.success,
Out: &out,
ExecOptions: s.curveadm.ExecOptions(),
})
Expand Down

0 comments on commit 534e2cc

Please sign in to comment.