Skip to content

--log-level leaks into experiment flags and breaks experiments on master #1402

Open

Description

@officialasishkumar

Issue Description

Type: bug report

Describe what happened (or what feature you want)

On current master (c40c0a7) most experiments fail or silently do nothing. #1395 re-enabled the root --log-level flag with a default of info. createExpModel copies every flag of the command into ActionFlags, including inherited persistent flags, so every experiment now carries log-level=info even if the flag is never used. Executors treat it as an experiment parameter:

  • chaos_os parses its arguments with flag.ExitOnError and does not define log-level, so it exits with status 2.
  • The flag is stored in the experiment record, so blade destroy fails the same way.
  • The java agent uses parameters it does not know as matchers, so JVM faults report success but never fire.

The latest release, v1.8.2, is not affected because it was tagged before #1395.

Describe what you expected to happen

--log-level only configures the logging of the blade CLI and does not reach the executors.

How to reproduce it (as minimally and precisely as possible)

Build master and run it with the bin/ and lib/ directories of the v1.8.2 release:

$ ./blade create file add --filepath /tmp/x
{"code":63063,"success":false,"error":"command exec failed, exit status 2"}

$ ./blade create file append --filepath /tmp/app.log --content hello --interval 1
{"code":200,"success":true,"result":"93c7d11e5c6634a9"}   # nothing is ever appended
$ ./blade destroy 93c7d11e5c6634a9
{"code":63063,"success":false,"error":"command exec failed, exit status 2"}

$ ./blade create jvm throwCustomException --exception java.lang.IllegalStateException --classname Demo --methodname flag --pid <pid>
{"code":200,"success":true,"result":"49efbd7434351d63"}   # the method keeps returning normally

The same commands work with the v1.8.2 blade binary.

Tell us your environment

Linux arm64, Ubuntu 24.04, OpenJDK 8, blade built from c40c0a7.

Anything else we need to know?

--debug is not affected: chaos_os defines it and the java agent handles it explicitly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions