[jira] [Updated] (AMBARI-21744) package_regex in get_package_from_available() can match wrong pkg

2017-08-18 Thread Dmitry Lysnichenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Lysnichenko updated AMBARI-21744:

Affects Version/s: 2.5.2

> package_regex in get_package_from_available() can match wrong pkg
> -
>
> Key: AMBARI-21744
> URL: https://issues.apache.org/jira/browse/AMBARI-21744
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.5.2
>Reporter: Dmitry Lysnichenko
>Assignee: Dmitry Lysnichenko
>Priority: Critical
> Fix For: 2.6.0
>
> Attachments: AMBARI-21744.patch
>
>
> Due to the issue with regex (missing ^ and $ boundaries), 
> resource_management.libraries.script.script.Script#get_package_from_available 
> may return wrong package.
> {code}
> >>> list=['hbase_3_0_0_0_229-master', 'hbase_3_0_0_0_229']
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229-master'):
> ...print 'YES'
> ...
> YES
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229'):
> ...print 'YES'
> ...
> YES
> {code}
> In this case, the first package name from a list of available packages will 
> be returned.
> The impact of bug is that we may install a wrong package if it's simillary 
> named and goes first at list. Patch is a single-line fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-21744) package_regex in get_package_from_available() can match wrong pkg

2017-08-18 Thread Dmitry Lysnichenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Lysnichenko updated AMBARI-21744:

Fix Version/s: 2.6.0

> package_regex in get_package_from_available() can match wrong pkg
> -
>
> Key: AMBARI-21744
> URL: https://issues.apache.org/jira/browse/AMBARI-21744
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Dmitry Lysnichenko
>Assignee: Dmitry Lysnichenko
>Priority: Critical
> Fix For: 2.6.0
>
> Attachments: AMBARI-21744.patch
>
>
> Due to the issue with regex (missing ^ and $ boundaries), 
> resource_management.libraries.script.script.Script#get_package_from_available 
> may return wrong package.
> {code}
> >>> list=['hbase_3_0_0_0_229-master', 'hbase_3_0_0_0_229']
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229-master'):
> ...print 'YES'
> ...
> YES
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229'):
> ...print 'YES'
> ...
> YES
> {code}
> In this case, the first package name from a list of available packages will 
> be returned.
> The impact of bug is that we may install a wrong package if it's simillary 
> named and goes first at list. Patch is a single-line fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-21744) package_regex in get_package_from_available() can match wrong pkg

2017-08-17 Thread Dmitry Lysnichenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Lysnichenko updated AMBARI-21744:

Resolution: Fixed
Status: Resolved  (was: Patch Available)

Committed
   ec6a714f39..aa4807ca3a  branch-2.6 -> branch-2.6
   8c5b03b6e5..f2cc609b00  trunk -> trunk


> package_regex in get_package_from_available() can match wrong pkg
> -
>
> Key: AMBARI-21744
> URL: https://issues.apache.org/jira/browse/AMBARI-21744
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Dmitry Lysnichenko
>Assignee: Dmitry Lysnichenko
>Priority: Critical
> Attachments: AMBARI-21744.patch
>
>
> Due to the issue with regex (missing ^ and $ boundaries), 
> resource_management.libraries.script.script.Script#get_package_from_available 
> may return wrong package.
> {code}
> >>> list=['hbase_3_0_0_0_229-master', 'hbase_3_0_0_0_229']
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229-master'):
> ...print 'YES'
> ...
> YES
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229'):
> ...print 'YES'
> ...
> YES
> {code}
> In this case, the first package name from a list of available packages will 
> be returned.
> The impact of bug is that we may install a wrong package if it's simillary 
> named and goes first at list. Patch is a single-line fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-21744) package_regex in get_package_from_available() can match wrong pkg

2017-08-17 Thread Dmitry Lysnichenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Lysnichenko updated AMBARI-21744:

Component/s: ambari-server

> package_regex in get_package_from_available() can match wrong pkg
> -
>
> Key: AMBARI-21744
> URL: https://issues.apache.org/jira/browse/AMBARI-21744
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Dmitry Lysnichenko
>Assignee: Dmitry Lysnichenko
>Priority: Critical
> Attachments: AMBARI-21744.patch
>
>
> Due to the issue with regex (missing ^ and $ boundaries), 
> resource_management.libraries.script.script.Script#get_package_from_available 
> may return wrong package.
> {code}
> >>> list=['hbase_3_0_0_0_229-master', 'hbase_3_0_0_0_229']
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229-master'):
> ...print 'YES'
> ...
> YES
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229'):
> ...print 'YES'
> ...
> YES
> {code}
> In this case, the first package name from a list of available packages will 
> be returned.
> The impact of bug is that we may install a wrong package if it's simillary 
> named and goes first at list. Patch is a single-line fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-21744) package_regex in get_package_from_available() can match wrong pkg

2017-08-17 Thread Dmitry Lysnichenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Lysnichenko updated AMBARI-21744:

Status: Patch Available  (was: Open)

> package_regex in get_package_from_available() can match wrong pkg
> -
>
> Key: AMBARI-21744
> URL: https://issues.apache.org/jira/browse/AMBARI-21744
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Dmitry Lysnichenko
>Assignee: Dmitry Lysnichenko
>Priority: Critical
> Attachments: AMBARI-21744.patch
>
>
> Due to the issue with regex (missing ^ and $ boundaries), 
> resource_management.libraries.script.script.Script#get_package_from_available 
> may return wrong package.
> {code}
> >>> list=['hbase_3_0_0_0_229-master', 'hbase_3_0_0_0_229']
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229-master'):
> ...print 'YES'
> ...
> YES
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229'):
> ...print 'YES'
> ...
> YES
> {code}
> In this case, the first package name from a list of available packages will 
> be returned.
> The impact of bug is that we may install a wrong package if it's simillary 
> named and goes first at list. Patch is a single-line fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (AMBARI-21744) package_regex in get_package_from_available() can match wrong pkg

2017-08-17 Thread Dmitry Lysnichenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-21744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Lysnichenko updated AMBARI-21744:

Attachment: AMBARI-21744.patch

> package_regex in get_package_from_available() can match wrong pkg
> -
>
> Key: AMBARI-21744
> URL: https://issues.apache.org/jira/browse/AMBARI-21744
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Reporter: Dmitry Lysnichenko
>Assignee: Dmitry Lysnichenko
>Priority: Critical
> Attachments: AMBARI-21744.patch
>
>
> Due to the issue with regex (missing ^ and $ boundaries), 
> resource_management.libraries.script.script.Script#get_package_from_available 
> may return wrong package.
> {code}
> >>> list=['hbase_3_0_0_0_229-master', 'hbase_3_0_0_0_229']
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229-master'):
> ...print 'YES'
> ...
> YES
> >>> if re.match('hbase_(\d|_)+', 'hbase_3_0_0_0_229'):
> ...print 'YES'
> ...
> YES
> {code}
> In this case, the first package name from a list of available packages will 
> be returned.
> The impact of bug is that we may install a wrong package if it's simillary 
> named and goes first at list. Patch is a single-line fix.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)