Aleksandr Kovalenko created AMBARI-15731:
--------------------------------------------
Summary: Host not expanding more than one field in host-name
pattern
Key: AMBARI-15731
URL: https://issues.apache.org/jira/browse/AMBARI-15731
Project: Ambari
Issue Type: Bug
Components: ambari-web
Affects Versions: 2.1.2
Reporter: Aleksandr Kovalenko
Assignee: Aleksandr Kovalenko
Priority: Critical
Fix For: 2.4.0
PROBLEM
FQDNs follow patterns such as cluster-[1-5].az[1-3].domain and potentially even
more complex patterns, the current wizard only supports expansion of the first
[a-b] pattern. This can be found in the file
/ambari/ambari-web/app/controllers/wizard/step2_controller.js
in the function parseHostNamesAsPatternExpression:
Processing additional expansion would be desirable. Failing that, searching for
further patterns and noting they aren't supported would be helpful. Or some
other mechanism to allow users to specify some pattern that is more complex
that the first [] pair would be helpful.
EXPECTED
hostname expansion behaves more like regex expressions, or supports several in
a hostname expression
ACTUAL
Only the first [ ] pair is expanded, based on the following code
parseHostNamesAsPatternExpression: function () {
337 this.set('isPattern', false);
338 var self = this;
339 var hostNames = [];
340 $.each(this.get('hostNameArr'), function (e, a) {
341 var start, end, extra = {0: ""};
342 if (/\[\d*\-\d*\]/.test(a)) {
343 start = a.match(/\[\d*/);
344 end = a.match(/\-\d*]/);
345
346 start = start[0].substr(1);
347 end = end[0].substr(1);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)