-
Notifications
You must be signed in to change notification settings - Fork 948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create docker cpu fullload command failed #233
Comments
i have the same problem. operator log: |
if the blade tool is not in the target pod, it just return nil instead of copying it into the target pod. func (r *RunCmdInContainerExecutorByCP) DeployChaosBlade(ctx context.Context, containerId string, srcFile string, override bool) error {
// check if the blade tool exists
output, err := r.Client.execContainer(containerId, fmt.Sprintf("ls %s", BladeBin))
logrus.Debugf("output: %s, %v", output, err)
if err == nil && !strings.Contains(output, "cannot access") && !override {
return nil
} |
You can execute blade command with |
add debug, logs/chaosblade.log error as follows: time="2019-11-14T11:42:39.176617314+08:00" level=info msg="execute command: sh -c ls /opt/chaosblade/blade" |
@tsingloon @jianxingzhe Thank you very much. The problem occurred in the judgment of the return value of the |
@jianxingzhe @tsingloon You can add |
In our pod,the ls command is a link to /bin/busbox, such as:
and when the file is not exist, ls command does not return 'cannot access'. Just using the func (r *RunCmdInContainerExecutorByCP) DeployChaosBlade(ctx context.Context, containerId string, srcFile string, override bool) error {
// check if the blade tool exists
output, err := r.Client.execContainer(containerId, fmt.Sprintf("ls %s", BladeBin))
logrus.Debugf("output: %s, %v", output, err)
if err == nil && !strings.Contains(output, "No such file or directory") && !override {
return nil
} |
@jianxingzhe The ls command returns different values in different Linux images, so we use other commands to check whether the file exists, such as |
Issue Description
Type: bug report
Describe what happened (or what feature you want)
why the command response the follow error and what the error meaning?
operator logs:
Describe what you expected to happen
the command should success
How to reproduce it (as minimally and precisely as possible)
Tell us your environment
chaosblade version
Anything else we need to know?
The text was updated successfully, but these errors were encountered: