Mailing List Archive

[openstack-ansible] configuration file override
Dear all,

Openstack-ansible (OSA) allows us to override parameters in the configuration files as described here: https://docs.openstack.org/project-deploy-guide/openstack-ansible/draft/app-advanced-config-override.html

there is the following statement:

"You can also apply overrides on a per-host basis with the following configuration in the /etc/openstack_deploy/openstack_user_config.yml file:

compute_hosts:
900089-compute001:
ip: 192.0.2.10
host_vars:
nova_nova_conf_overrides:
DEFAULT:
remove_unused_original_minimum_age_seconds: 43200
libvirt:
cpu_mode: host-model
disk_cachemodes: file=directsync,block=none
database:
idle_timeout: 300
max_pool_size: 10

"

In this example the override is part of a compute host definition and there it is in the host_vars section (compute_hosts -> 900089-compute001 -> host_vars -> override). Is it possible to apply such an override for all the compute hosts by not using the hostname? For instance something like:

" compute_hosts:
nova_nova_conf_overrides:
DEFAULT:
remove_unused_original_minimum_age_seconds: 43200
"

would this be correct?


Thank you,
Laszlo

_______________________________________________
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
Re: ?==?utf-8?q? [openstack-ansible] configuration file override [ In reply to ]
> In this example the override is part of a compute host definition and there it is in the host_vars section (compute_hosts -> 900089-compute001 -> host_vars -> override). Is it possible to apply such an override for all the compute hosts by not using the hostname? For instance something like:
>
> " compute_hosts:
> nova_nova_conf_overrides:
> DEFAULT:
> remove_unused_original_minimum_age_seconds: 43200
> "

You can set nova_nova_conf_overrides: into a file named /etc/openstack_deploy/user_variables.yml and it will apply on all your nodes.

If you want to be more surgical, you'd have to give more details about your OpenStack-Ansible version and what you're trying to achieve.

Regards,
Jean-Philippe Evrard (evrardjp)


_______________________________________________
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
Re: [openstack-ansible] configuration file override [ In reply to ]
Hello Jean-Philippe,

thank you for your answer.
for the version I have this:

root@ansible-ws1:~# openstack-ansible --version
Variable files: "-e @/etc/openstack_deploy/user_secrets.yml -e @/etc/openstack_deploy/user_variables.yml "
ansible-playbook 2.4.4.0
config file = /root/.ansible.cfg
configured module search path = ['/etc/ansible/roles/plugins/library']
ansible python module location = /opt/ansible-runtime/lib/python3.5/site-packages/ansible
executable location = /opt/ansible-runtime/bin/ansible-playbook
python version = 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609]

EXIT NOTICE [Playbook execution success] **************************************
===============================================================================
root@ansible-ws1:~#

I'm trying to install the queens release of openstack.

My problem is that the servers that I'm using have their name defined as dcx-cy-blz (datacenter - chassis - blade). After installing openstack these names are reflected as the names of the hosts in nova.
We would like to have our compute nodes referenced as compute1, compute2 ....
We found that the "host" parameter of the nova.conf can be used for this. We've set an override for this in the user variables:

nova_nova_conf_overrides:
DEFAULT:
host: "{{ inventory_hostname }}.ourdomain"

The result was that the name in nova became OK, but when nova-compute was trying to start instances it was failing as interfaces were not created in the ovs br-int. It turned out that we need the same host setting for neutron as well ...

so I decided to add a similar entry for the neutron.conf as well, but then in the neutron,conf on the neutron-server we had a name of the form "network1_neutron_server_container-HASH.ourdomain". And the neutron server was complaining that this is not a valid hostname (I suppose due to the underscores that appears in the name ... ).

So right now I'm looking for a way to set that host parameter in the neutron.conf and nova.conf only on the compute nodes.

Thank you,
Laszlo

On 20.08.2018 17:28, jean-philippe@evrard.me wrote:
>> In this example the override is part of a compute host definition and there it is in the host_vars section (compute_hosts -> 900089-compute001 -> host_vars -> override). Is it possible to apply such an override for all the compute hosts by not using the hostname? For instance something like:
>>
>> " compute_hosts:
>> nova_nova_conf_overrides:
>> DEFAULT:
>> remove_unused_original_minimum_age_seconds: 43200
>> "
>
> You can set nova_nova_conf_overrides: into a file named /etc/openstack_deploy/user_variables.yml and it will apply on all your nodes.
>
> If you want to be more surgical, you'd have to give more details about your OpenStack-Ansible version and what you're trying to achieve.
>
> Regards,
> Jean-Philippe Evrard (evrardjp)
>
>


_______________________________________________
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
Re: ?==?utf-8?q? [openstack-ansible] configuration file override [ In reply to ]
> My problem is that the servers that I'm using have their name defined as dcx-cy-blz (datacenter - chassis - blade). After installing openstack these names are reflected as the names of the hosts in nova.
> We would like to have our compute nodes referenced as compute1, compute2 ....

The simplest is then to use compute1, compute2, etc. in your /etc/openstack_deploy/openstack_user_config. You can still internally refer to dcx-cy-blz if you like, it will just not appear openstack or in the inventory.

Regards,
JP


_______________________________________________
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
Re: [openstack-ansible] configuration file override [ In reply to ]
On 21.08.2018 12:32, jean-philippe@evrard.me wrote:
>> My problem is that the servers that I'm using have their name defined as dcx-cy-blz (datacenter - chassis - blade). After installing openstack these names are reflected as the names of the hosts in nova.
>> We would like to have our compute nodes referenced as compute1, compute2 ....
>
> The simplest is then to use compute1, compute2, etc. in your /etc/openstack_deploy/openstack_user_config. You can still internally refer to dcx-cy-blz if you like, it will just not appear openstack or in the inventory.
>
> Regards,
> JP
>
>

This is how I tried, but did not worked out .... in the /etc/openstack_deploy/openstack_user_config.yml I had:

_compute_hosts: &compute_hosts
compute1:
ip: 10.210.201.40
host_vars:
neutron_neutron_conf_overrides:
DEFAULT:
host: "{{ inventory_hostname }}.example.intra"
nova_nova_conf_overrides:
DEFAULT:
host: "{{ inventory_hostname }}.example.intra"
compute2:
ip: 10.210.201.41
host_vars:
neutron_neutron_conf_overrides:
DEFAULT:
host: "{{ inventory_hostname }}.example.intra"
nova_nova_conf_overrides:
DEFAULT:
host: "{{ inventory_hostname }}.example.intra"


What have done wrong?

Thank you,
Laszlo

_______________________________________________
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
Re: ?==?utf-8?q? [openstack-ansible] configuration file override [ In reply to ]
On Tuesday, August 21, 2018 11:48 CEST, Budai Laszlo <laszlo.budai@gmail.com> wrote:

> On 21.08.2018 12:32, jean-philippe@evrard.me wrote:
> >> My problem is that the servers that I'm using have their name defined as dcx-cy-blz (datacenter - chassis - blade). After installing openstack these names are reflected as the names of the hosts in nova.
> >> We would like to have our compute nodes referenced as compute1, compute2 ....
> >
> > The simplest is then to use compute1, compute2, etc. in your /etc/openstack_deploy/openstack_user_config. You can still internally refer to dcx-cy-blz if you like, it will just not appear openstack or in the inventory.
> >
> > Regards,
> > JP
> >
> >
>
> This is how I tried, but did not worked out .... in the /etc/openstack_deploy/openstack_user_config.yml I had:
>
> _compute_hosts: &compute_hosts
> compute1:
> ip: 10.210.201.40
> host_vars:
> neutron_neutron_conf_overrides:
> DEFAULT:
> host: "{{ inventory_hostname }}.example.intra"
> nova_nova_conf_overrides:
> DEFAULT:
> host: "{{ inventory_hostname }}.example.intra"

Hello.

I am not sure what &compute_hosts is, as this is just an extract of your file.
On top of this, I am not sure these *_conf_overrides need to exist. if your hosts are named compute1, compute2, ...

Maybe a cleanup of your environment and redeploy would help you?

I am not sure to have enough information to answer you there.

Best regards,
Jean-Philippe Evrard (evrardjp)


_______________________________________________
OpenStack-operators mailing list
OpenStack-operators@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators