fix: add missing Spark import/export support for metrics - part 2#246
fix: add missing Spark import/export support for metrics - part 2#246richm merged 1 commit intolinux-system-roles:mainfrom
Conversation
Reviewer's GuideExtends the Ansible metrics domain pipeline to support OpenMetrics by conditionally appending 'openmetrics' to the __metrics_domains list based on the new metrics_from_spark flag. Class diagram for __metrics_domains update logicclassDiagram
class MetricsDomainPipeline {
+list __metrics_domains
+bool metrics_from_elasticsearch
+bool metrics_from_spark
+bool metrics_from_mssql
+update_domains()
}
MetricsDomainPipeline : +update_domains()
MetricsDomainPipeline : __metrics_domains += 'elasticsearch' if metrics_from_elasticsearch
MetricsDomainPipeline : __metrics_domains += 'openmetrics' if metrics_from_spark
MetricsDomainPipeline : __metrics_domains += 'mssql' if metrics_from_mssql
Flow diagram for metrics domain extension with OpenMetricsflowchart TD
A[Start] --> B{metrics_from_elasticsearch?}
B -- Yes --> C[Add 'elasticsearch' to __metrics_domains]
B -- No --> D
C --> D{metrics_from_spark?}
D -- Yes --> E[Add 'openmetrics' to __metrics_domains]
D -- No --> F
E --> F{metrics_from_mssql?}
F -- Yes --> G[Add 'mssql' to __metrics_domains]
F -- No --> H[End]
G --> H
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[citest] |
|
@natoscott still not working :-( Running it locally - I never even get this far - I still get an error, no matter how many retries I have. There is something really weird going on. |
OK - this part:
says that pmdaopenmetrics is installed but just with the default endpoints. Spark port/url should be added to this list via these tasks in metrics/roles/spark/tasks/main.yml - I wonder if there's an ordering problem? If pmdaopenmetrics was being started now before the /etc config file and /var symlink are established, this could behave in the way we're seeing. |
I think the problem is ordering and/or timing, which would explain why we see different behavior in each test environment.
How can we verify that? |
We need to make sure the two tasks above (Spark openmetrics config and symlink) happen before the final two steps in roles/pcp/tasks/pmcd.yml which causes pmcd to be started/restarted. The ducks that need to be lined up before the pmcd servicec re/start are these Spark tasks and the first two/three tasks in the pmcd.yml file (especially "- name: Ensure optional metric collection agents are enabled"). |
|
@natoscott The pmcd service was getting a permission denied error on spark.url - I changed it to 0644 to match the permissions on the other files in /etc/pcp/openmetrics/ - they are all 0644 - now it is working. Which leaves me really confused as to how this could have possibly worked? If you approve, I'll go back and make this change in ansible-pcp |
|
[citest] |
|
This looks much better - but still two issues
|
Excellent!
pmdaopenmetrics was recently changed to run 'unprivileged' (under the 'pcp' user account) - previously it ran as root - this is some unintended fallout (and unforeseen, I'm wondering if that change might affect anything else now - its the first diagnosed case of this I've seen fortunately, so hopefully this isn't common).
Yes please, thanks for fixing this! |
|
|
[citest] |
|
[citest] |
1 similar comment
|
[citest] |
add openmetrics to metrics domains Signed-off-by: Rich Megginson <rmeggins@redhat.com>
add openmetrics to metrics domains
Signed-off-by: Rich Megginson rmeggins@redhat.com
Summary by Sourcery
Bug Fixes: