Add masakari user to libvirt Group
Added the Masakari user to the libvirt group to ensure proper permissions for accessing libvirt resources. This resolves permission issues that could prevent Masakari from monitoring and managing virtual machine instances effectively. The fix ensures that the Masakari service can successfully interact with the libvirt daemon for instance evacuation and recovery operations during host failures. Related-Bug: #2120450 Co-authored-by: Jobin Jospeh <jobinathirampuzha@gmail.com> Change-Id: I4fdbc073319583709f7c9919aedf7728d1e8dee5 Signed-off-by: Nilesh Chandekar <nilesh.c85@gmail.com>
This commit is contained in:
@@ -40,6 +40,9 @@ masakari_upper_constraints_url: >-
|
||||
masakari_git_constraints:
|
||||
- "--constraint {{ masakari_upper_constraints_url }}"
|
||||
|
||||
## Libvirt Group
|
||||
masakari_monitor_libvirt_group: "{{ libvirt_group | default('libvirt') }}"
|
||||
|
||||
## System info
|
||||
masakari_system_user_name: masakari
|
||||
masakari_system_group_name: masakari
|
||||
|
@@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Added the Masakari user to the libvirt group to ensure proper permissions
|
||||
for accessing libvirt resources. This resolves permission issues that could
|
||||
prevent Masakari from monitoring and managing virtual machine instances
|
||||
effectively. The fix ensures that the Masakari service can successfully
|
||||
interact with the libvirt daemon for instance evacuation and recovery
|
||||
operations during host failures.
|
@@ -31,6 +31,14 @@
|
||||
createhome: "yes"
|
||||
home: "{{ masakari_system_user_home }}"
|
||||
|
||||
- name: Add masakari user to libvirt Group
|
||||
ansible.builtin.user:
|
||||
name: "{{ masakari_system_user_name }}"
|
||||
groups: "{{ masakari_monitor_libvirt_group }}"
|
||||
append: "yes"
|
||||
when:
|
||||
- "masakari_services['masakari-hostmonitor']['group'] in group_names"
|
||||
|
||||
- name: Create masakari dir
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path | realpath }}"
|
||||
|
Reference in New Issue
Block a user