Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Conversation

majormoses
Copy link
Contributor

The message indicates that it will accept any string but after inspecting the code and the clients subscriptions it does not support a subscription with an ampty string.

Code: https://github.com/sensu/sensu-settings/blob/v10.14.0/lib/sensu/settings/rules.rb#L113-L123

Example Error:

Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '2'
    ---- Begin output of /etc/init.d/sensu-client restart ----
    STDOUT: configuration is invalid
    {
      "errors":[
        {
          "object":{
            "name":"dokken",
            "address":"172.18.0.13",
            "subscriptions":[
              "",
              "base",
              "kitchen",
              "rails_app_testing",
              "rails_app_testing_kitchen",
              "roundrobin:rails_app_testing_kitchen",
              "client:dokken"
            ],
            "keepalive":{
              "thresholds":{
                "warning":200,
                "critical":240
              },
              "handlers":[
                "default"
              ],
              "refresh":1800
            },
            "redact":[
              "password",
              "passwd",
              "pass",
              "api_key",
              "api_token",
              "access_key",
              "secret_key",
              "private_key",
              "secret"
            ],
            "environment":"kitchen"
          },
          "message":"client subscriptions must each be a string"
        }
      ]
    }
    STDERR:
    ---- End output of /etc/init.d/sensu-client restart ----
    Ran /etc/init.d/sensu-client restart returned 2

Signed-off-by: Ben Abrams [email protected]

The message indicates that it will accept any string but after inspecting the code and the clients subscriptions it does not support a subscription with an ampty string.

Code: https://github.com/sensu/sensu-settings/blob/v10.14.0/lib/sensu/settings/rules.rb#L113-L123

Example Error:
```
Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '2'
    ---- Begin output of /etc/init.d/sensu-client restart ----
    STDOUT: configuration is invalid
    {
      "errors":[
        {
          "object":{
            "name":"dokken",
            "address":"172.18.0.13",
            "subscriptions":[
              "",
              "base",
              "kitchen",
              "rails_app_testing",
              "rails_app_testing_kitchen",
              "roundrobin:rails_app_testing_kitchen",
              "client:dokken"
            ],
            "keepalive":{
              "thresholds":{
                "warning":200,
                "critical":240
              },
              "handlers":[
                "default"
              ],
              "refresh":1800
            },
            "redact":[
              "password",
              "passwd",
              "pass",
              "api_key",
              "api_token",
              "access_key",
              "secret_key",
              "private_key",
              "secret"
            ],
            "environment":"kitchen"
          },
          "message":"client subscriptions must each be a string"
        }
      ]
    }
    STDERR:
    ---- End output of /etc/init.d/sensu-client restart ----
    Ran /etc/init.d/sensu-client restart returned 2
```

Signed-off-by: Ben Abrams <[email protected]>
@portertech
Copy link
Contributor

thelawapproves

@portertech portertech merged commit dcde465 into sensu:master Sep 24, 2018
@portertech
Copy link
Contributor

Thanks @majormoses

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants