Bug 1271431 - [RFE] Ability to set a hostname in the overcloud from instackenv.json [NEEDINFO]
Summary: [RFE] Ability to set a hostname in the overcloud from instackenv.json
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: os-refresh-config
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 10.0 (Newton)
Assignee: James Slagle
QA Contact: Shai Revivo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-14 00:26 UTC by David Hill
Modified: 2019-10-10 10:20 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-18 06:58:55 UTC
Target Upstream Version:
jcoufal: needinfo? (shardy)


Attachments (Terms of Use)

Description David Hill 2015-10-14 00:26:58 UTC
Description of problem:
We would like to be able to specify a hostname in instackenv.json that would be set on the overcloud host when deploying that node in the overcloud.

For example:
{
    "nodes":[
        {
            "mac":[
                "bb:bb:bb:bb:bb:bb"
            ],
            "cpu":"4",
            "memory":"6144",
            "disk":"40",
            "arch":"x86_64",
            "pm_type":"pxe_ipmitool",
            "pm_user":"admin",
            "hostname":"controller01",
            "pm_password":"p@55w0rd!",
            "pm_addr":"192.0.2.205"
        }
    ]
}

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


How reproducible:
Always

Steps to Reproduce:
1. It's not supported
2.
3.

Actual results:
It's not supported

Expected results:
It should be supported

Additional info:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Scenario_2_Using_the_CLI_to_Create_a_Basic_Overcloud.html#sect-Registering_Nodes_for_the_Basic_Overcloud

Comment 2 Matt Wisch 2015-10-29 12:54:37 UTC
It looks like there was already a commit to add basic name functionality:

https://github.com/openstack/os-cloud-config/commit/3b0fb21e514b8369d7bfd32a6b47f37caea78bc3

This would only set the Ironic node name from the "name" tag in the instackenv.json file.

The baremetal instance hostname is set by heat using the format %stackname%-rolename-%index% set in /usr/share/openstack-tripleo-heat-templates/overcloud-without-mergepy.html

Both features would be great to have in OSP 8.

Comment 3 David Hill 2016-02-04 16:20:59 UTC
Customers are requesting it for OSP 7 so the question is , is it easy to implement in both?

Thanks,

Dave

Comment 4 Mike Burns 2016-04-07 20:54:03 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 7 Raviv Bar-Tal 2017-05-18 06:58:55 UTC
Baremetal node name is different the nova server name.
But both can be defined in there relevant configuration 
Baremetal - as shown in the bug description 

Nova server name heat example:
[stack@undercloud-0 virt]$ cat hostnames.yml 

parameter_defaults:

    CephStorageHostnameFormat: 'ceph-%index%'
    ObjectStorageHostnameFormat: 'swift-%index%'
    ControllerHostnameFormat: 'controller-%index%'
    ComputeHostnameFormat: 'compute-%index%'


Note You need to log in before you can comment on or make changes to this bug.