Re: [openstack-dev] [tripleo] configuring qemu.conf using puppet or ansible

2017-11-28 Thread Saravanan KR
On Fri, Nov 24, 2017 at 10:09 PM, Alex Schultz  wrote:
> On Fri, Nov 24, 2017 at 5:03 AM, Saravanan KR  wrote:
>> Hello,
>>
>> For dpdk in ovs2.8, the default permission of vhost user ports are
>> modified from root:root  to openvswitch:hugeltbfs. The vhost user
>> ports are shared between ovs and libvirt (qemu). More details on BZ
>> [1].
>>
>> The "group" option in /etc/libvirt/qemu.conf [2] need to set as
>> "hugetlbfs" for vhost port to be shared between ovs and libvirt. In
>> order to configure qemu.conf, I could think of multiple options:
>>
>> * By using puppet-libvirt[3] module, but this module is altering lot
>> of configurations on the qemu.conf as it is trying to rewrite the
>> complete qemu.conf file. It may be different version of conf file
>> altogether as we might override the package defaults, depending on the
>> package version used.
>>
>
> We currently do not use puppet-libvirt and qemu settings are managed
> via puppet-nova with augeas[0][1].

Thanks Alex for this pointer.
>
>> * Other possibility is to configure the qemu.conf file directly using
>> the "init_setting" module like [4].
>>
>> * Considering the move towards ansible, I would prefer if we can add
>> ansible based configuration along with docker-puppet for any new
>> modules going forward. But I am not sure of the direction.
>>
>
> So you could use ansible provided that the existing settings are not
> managed via another puppet module. The problem with mixing both puppet
> and ansible is ensuring that only one owns the thing being touched.
> Since we use augeas in puppet-nova, this should not conflict with the
> usage of ini_setting with ansible.  Unfortunately libvirt is not
> currently managed as a standalone service so perhaps it's time to
> evaluate how we configure it since multiple services (nova/ovs) need
> to factor into it's configuration.
>
I was under the assumption that a new puppet module need to be
included for it, which made me to drift towards ansible. Since we are
configuring qemu.conf via puppet-nova (hiera data), I don't want to
create an intermediary step with ansible ini_setting, as the final
goal would be to create ansible-role-k8s-novalibvirt, which will
configure qemu.conf. I will stick to the existing puppet approach,
unless I find a solid reason to switch.

Regards,
Saravanan KR

> Thanks,
> -Alex
>
> [0] 
> https://github.com/openstack/puppet-nova/blob/30f9d47ec43519599f63f8a6f8da43b7dcb86242/manifests/compute/libvirt/qemu.pp
> [1] 
> https://github.com/openstack/puppet-nova/blob/9b98e3b0dee5f103c9fa32b37ff1a29df4296957/manifests/migration/qemu.pp
>
>> Prefer the feedback before proceeding with an approach.
>>
>> Regards,
>> Saravanan KR
>>
>> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1515269
>> [2]  https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu.conf#L412
>> [3] https://github.com/thias/puppet-libvirt
>> [4] https://review.openstack.org/#/c/522796/1/manifests/profile/base/dpdk.pp
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [tripleo] configuring qemu.conf using puppet or ansible

2017-11-24 Thread Alex Schultz
On Fri, Nov 24, 2017 at 5:03 AM, Saravanan KR  wrote:
> Hello,
>
> For dpdk in ovs2.8, the default permission of vhost user ports are
> modified from root:root  to openvswitch:hugeltbfs. The vhost user
> ports are shared between ovs and libvirt (qemu). More details on BZ
> [1].
>
> The "group" option in /etc/libvirt/qemu.conf [2] need to set as
> "hugetlbfs" for vhost port to be shared between ovs and libvirt. In
> order to configure qemu.conf, I could think of multiple options:
>
> * By using puppet-libvirt[3] module, but this module is altering lot
> of configurations on the qemu.conf as it is trying to rewrite the
> complete qemu.conf file. It may be different version of conf file
> altogether as we might override the package defaults, depending on the
> package version used.
>

We currently do not use puppet-libvirt and qemu settings are managed
via puppet-nova with augeas[0][1].

> * Other possibility is to configure the qemu.conf file directly using
> the "init_setting" module like [4].
>
> * Considering the move towards ansible, I would prefer if we can add
> ansible based configuration along with docker-puppet for any new
> modules going forward. But I am not sure of the direction.
>

So you could use ansible provided that the existing settings are not
managed via another puppet module. The problem with mixing both puppet
and ansible is ensuring that only one owns the thing being touched.
Since we use augeas in puppet-nova, this should not conflict with the
usage of ini_setting with ansible.  Unfortunately libvirt is not
currently managed as a standalone service so perhaps it's time to
evaluate how we configure it since multiple services (nova/ovs) need
to factor into it's configuration.

Thanks,
-Alex

[0] 
https://github.com/openstack/puppet-nova/blob/30f9d47ec43519599f63f8a6f8da43b7dcb86242/manifests/compute/libvirt/qemu.pp
[1] 
https://github.com/openstack/puppet-nova/blob/9b98e3b0dee5f103c9fa32b37ff1a29df4296957/manifests/migration/qemu.pp

> Prefer the feedback before proceeding with an approach.
>
> Regards,
> Saravanan KR
>
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1515269
> [2]  https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu.conf#L412
> [3] https://github.com/thias/puppet-libvirt
> [4] https://review.openstack.org/#/c/522796/1/manifests/profile/base/dpdk.pp
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev