-
Notifications
You must be signed in to change notification settings - Fork 34
Use systemd for opendistro/kibana/filebeat #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Kibana failing with:
https://github.com/stackhpc/openhpc-demo/pull/52/checks?check_run_id=2183262961#step:7:722 retrying... |
Having finally got vagrant working and squashed some other bugs the issue is elasticsearch is refusing connections:
Is this something to do with networking inside of vagrant? |
I've got a feeling elastic isn't starting up correctly. Do you see it listening on port 9200 on |
Sorry should have said - systemd shows opendistro is running OK, no errors.
|
I'm not sure the IP is right:
but
and
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking pretty good, nice effort.
ansible/monitoring.yml
Outdated
@@ -15,6 +15,55 @@ | |||
tasks_from: config.yml | |||
tags: config | |||
|
|||
- name: Define tmp directories on tmpfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in reference to this line in particular, but would this could fit better in the podman role?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that the user we're running podman as isn't defined in the role, only at the appliance level. I agree it feels like this (and the validate and the podman_tmp_dir_root
) should all really be in the podman role, so if you can see a way of achieving that let me know.
ansible/monitoring.yml
Outdated
owner: "{{ item.name }}" | ||
group: "{{ item.name }}" | ||
become: yes | ||
loop: "{{ appliances_local_users_podman }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other possibility is to make this code into a utility role that the podman roles all use, passing the relevant user e.g opendistro_user, kibana_user, filebeat_user. That would make the roles more usable in isolation. I don't think this is critical mind...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be possible. I felt like this is all a bit of a hack to work around systemd/rhel/podman limits/interactions so I'd hope it disappears entirely when either a) we have user services working or b) the podman patch to remove /tmp/containers-users-* files on reboot.
ansible/monitoring.yml
Outdated
@@ -15,6 +15,55 @@ | |||
tasks_from: config.yml | |||
tags: config | |||
|
|||
- name: Define tmp directories on tmpfs | |||
blockinfile: | |||
path: /etc/tmpfiles.d/podman.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth adding this to another file so that it is easier to remove?
@@ -2,6 +2,23 @@ | |||
|
|||
# Fail early if configuration is invalid | |||
|
|||
- name: Validate podman configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put in podman role?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above as to why all of this isn't in the role.
Closing and reopening to re-run pull_request workflow with latest code on main. |
@@ -15,3 +15,60 @@ | |||
|
|||
- name: reset ssh connection to allow user changes to affect 'current login user' | |||
meta: reset_connection | |||
|
|||
- name: Ensure podman users exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still reckon we should only do this in one place and assume that the users exist in this role, but as this will essentially be a no-op at the cost of running a few extra tasks, probably not one to bike-shed over as the overall patch looks good to me.
NB: this PR is for main.
Fixes #45 - see discussion there.
Key aspects:
systemd --user
as systemd version in CentOS doesn't allow us to override limits for user services, so run as root service withUser:
directive etc.