puppet-nova/manifests/migration
Michele Baldessari b876ace5fa Fix "More than one line in file '/etc/sysconfig/libvirtd' matches pattern" errors
The current code that matches the LIBVIRTD_ARGS= lines can have multiple
matches if said line shows up multiple times in a comment and we can end
up with the following error:

  Error: /Stage[main]/Nova::Migration::Libvirt/File_line[/etc/sysconfig/libvirtd libvirtd args]/
    ensure: change from 'absent' to 'present' failed: More than one line in file '/etc/sysconfig/libvirtd' matches pattern
      'LIBVIRTD_ARGS='

For the record the sysconfig file that triggered this error had the
following lines:

  # connects.
  LIBVIRTD_ARGS="--timeout 120"

  # If systemd socket activation is disabled, then the following
  # can be used to listen on TCP/TLS sockets
  #LIBVIRTD_ARGS="--listen"

Tested this change and I correctly did not fail the deployment anymore.

Change-Id: Iae595796559cc6551d8ae27e2573122a8a2da15d
Closes-Bug: #1847288
(cherry picked from commit 8377b33bd1)
2019-10-10 22:12:04 +00:00
..
libvirt.pp Fix "More than one line in file '/etc/sysconfig/libvirtd' matches pattern" errors 2019-10-10 22:12:04 +00:00
qemu.pp Add class for migration options configuration in qemu.conf 2016-10-05 13:12:44 +03:00