4.5 Setting Properties for Groups or Hosts

Because OpenStack Kolla uses properties and templates to configure OpenStack services, deploying OpenStack Kolla containers works best where the deployment nodes are identical. However, where your deployment nodes are not identical, or you have custom configuration requirements, you can set properties that are specific to groups or hosts.

When you use the kollacli property set command without any options, the properties are global properties that apply to all hosts and OpenStack services in your deployment. However, to enable you to tune your deployment, you can use the --groups and --hosts options to set properties that are specific to particular groups or individual hosts.

The properties you set are used in the following order of precedence:

  1. Host properties.

  2. Group properties.

  3. Global properties.

  4. Default properties.

Group properties files are used in alphabetical order, for example properties set for the group named control have precedence over properties for the group named database.

To set properties for hosts or groups

  1. Identify the name of the property that you want to set.

    Use the kollacli property list command to see a list of properties. By default, only the properties with values of less than 50 characters are shown. Use the --all option to list all properties, or set the KOLLA_PROP_LIST_LENGTH environmental variable with the maximum number of characters you want.

  2. (Optional) Set the global property value.

    If the default value for the property is not what you require for the majority of the groups or hosts, you should set the global property for your deployment:

    $ kollacli property set property_name value

    Use the kollacli property list command with the --long option to list default and global properties.

  3. Set the property for individual groups or hosts.

    To set the property for one or more groups:

    $ kollacli property set property_name value --groups group_list

    where group_list is a comma-separated list of group names. The names must match the names of the defined groups. Use the kollacli group listservices command to list the defined groups.

    To set the property for one or more hosts:

    $ kollacli property set property_name value --hosts host_list

    where host_list is a comma-separated list of host names. The host names must match the names of the hosts added to the deployment. Use the kollacli host list command to list the hosts.

    You cannot use the --groups and --hosts options together.

To check host and group properties

  • To check whether a property is overridden by a group or host property:

    $ kollacli property list
    +-----+------------------------------------------+------------------------------------------+
    | OVR | Property Name                            | Property Value                           |
    +-----+------------------------------------------+------------------------------------------+
    ...
    | *-- | openstack_release                        | 3.0                                      |
    | --- | openvswitch_db_tag                       | {{ openstack_release }}                  |
    ...
    +-----+------------------------------------------+------------------------------------------+

    The OVR column in the output indicates whether a property has been set that overrides either a default property or a global property. The OVR column contains three characters:

    • The first character is either "*" or "-", where "*" means the property is overridden by a global property, and "-" means the property is not overridden by a global property.

    • The second character is either "G" or "-", where "G" means the property is overridden by a group property, and "-" means the property is not overridden by a group property.

    • The third character is either "H" or "-", where "H" means the property is overridden by a host property, and "-" means the property is not overridden by a host property.

  • To check group properties:

    $ kollacli property list --groups all|group_list

    where group_list is a comma-separated list of group names.

  • To check host properties:

    $ kollacli property list --hosts all|host_list

    where host_list is a comma-separated list of host names.

To remove properties for groups or hosts

  • To remove a group property:

    $ kollacli property clear property_name --groups all|group_list

    where group_list is a comma-separated list of group names.

  • To remove a host property:

    $ kollacli property clear property_name --hosts all|host_list

    where host_list is a comma-separated list of host names.

4.5.1 Dealing With Variable Network Interface Names

The following is an example of how to use global, group, and host properties to deal with the case where you need to use different interface names for the network_interface property.

  1. Check the current value for the network_interface property.

    $ kollacli property list
    +-----+------------------------------------------+------------------------------------------+
    | OVR | Property Name                            | Property Value                           |
    +-----+------------------------------------------+------------------------------------------+
    ...
    | --- | network_interface                        | eth0                                     |
    ...
    +-----+------------------------------------------+------------------------------------------+
    

    The first "-" character in the OVR column indicates that eth0 is the default property value.

    As the majority of your nodes are Oracle Linux nodes with a network interface named em1, it is best to set a global property with this value.

  2. Set the global property value.

    $ kollacli property set network_interface em1
  3. Check that the global property value is applied.

    $ kollacli property list
    +-----+------------------------------------------+------------------------------------------+
    | OVR | Property Name                            | Property Value                           |
    +-----+------------------------------------------+------------------------------------------+
    ...
    | *-- | network_interface                        | em1                                      |
    ...
    +-----+------------------------------------------+------------------------------------------+
    

    The "*" character in the OVR column indicates that em1 is the global property value.

    However, all your compute nodes are Oracle VM Server nodes with a network interface named eth0. As you are only using Oracle VM Server for your compute nodes, it is best to set a group property for the compute group.

  4. Set the property value for the compute group.

    $ kollacli property set network_interface eth0 --groups compute
  5. Check that the group property value is applied.

    $ kollacli property list
    +-----+------------------------------------------+------------------------------------------+
    | OVR | Property Name                            | Property Value                           |
    +-----+------------------------------------------+------------------------------------------+
    ...
    | *G- | network_interface                        | em1                                      |
    ...
    +-----+------------------------------------------+------------------------------------------+
    

    The "*" character in the OVR column indicates that em1 is still the global property value, but the "G" character indicates that the property has been set for one or more groups.

    To check which groups have the property value set:

    $ kollacli property list --groups all
    +-----+-------------------+----------------+---------+
    | OVR | Property Name     | Property Value | Group   |
    +-----+-------------------+----------------+---------+
    | *G- | network_interface | eth0           | compute |
    +-----+-------------------+----------------+---------+
    

    However, the storage node storage1.example.com needs to be configured to use the network interface named em3, so you need to set a property specific to this host.

  6. Set the property value for the storage1.example.com host.

    $ kollacli property set network_interface em3 --hosts storage1.example.com
  7. Check that the host property value is applied.

    $ kollacli property list
    +-----+------------------------------------------+------------------------------------------+
    | OVR | Property Name                            | Property Value                           |
    +-----+------------------------------------------+------------------------------------------+
    ...
    | *GH | network_interface                        | em1                                      |
    ...
    +-----+------------------------------------------+------------------------------------------+
    

    The "*" character in the OVR column indicates that em1 is still the global property value, and the "H" character indicates that the property has been set for one or more hosts.

    To check which hosts have the property value set:

    $ kollacli property list --hosts all
    +-----+-------------------+----------------+---------------------------+
    | OVR | Property Name     | Property Value | Host                      |
    +-----+-------------------+----------------+---------------------------+
    | *GH | network_interface | em3            | storage1.example.com      |
    +-----+-------------------+----------------+---------------------------+
    

    When you deploy OpenStack with these settings, all hosts will use em1 as the setting for the network_interface property apart from hosts that belong to the compute group, which use eth0, and the host storage1.example.com, which uses em3.