Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Wrong namespace in example task manifests #403

Closed
lmroz opened this issue Oct 13, 2015 · 3 comments
Closed

Wrong namespace in example task manifests #403

lmroz opened this issue Oct 13, 2015 · 3 comments

Comments

@lmroz
Copy link
Contributor

lmroz commented Oct 13, 2015

Each example task manifest refers to /intel/dummy in collector's config section. That results in following error (this one is for psutil) when trying to run these tasks:

Policy defined for metric, ([psutil load load1]) version (0), but no config defined in manifest
Policy defined for metric, ([psutil load load15]) version (0), but no config defined in manifest
Policy defined for metric, ([psutil load load5]) version (0), but no config defined in manifest
Policy defined for metric, ([psutil net all bytes_recv]) version (0), but no config defined in manifest
Policy defined for metric, ([psutil net all bytes_sent]) version (0), but no config defined in manifest
@geauxvirtual
Copy link
Contributor

Can you specify which example you are trying to run?

@geauxvirtual
Copy link
Contributor

Marking this as a bug. There is no Policy defined for these metrics per the plugin, so it should not matter what's in the config section of the example task, even though the example task shouldn't specify a config for a metric that is not being collected.

@geauxvirtual
Copy link
Contributor

https://github.com/intelsdi-x/pulse/blob/master/control/plugin/cpolicy/tree.go#L135-L137

Looks like the issue is here. We recently fixed a bug where we were not validating a config against a policy defined by a plugin if no config was present (#380). However, looking at the code above, we do not set Policy to nil if the metric is not found in the ConfigPolicy for the plugin, we just create an empty ConfigPolicyNode and store it in the metric's policy. Checking if policy is nil will not work in this case.

@bjray bjray added the tracked label Oct 14, 2015
geauxvirtual added a commit that referenced this issue Oct 14, 2015
Fix #403: Change validation on a metric's policy
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants