Skip to content

Conversation

jovial
Copy link
Contributor

@jovial jovial commented Nov 14, 2018

This allows you to use an uncontainerised libvirtd alongside
a containerised instance which has bind mounted /var/run/libvirt
into the container.

This allows you to use an uncontainerised libvirtd alongside
a containerised instance which has bind mounted /var/run/libvirt
into the container.
@jovial jovial requested a review from markgoddard November 14, 2018 12:15
This stops us having to keep the default in sync with the virt
modules.
This was used for testing
This improves readability
Reflects the fact that we are not *just* setting the pid file
The libvirt-bin.service file sources /etc/default/libvirt-bin as
an environment file.
future plays require the daemon to be started
@jovial jovial changed the title (WIP) Add support for changing libvirt socket and pid path Add support for changing libvirt socket and pid path Nov 14, 2018
README.md Outdated
`/var/run/{{ libvirt_host_var_prefix }}` if `libvirt_host_var_prefix` is set,
otherwise `""`.

`libvirt_host_pid_path`: Path to PID file which prevents mulitple instances of

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple

vars/Debian.yml Outdated
insertafter: '^#libvirtd_opts='
regexp: '^libvirtd_opts='
line: libvirtd_opts="{{ libvirt_host_libvirtd_args }}"
condition: "{{ libvirt_host_libvirtd_args != '' }}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting approach here. Probably more code than two tasks with when RedHat/Debian, but would extend well to adding further options.

---

- name: Determine path to libvirt environment file
# On Debian >= 8 and Ubuntu >= 16.04 the libvirt-bin package has been

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have this condition elsewhere, so presumably we could extract it into a variable and set the path based on the variable. This works though.

tasks/config.yml Outdated
become: True

- name: Flush handlers
meta: flush_handlers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a chance that we could get here without the daemon running, if none of the above tasks are changed. To be certain, you can add a service/state=started task after flushing handlers.

@markgoddard
Copy link

Has a merge conflict

jovial and others added 2 commits November 16, 2018 16:31
As Mark suggested, it is possible that the handlers may not
run - libvirt could then be stopped at this point.
@jovial jovial merged commit 0f10691 into master Nov 19, 2018
@jovial jovial deleted the feature/socket_path branch November 19, 2018 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants