Bug 1653684

Summary: Non intuitive provisioning predictable IPs procedure
Product: Red Hat OpenStack Reporter: Gregory Charot <gcharot>
Component: openstack-tripleo-heat-templatesAssignee: Harald Jensås <hjensas>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: medium Docs Contact:
Priority: medium    
Version: 14.0 (Rocky)CC: bfournie, hjensas, knoha, ksavich, mburns, sasha
Target Milestone: z1Keywords: Triaged, ZStream
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-9.2.1-0.20190119154860.fe11ade.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1656065 (view as bug list) Environment:
Last Closed: 2019-03-18 13:03:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1656065    

Description Gregory Charot 2018-11-27 12:06:27 UTC
Description of problem:

To make the provisioning IPs work for the compute nodes, one should either:

* Use the deprecated NovaComputeIPs parameter
or
* Have a custom role file and comment out "deprecated_param_ips: 'NovaComputeIPs'"

When using the default and recommended way i.e not using custom role file + new parameters (ComputeIPs) the computes don't get the predictables IPs on the provisioning network (work for the rest of the networks).

This is not intuitive and should be either fixed (best option) or explicitly mentioned in the docs.

Version-Release number of selected component (if applicable):

14

How reproducible:

always

Steps to Reproduce:
1.
  ComputeIPs:
    internal_api:
    - 172.17.1.211
    - 172.17.1.212
    storage:
    - 172.17.3.211
    - 172.17.3.212
    tenant:
    - 172.17.2.211
    - 172.17.2.212
    ctlplane:
    - 172.16.0.131
    - 172.16.0.132

2. Deploy
3. 

Actual results:

Computes nodes get ips from the dhcp pool
 openstack server list -c Name -c Networks | grep compute
| lab-compute01    | ctlplane=172.16.0.32 |
| lab-compute02    | ctlplane=172.16.0.28 |

Expected results:

 openstack server list -c Name -c Networks | grep compute
| lab-compute01    | ctlplane=172.16.0.131 |
| lab-compute02    | ctlplane=172.16.0.132 |


Additional info:

Using NovaComputeIPs or commenting this line in the compute role
deprecated_param_ips: 'NovaComputeIPs'

Works, computes get the right IPs

Comment 1 Harald Jensås 2018-11-27 12:27:13 UTC
Also, if the end user us the tooling to generate a custom roles data file based on the samples we provide, they still end up with the deprecated names:
  https://github.com/openstack/tripleo-heat-templates/blob/master/roles/Compute.yaml#L18-L24

We need the deprecated names in tripleo-heat-templates/roles_data.yaml for users upgrading environments that did'nt specify roles data.

Comment 2 Gregory Charot 2018-11-29 08:47:03 UTC
tested https://review.openstack.org/620391

Works with NovaComputeIPs and ComputeIPs.

Thx for the quick fix

Comment 3 Keigo Noha 2018-12-04 01:26:46 UTC
Hello Harald,

Thank you for your work on this bugzilla.
I have a user who faced this issue. Could you consider to backport the fix into RHOSP13 once the proposed fix is merged in upstream?

Best Regards,
Keigo Noha

Comment 4 Bob Fournier 2018-12-04 15:21:43 UTC
Keigo - as this bug is for OSP-14, I've cloned this to OSP-13 -https://review.openstack.org/#/c/620391/.  Please use that bug for tracking this case

Comment 5 Bob Fournier 2018-12-04 16:34:41 UTC
*** Bug 1636082 has been marked as a duplicate of this bug. ***

Comment 6 Bob Fournier 2018-12-04 16:36:06 UTC
*** Bug 1636077 has been marked as a duplicate of this bug. ***

Comment 7 Harald Jensås 2019-02-14 21:07:34 UTC
*** Bug 1672407 has been marked as a duplicate of this bug. ***

Comment 10 Alexander Chuzhoy 2019-03-12 19:43:50 UTC
Version:
openstack-tripleo-heat-templates-9.2.1-0.20190119154863.el7ost.noarch


(undercloud) [stack@undercloud-0 ~]$ grep -A21 "name: Compute" templates/roles_data.yaml 
- name: Compute1
  description: |
    Basic Compute Node role
  CountDefault: 1
  networks:
    - InternalApi1
    - Tenant1
    - Storage1
  HostnameFormatDefault: '%stackname%-compute1-%index%'
  RoleParametersDefault:
    TunedProfileName: "virtual-host"
  # Deprecated & backward-compatible values (FIXME: Make parameters consistent)
  # Set uses_deprecated_params to True if any deprecated params are used.
  uses_deprecated_params: True
  deprecated_param_image: 'NovaImage'
  deprecated_param_extraconfig: 'NovaComputeExtraConfig'
  deprecated_param_metadata: 'NovaComputeServerMetadata'
  deprecated_param_scheduler_hints: 'NovaComputeSchedulerHints'
  deprecated_param_ips: 'NovaComputeIPs'
  deprecated_server_resource_name: 'NovaCompute'
  deprecated_nic_config_name: 'compute.yaml'
  ServicesDefault:


- name: Compute2
  description: |
    Basic Compute Node role
  CountDefault: 1
  networks:
    - InternalApi2
    - Tenant2
    - Storage2
  HostnameFormatDefault: '%stackname%-compute2-%index%'
  RoleParametersDefault:
    TunedProfileName: "virtual-host"
  # Deprecated & backward-compatible values (FIXME: Make parameters consistent)
  # Set uses_deprecated_params to True if any deprecated params are used.
  uses_deprecated_params: True
  deprecated_param_image: 'NovaImage'
  deprecated_param_extraconfig: 'NovaComputeExtraConfig'
  deprecated_param_metadata: 'NovaComputeServerMetadata'
  deprecated_param_scheduler_hints: 'NovaComputeSchedulerHints'
  deprecated_param_ips: 'NovaComputeIPs'
  deprecated_server_resource_name: 'NovaCompute'
  deprecated_nic_config_name: 'compute.yaml'
  ServicesDefault:


- name: Compute3
  description: |
    Basic Compute Node role
  CountDefault: 1
  networks:
    - InternalApi3
    - Tenant3
    - Storage3
  HostnameFormatDefault: '%stackname%-compute3-%index%'
  RoleParametersDefault:
    TunedProfileName: "virtual-host"
  # Deprecated & backward-compatible values (FIXME: Make parameters consistent)
  # Set uses_deprecated_params to True if any deprecated params are used.
  uses_deprecated_params: True
  deprecated_param_image: 'NovaImage'
  deprecated_param_extraconfig: 'NovaComputeExtraConfig'
  deprecated_param_metadata: 'NovaComputeServerMetadata'
  deprecated_param_scheduler_hints: 'NovaComputeSchedulerHints'
  deprecated_param_ips: 'NovaComputeIPs'
  deprecated_server_resource_name: 'NovaCompute'
  deprecated_nic_config_name: 'compute.yaml'
  ServicesDefault:



(undercloud) [stack@undercloud-0 ~]$ grep -A13 Compute.IP /home/stack/templates/ips-from-pool-all.yaml
  Compute1IPs:
    # Each compute will get an IP from the lists below, first compute, first IP
    internal_api1:
    - 172.117.1.222
    - 172.117.1.223
    storage1:
    - 172.117.3.100
    - 172.117.3.101
    tenant1:
    - 172.117.2.222
    - 172.117.2.223
    ctlplane:
    - 192.168.24.100
    - 192.168.24.102
  Compute2IPs:
    # Each compute will get an IP from the lists below, first compute, first IP
    internal_api2:
    - 172.118.1.222
    - 172.118.1.223
    storage2:
    - 172.118.3.100
    - 172.118.3.101
    tenant2:
    - 172.118.2.222
    - 172.118.2.223
    ctlplane:
    - 192.168.24.110
    - 192.168.24.112
  Compute3IPs:
    # Each compute will get an IP from the lists below, first compute, first IP
    internal_api3:
    - 172.119.1.222
    - 172.119.1.223
    storage3:
    - 172.119.3.100
    - 172.119.3.101
    tenant3:
    - 172.119.2.222
    - 172.119.2.223
    ctlplane:
    - 192.168.24.120
    - 192.168.24.122




(undercloud) [stack@undercloud-0 ~]$ openstack server list -f value -c Name -c Networks|grep compute
overcloud-compute2-1 ctlplane=192.168.24.112
overcloud-compute3-1 ctlplane=192.168.24.122
overcloud-compute2-0 ctlplane=192.168.24.110
overcloud-compute3-0 ctlplane=192.168.24.120
overcloud-compute1-1 ctlplane=192.168.24.102
overcloud-compute1-0 ctlplane=192.168.24.100




(undercloud) [stack@undercloud-0 ~]$ for i in `openstack server list -f value -c Name -c Networks|awk -F'=' '/compute/ {print $NF}'`; do echo "#####################################################################################################"; echo $i; ssh -o StrictHostKeyChecking=no heat-admin@$i "hostname; sudo ip -4 -o a"; done
#####################################################################################################
192.168.24.112
overcloud-compute2-1
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
2: eth0    inet 192.168.24.112/24 brd 192.168.24.255 scope global eth0\       valid_lft forever preferred_lft forever
7: vlan21    inet 172.118.1.223/24 brd 172.118.1.255 scope global vlan21\       valid_lft forever preferred_lft forever
8: vlan31    inet 172.118.3.101/24 brd 172.118.3.255 scope global vlan31\       valid_lft forever preferred_lft forever
9: vlan51    inet 172.118.2.223/24 brd 172.118.2.255 scope global vlan51\       valid_lft forever preferred_lft forever
10: docker0    inet 172.31.0.1/24 scope global docker0\       valid_lft forever preferred_lft forever
#####################################################################################################
192.168.24.122
overcloud-compute3-1
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
2: eth0    inet 192.168.24.122/24 brd 192.168.24.255 scope global eth0\       valid_lft forever preferred_lft forever
7: vlan22    inet 172.119.1.223/24 brd 172.119.1.255 scope global vlan22\       valid_lft forever preferred_lft forever
8: vlan52    inet 172.119.2.223/24 brd 172.119.2.255 scope global vlan52\       valid_lft forever preferred_lft forever
9: vlan32    inet 172.119.3.101/24 brd 172.119.3.255 scope global vlan32\       valid_lft forever preferred_lft forever
10: docker0    inet 172.31.0.1/24 scope global docker0\       valid_lft forever preferred_lft forever
#####################################################################################################
192.168.24.110
overcloud-compute2-0
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
2: eth0    inet 192.168.24.110/24 brd 192.168.24.255 scope global eth0\       valid_lft forever preferred_lft forever
7: vlan21    inet 172.118.1.222/24 brd 172.118.1.255 scope global vlan21\       valid_lft forever preferred_lft forever
8: vlan31    inet 172.118.3.100/24 brd 172.118.3.255 scope global vlan31\       valid_lft forever preferred_lft forever
9: vlan51    inet 172.118.2.222/24 brd 172.118.2.255 scope global vlan51\       valid_lft forever preferred_lft forever
10: docker0    inet 172.31.0.1/24 scope global docker0\       valid_lft forever preferred_lft forever
#####################################################################################################
192.168.24.120
overcloud-compute3-0
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
2: eth0    inet 192.168.24.120/24 brd 192.168.24.255 scope global eth0\       valid_lft forever preferred_lft forever
7: vlan22    inet 172.119.1.222/24 brd 172.119.1.255 scope global vlan22\       valid_lft forever preferred_lft forever
8: vlan52    inet 172.119.2.222/24 brd 172.119.2.255 scope global vlan52\       valid_lft forever preferred_lft forever
9: vlan32    inet 172.119.3.100/24 brd 172.119.3.255 scope global vlan32\       valid_lft forever preferred_lft forever
10: docker0    inet 172.31.0.1/24 scope global docker0\       valid_lft forever preferred_lft forever
#####################################################################################################
192.168.24.102
overcloud-compute1-1
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
2: eth0    inet 192.168.24.102/24 brd 192.168.24.255 scope global eth0\       valid_lft forever preferred_lft forever
7: vlan20    inet 172.117.1.223/24 brd 172.117.1.255 scope global vlan20\       valid_lft forever preferred_lft forever
8: vlan30    inet 172.117.3.101/24 brd 172.117.3.255 scope global vlan30\       valid_lft forever preferred_lft forever
9: vlan50    inet 172.117.2.223/24 brd 172.117.2.255 scope global vlan50\       valid_lft forever preferred_lft forever
10: docker0    inet 172.31.0.1/24 scope global docker0\       valid_lft forever preferred_lft forever
#####################################################################################################
192.168.24.100
overcloud-compute1-0
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
2: eth0    inet 192.168.24.100/24 brd 192.168.24.255 scope global eth0\       valid_lft forever preferred_lft forever
7: vlan20    inet 172.117.1.222/24 brd 172.117.1.255 scope global vlan20\       valid_lft forever preferred_lft forever
8: vlan30    inet 172.117.3.100/24 brd 172.117.3.255 scope global vlan30\       valid_lft forever preferred_lft forever
9: vlan50    inet 172.117.2.222/24 brd 172.117.2.255 scope global vlan50\       valid_lft forever preferred_lft forever
10: docker0    inet 172.31.0.1/24 scope global docker0\       valid_lft forever preferred_lft forever

Comment 11 Alexander Chuzhoy 2019-03-13 16:05:28 UTC
Verified based on comment #10

Comment 13 errata-xmlrpc 2019-03-18 13:03:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0446