Description of problem: When using HostnameMap with more than 9 computes, hostnames are not properly set and this is due to the use of str_replace in /usr/share/openstack-tripleo-heat-templates/puppet/compute.yaml: NovaCompute: type: OS::Nova::Server properties: image: {get_param: Image} image_update_policy: get_param: ImageUpdatePolicy flavor: {get_param: Flavor} key_name: {get_param: KeyName} networks: - network: ctlplane user_data_format: SOFTWARE_CONFIG user_data: {get_resource: UserData} name: str_replace: template: {get_param: Hostname} params: {get_param: HostnameMap} So as soon as you hit compute 10-19, it will always replace the first part of the string with the first node in the HostnameMap... The effect here is that you end up with 0-9 at the end of the string instead of having the proper hostname in the HostnameMap. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
I think this is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1353920 ?
Nope... it's not the same issue. If the value is to similar to the key, this breaks. The other case solves one specific corner case but look at this one: 1) When the first compute his deployed, it replaces all the strings in that array so HostnameMap: whatever-CTLR0: whatever-CTLR0-wa1614 whatever-CTLR1: whatever-CTLR1-wa1514 whatever-CTLR2: whatever-CTLR2-wa0112 whatever-COMP0: whatever-COMP0-wa0001 whatever-COMP1: whatever-COMP1-wa1101 whatever-COMP2: whatever-COMP2-wa0002 whatever-COMP3: whatever-COMP3-wa1102 whatever-COMP4: whatever-COMP4-wa0003 whatever-COMP5: whatever-COMP5-wa1103 whatever-COMP6: whatever-COMP6-wa0004 whatever-COMP7: whatever-COMP7-wa1104 whatever-COMP8: whatever-COMP8-wa0005 whatever-COMP9: whatever-COMP9-wa1105 whatever-COMP10: whatever-COMP10-wa0006 whatever-COMP11: whatever-COMP11-wa1106 whatever-COMP12: whatever-COMP12-wa0007 becomes: HostnameMap: whatever-CTLR0: whatever-CTLR0-wa1614 whatever-CTLR1: whatever-CTLR1-wa1514 whatever-CTLR2: whatever-CTLR2-wa0112 whatever-COMP0: whatever-COMP0-wa0001 whatever-COMP1: whatever-COMP1-wa1101 whatever-COMP2: whatever-COMP2-wa0002 whatever-COMP3: whatever-COMP3-wa1102 whatever-COMP4: whatever-COMP4-wa0003 whatever-COMP5: whatever-COMP5-wa1103 whatever-COMP6: whatever-COMP6-wa0004 whatever-COMP7: whatever-COMP7-wa1104 whatever-COMP8: whatever-COMP8-wa0005 whatever-COMP9: whatever-COMP9-wa1105 whatever-COMP10: whatever-COMP1-wa11010-wa0006 whatever-COMP11: whatever-COMP1-wa11011-wa1106 whatever-COMP12: whatever-COMP1-wa11012-wa0007
Yeah, this is fixed in OSP10 by https://review.openstack.org/#/c/355583/