Skip to content

Commit

Permalink
Merge pull request performancecopilot#55 from richm/ostree
Browse files Browse the repository at this point in the history
fix: ostree systems cannot write to /usr; use /etc instead
  • Loading branch information
richm committed Nov 1, 2023
2 parents 169a85e + d0dfd3f commit 3e661d0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions roles/elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@
- elasticsearch_metrics_provider == 'pcp'
- elasticsearch_agent | d(false) | bool

- name: Check if system is ostree
stat:
path: "{{ ostree_booted_file }}"
vars:
ostree_booted_file: /run/ostree-booted
register: __ostree_booted_stat

- name: Ensure correct service path for ostree systems
when:
- __ostree_booted_stat.stat.exists
- __elasticsearch_service_path != "/etc/systemd/system"
set_fact:
__elasticsearch_service_path: /etc/systemd/system

- name: Ensure PCP Elasticsearch export service exists
template:
src: pcp2elasticsearch.service.j2
Expand Down
14 changes: 14 additions & 0 deletions roles/spark/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@
- spark_metrics_provider == 'pcp'
- spark_metrics_agent | d(false) | bool

- name: Check if system is ostree
stat:
path: "{{ ostree_booted_file }}"
vars:
ostree_booted_file: /run/ostree-booted
register: __ostree_booted_stat

- name: Ensure correct service path for ostree systems
when:
- __ostree_booted_stat.stat.exists
- __spark_service_path != "/etc/systemd/system"
set_fact:
__spark_service_path: /etc/systemd/system

- name: Ensure PCP Spark export service exists
template:
src: pcp2spark.service.j2
Expand Down

0 comments on commit 3e661d0

Please sign in to comment.