From 63636d115190ec1b07ee8ea77906fd6bd2f4c576 Mon Sep 17 00:00:00 2001 From: Oleksiy Molchanov Date: Wed, 15 Oct 2014 16:10:50 +0300 Subject: [PATCH] Add host_uuid to libvirtd.conf Add host_uuid generated by uuidgen to libvirtd.conf Change-Id: I238652e0a42fc3e15fd6cf7416343fb900336784 Closes-Bug: 1378962 --- deployment/puppet/openstack/manifests/compute.pp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deployment/puppet/openstack/manifests/compute.pp b/deployment/puppet/openstack/manifests/compute.pp index e51077fbb6..b58f0d2798 100644 --- a/deployment/puppet/openstack/manifests/compute.pp +++ b/deployment/puppet/openstack/manifests/compute.pp @@ -221,6 +221,17 @@ class openstack::compute ( notify => Service['libvirt'], } + $host_uuid=generate('/bin/sh', '-c', "uuidgen") + + augeas { 'libvirt-conf-uuid': + context => '/files/etc/libvirt/libvirtd.conf', + changes => [ + "set host_uuid $host_uuid", + ], + onlyif => "match /files/etc/libvirt/libvirtd.conf/host_uuid size == 0", + notify => Service['libvirt'], + } + $memcached_addresses = suffix($cache_server_ip, inline_template(":<%= @cache_server_port %>")) $notify_on_state_change = 'vm_and_task_state'