e9e8478a40
Implements: blueprint node-naming Change-Id: I08febdbc80bf64baac7e1926b255df0825a6a548
199 lines
4.4 KiB
ReStructuredText
199 lines
4.4 KiB
ReStructuredText
..
|
|
This work is licensed under a Creative Commons Attribution 3.0 Unported
|
|
License.
|
|
|
|
http://creativecommons.org/licenses/by/3.0/legalcode
|
|
|
|
==========================================
|
|
Configurable hostnames for physical nodes
|
|
==========================================
|
|
|
|
https://blueprints.launchpad.net/fuel/+spec/node-naming
|
|
|
|
Configure the hostnames of the slave nodes that Fuel will deploy based on
|
|
custom naming convention.
|
|
|
|
|
|
Problem description
|
|
===================
|
|
|
|
The name that is visible in the UI/CLI/API for the node is NOT what is applied
|
|
as the hostname when the node is deployed. The hostname is dynamically
|
|
generated (i.e. node-1 .. node-n).
|
|
New mechanism should has possibility changing hostname before provision
|
|
process to enable customers to access the device for updates, security checks,
|
|
etc. and prevent confusion.
|
|
|
|
|
|
Proposed change
|
|
===============
|
|
|
|
This spec proposes to extend UI, fuel-cli and nailgun API as well in
|
|
order to use custom hostnames prior provisioning stage.
|
|
|
|
* New field 'setup hostname' should be added to the UI node settings part
|
|
* New field should has ability to forbid to rename node after provisioning
|
|
* Extend node essence with new hostname field in nailgun API
|
|
extend nailgun node validation API
|
|
based on custom naming convention checks
|
|
|
|
* Extend fuel-cli to support to set up hostname
|
|
for example::
|
|
|
|
fuel node --node-id 15 --set-hostname node-3
|
|
|
|
Alternatives
|
|
------------
|
|
|
|
None
|
|
|
|
Data model impact
|
|
-----------------
|
|
|
|
Node model will include hostname field in nailgun
|
|
|
|
REST API impact
|
|
---------------
|
|
|
|
NodeValidator should be extended to handle incorrect node's hostname format and
|
|
duplicates of hostnames within a cluster as well.
|
|
In case when hostname is not set for node hostname will generated by standard
|
|
method (node-1...etc)
|
|
|
|
Upgrade impact
|
|
--------------
|
|
|
|
After upgrade to 7.0 version hostname field will be updated to current
|
|
generated node hostname:
|
|
In this case will used standard hostname generation method (node-$ID)
|
|
|
|
Security impact
|
|
---------------
|
|
|
|
None
|
|
|
|
Notifications impact
|
|
--------------------
|
|
None
|
|
|
|
Other end user impact
|
|
---------------------
|
|
|
|
End user gets ``--set-hostname`` additional option via CLI, that not required
|
|
for changes. Deployed env can work properly with default values.
|
|
|
|
End user gets new optional field in UI node settings.
|
|
Where hostname can be changed
|
|
|
|
|
|
Performance Impact
|
|
------------------
|
|
|
|
None
|
|
|
|
Plugin impact
|
|
-------------
|
|
|
|
None
|
|
|
|
Other deployer impact
|
|
---------------------
|
|
|
|
None
|
|
|
|
Developer impact
|
|
----------------
|
|
|
|
None
|
|
|
|
Infrastructure impact
|
|
---------------------
|
|
|
|
None
|
|
|
|
|
|
Implementation
|
|
==============
|
|
|
|
Assignee(s)
|
|
-----------
|
|
|
|
Primary assignee:
|
|
Ivan Ponomarev
|
|
|
|
Developer:
|
|
Artur Svechnikov
|
|
|
|
QA:
|
|
Dmirtry Kruglov
|
|
|
|
Design Review:
|
|
Evgeny Li
|
|
|
|
Work Items
|
|
----------
|
|
|
|
* Forbid to change node hostname after provisioning
|
|
* Extend Fuel UI node settings to add new field hostname
|
|
* Extend fuel-cli to use ``--set-hostname`` option
|
|
* Modify NodeValidation API of Nailgun
|
|
* Modify nailgun node object, node db model
|
|
* Modify Upgrade process to add node hostname field
|
|
* Modify Nailgun unit tests to test functional of hostname logic
|
|
* Write a documentation
|
|
|
|
|
|
Dependencies
|
|
============
|
|
|
|
None
|
|
|
|
|
|
Testing
|
|
=======
|
|
|
|
* Acceptance criteria:
|
|
|
|
- Admin user can specify a custom hostname to be applied as the hostname
|
|
for a node, via Fuel CLI or Fuel UI
|
|
- Admin user can set custom hostname only before the node provisioning
|
|
- If a custom node hostname is not provided, the default mechanism of
|
|
autogenerating node hostnames (i.e. 'node-1', etc.) is used
|
|
- Custom node hostname is validated to have the proper hostname format
|
|
and not to duplicate existing hostnames in the cluster
|
|
- On upgrade to MOS 7.0 the new hostname attribute is filled in the default
|
|
mechanism of autogenerating node hostnames (i.e. 'node-1', etc.)
|
|
|
|
**Automated testing scenario**
|
|
|
|
Set custom node hostname for a node via CLI:
|
|
|
|
1. Set a new hostname for a node via Fuel CLI
|
|
2. Provision and deploy the node
|
|
3. Run Network check
|
|
4. Connect remotely to the node and verify that the new hostname is applied
|
|
5. Run OSTF tests set
|
|
|
|
**Manual testing scenario**
|
|
|
|
Set custom node hostname for a node via Fuel UI:
|
|
|
|
1. Set a new hostname for a node via Fuel UI
|
|
2. Deploy the changes
|
|
3. Run Network check
|
|
4. Connect remotely to the node and verify that the new hostname is applied
|
|
5. Run OSTF tests set
|
|
|
|
|
|
Documentation Impact
|
|
====================
|
|
|
|
* A note should be added to Fuel Deployment Guide to describe the possibility
|
|
to specify custom node hostname.
|
|
|
|
|
|
References
|
|
==========
|
|
|
|
None
|