From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v3 1/3] ts-openstack-deploy: Deploy OpenStack on a host with devstack Date: Wed, 30 Sep 2015 09:32:57 +0100 Message-ID: <1443601977.16718.152.camel@citrix.com> References: <1443455775-26131-1-git-send-email-anthony.perard@citrix.com> <1443455775-26131-2-git-send-email-anthony.perard@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1443455775-26131-2-git-send-email-anthony.perard@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Anthony PERARD , xen-devel@lists.xen.org Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org On Mon, 2015-09-28 at 16:56 +0100, Anthony PERARD wrote: > + # OpenStack needs access to libvirt from a user. > + target_cmd_root($ho, < + cat >> /etc/libvirt/libvirtd.conf < +unix_sock_group = "libvirt" > +unix_sock_ro_perms = "0777" > +unix_sock_rw_perms = "0770" > +EOF > +END One small nit on this, which is that it isn't idempotent, i.e. running this step on the same host repeatedly (common in standalone mode) will keep adding those lines to the conf file. If you care then possible solutions: Use target_editfile_root() to filter the lines out and then re-add them. See setupboot_grub2 and the handling of GRUB_ENABLE_XEN_UEFI_CHAINLOAD Use grep (3 times?) to decide if you need to append the given line. Modify the file in the dist file in ts-libvirt-build so it applies to all test cases and not just this one. Ian.