[jira] [Commented] (AMBARI-15754) configs.sh expands ***** in config values to a local file list, causing broken config files

2017-02-23 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-15754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881458#comment-15881458
 ] 

Hudson commented on AMBARI-15754:
-

FAILURE: Integrated in Jenkins build Ambari-branch-2.5 #1074 (See 
[https://builds.apache.org/job/Ambari-branch-2.5/1074/])
AMBARI-15754. configs.sh expands * in config values to a local file 
(smohanty: 
[http://git-wip-us.apache.org/repos/asf?p=ambari.git=commit=a65bf361277a285292e08901ae4f5ecdafe9246e])
* (edit) ambari-server/src/main/resources/scripts/configs.sh


> configs.sh expands * in config values to a local file list, causing 
> broken config files
> ---
>
> Key: AMBARI-15754
> URL: https://issues.apache.org/jira/browse/AMBARI-15754
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.0.0, 2.0.1, 2.1.0, 2.3.0, 2.0.2, 2.1.1, 2.1.2, trunk, 
> 2.0.3, 2.2.0, 2.4.0, 2.2.1, 2.2.2, 2.4.1
>Reporter: Asger Askov Blekinge
>Assignee: Asger Askov Blekinge
>  Labels: easyfix, patch
> Fix For: trunk, 2.5.0
>
> Attachments: AMBARI-15754-branch-2.5.patch, 
> AMBARI-15754_trunk_v3.patch, AMBARI-15754.v2.patch
>
>
> When you try to get the value of, say, pig-log4j like this, it outputs 
> correctly
> {code}
> curl -k -s -u $AMBARI_USER:$AMBARI_PASSWORD 
> "$AMBARI_HOST:$AMBARI_PORT/api/v1/clusters/$CLUSTER_NAME/configurations?type=pig-log4j=version1"
> {code}
> If you use configs.sh to do the same
> {code}
> configs.sh -u $AMBARI_USER -p $AMBARI_PASSWORD -port $AMBARI_PORT get 
> $AMBARI_HOST $CLUSTER_NAME pig-log4j
> {code}
> it will have replaced the * with the file list in the working directory
> So,
> {code}
>  "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) 
> under one\n# or more contributor license agreements.  See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership.  The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License.  You may obtain a copy of the License 
> at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required 
> by applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# * Set root logger level to DEBUG and its only 
> appender to A.\nlog4j.logger.org.apache.pig=info, A\n\n# * A is set to be 
> a ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# 
> * A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> will be output as 
> {code}
> "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under 
> one\n# or more contributor license agreements. See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership. The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License. You may obtain a copy of the License at\n#\n# 
> http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by 
> applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied. See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# bigr configs.sh gpfs mmls ssh symphony Set root logger 
> level to DEBUG and its only appender to A.\nlog4j.logger.org.apache.pig=info, 
> A\n\n# bigr configs.sh gpfs mmls ssh symphony A is set to be a 
> ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# bigr 
> configs.sh gpfs mmls ssh symphony A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> As you can see, there are no * string in the output any longer, but 
> instead it has been replaced with "bigr configs.sh gpfs mmls ssh symphony" 
> which happened to be the local files in my working dir. 
> It all comes from this line in configs.sh, line 241-247
> {code}
> if [ "$propertiesStarted" -gt "0" ]; then
>   if [ -z $FILENAME ]; then
> echo $line
>   else
> echo $line >> $FILENAME
>   fi
> fi

[jira] [Commented] (AMBARI-15754) configs.sh expands ***** in config values to a local file list, causing broken config files

2017-02-23 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-15754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881439#comment-15881439
 ] 

Hudson commented on AMBARI-15754:
-

FAILURE: Integrated in Jenkins build Ambari-trunk-Commit #6833 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/6833/])
AMBARI-15754. Retain the deprecation warning from 2.5.0 (Asger Askov (smohanty: 
[http://git-wip-us.apache.org/repos/asf?p=ambari.git=commit=fc37b7376bc65de3aec93accd0a57cf7807ef98f])
* (edit) ambari-server/src/main/resources/scripts/configs.sh


> configs.sh expands * in config values to a local file list, causing 
> broken config files
> ---
>
> Key: AMBARI-15754
> URL: https://issues.apache.org/jira/browse/AMBARI-15754
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.0.0, 2.0.1, 2.1.0, 2.3.0, 2.0.2, 2.1.1, 2.1.2, trunk, 
> 2.0.3, 2.2.0, 2.4.0, 2.2.1, 2.2.2, 2.4.1
>Reporter: Asger Askov Blekinge
>Assignee: Asger Askov Blekinge
>  Labels: easyfix, patch
> Fix For: trunk, 2.5.0
>
> Attachments: AMBARI-15754-branch-2.5.patch, 
> AMBARI-15754_trunk_v3.patch, AMBARI-15754.v2.patch
>
>
> When you try to get the value of, say, pig-log4j like this, it outputs 
> correctly
> {code}
> curl -k -s -u $AMBARI_USER:$AMBARI_PASSWORD 
> "$AMBARI_HOST:$AMBARI_PORT/api/v1/clusters/$CLUSTER_NAME/configurations?type=pig-log4j=version1"
> {code}
> If you use configs.sh to do the same
> {code}
> configs.sh -u $AMBARI_USER -p $AMBARI_PASSWORD -port $AMBARI_PORT get 
> $AMBARI_HOST $CLUSTER_NAME pig-log4j
> {code}
> it will have replaced the * with the file list in the working directory
> So,
> {code}
>  "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) 
> under one\n# or more contributor license agreements.  See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership.  The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License.  You may obtain a copy of the License 
> at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required 
> by applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# * Set root logger level to DEBUG and its only 
> appender to A.\nlog4j.logger.org.apache.pig=info, A\n\n# * A is set to be 
> a ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# 
> * A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> will be output as 
> {code}
> "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under 
> one\n# or more contributor license agreements. See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership. The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License. You may obtain a copy of the License at\n#\n# 
> http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by 
> applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied. See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# bigr configs.sh gpfs mmls ssh symphony Set root logger 
> level to DEBUG and its only appender to A.\nlog4j.logger.org.apache.pig=info, 
> A\n\n# bigr configs.sh gpfs mmls ssh symphony A is set to be a 
> ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# bigr 
> configs.sh gpfs mmls ssh symphony A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> As you can see, there are no * string in the output any longer, but 
> instead it has been replaced with "bigr configs.sh gpfs mmls ssh symphony" 
> which happened to be the local files in my working dir. 
> It all comes from this line in configs.sh, line 241-247
> {code}
> if [ "$propertiesStarted" -gt "0" ]; then
>   if [ -z $FILENAME ]; then
> echo $line
>   else
> echo $line >> $FILENAME
>   fi
> fi

[jira] [Commented] (AMBARI-15754) configs.sh expands ***** in config values to a local file list, causing broken config files

2017-02-23 Thread Sumit Mohanty (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-15754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881371#comment-15881371
 ] 

Sumit Mohanty commented on AMBARI-15754:


2.5 patch and trunk addendum LGTM, +1

> configs.sh expands * in config values to a local file list, causing 
> broken config files
> ---
>
> Key: AMBARI-15754
> URL: https://issues.apache.org/jira/browse/AMBARI-15754
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.0.0, 2.0.1, 2.1.0, 2.3.0, 2.0.2, 2.1.1, 2.1.2, trunk, 
> 2.0.3, 2.2.0, 2.4.0, 2.2.1, 2.2.2, 2.4.1
>Reporter: Asger Askov Blekinge
>Assignee: Asger Askov Blekinge
>  Labels: easyfix, patch
> Fix For: trunk, 2.5.0
>
> Attachments: AMBARI-15754-branch-2.5.patch, 
> AMBARI-15754_trunk_v3.patch, AMBARI-15754.v2.patch
>
>
> When you try to get the value of, say, pig-log4j like this, it outputs 
> correctly
> {code}
> curl -k -s -u $AMBARI_USER:$AMBARI_PASSWORD 
> "$AMBARI_HOST:$AMBARI_PORT/api/v1/clusters/$CLUSTER_NAME/configurations?type=pig-log4j=version1"
> {code}
> If you use configs.sh to do the same
> {code}
> configs.sh -u $AMBARI_USER -p $AMBARI_PASSWORD -port $AMBARI_PORT get 
> $AMBARI_HOST $CLUSTER_NAME pig-log4j
> {code}
> it will have replaced the * with the file list in the working directory
> So,
> {code}
>  "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) 
> under one\n# or more contributor license agreements.  See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership.  The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License.  You may obtain a copy of the License 
> at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required 
> by applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# * Set root logger level to DEBUG and its only 
> appender to A.\nlog4j.logger.org.apache.pig=info, A\n\n# * A is set to be 
> a ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# 
> * A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> will be output as 
> {code}
> "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under 
> one\n# or more contributor license agreements. See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership. The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License. You may obtain a copy of the License at\n#\n# 
> http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by 
> applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied. See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# bigr configs.sh gpfs mmls ssh symphony Set root logger 
> level to DEBUG and its only appender to A.\nlog4j.logger.org.apache.pig=info, 
> A\n\n# bigr configs.sh gpfs mmls ssh symphony A is set to be a 
> ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# bigr 
> configs.sh gpfs mmls ssh symphony A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> As you can see, there are no * string in the output any longer, but 
> instead it has been replaced with "bigr configs.sh gpfs mmls ssh symphony" 
> which happened to be the local files in my working dir. 
> It all comes from this line in configs.sh, line 241-247
> {code}
> if [ "$propertiesStarted" -gt "0" ]; then
>   if [ -z $FILENAME ]; then
> echo $line
>   else
> echo $line >> $FILENAME
>   fi
> fi
> {code}
> where the echo do not quote the $line to output



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (AMBARI-15754) configs.sh expands ***** in config values to a local file list, causing broken config files

2017-02-22 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-15754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15879719#comment-15879719
 ] 

Hudson commented on AMBARI-15754:
-

SUCCESS: Integrated in Jenkins build Ambari-trunk-Commit #6818 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/6818/])
AMBARI-15754. configs.sh expands * in config values to a local file 
(afernandez: 
[http://git-wip-us.apache.org/repos/asf?p=ambari.git=commit=e9c943905721ef431dc09b45abaf4a05312d4fe5])
* (edit) ambari-server/src/main/resources/scripts/configs.sh


> configs.sh expands * in config values to a local file list, causing 
> broken config files
> ---
>
> Key: AMBARI-15754
> URL: https://issues.apache.org/jira/browse/AMBARI-15754
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.0.0, 2.0.1, 2.1.0, 2.3.0, 2.0.2, 2.1.1, 2.1.2, trunk, 
> 2.0.3, 2.2.0, 2.4.0, 2.2.1, 2.2.2, 2.4.1
>Reporter: Asger Askov Blekinge
>Assignee: Asger Askov Blekinge
>  Labels: easyfix, patch
> Fix For: trunk
>
> Attachments: AMBARI-15754.v2.patch
>
>
> When you try to get the value of, say, pig-log4j like this, it outputs 
> correctly
> {code}
> curl -k -s -u $AMBARI_USER:$AMBARI_PASSWORD 
> "$AMBARI_HOST:$AMBARI_PORT/api/v1/clusters/$CLUSTER_NAME/configurations?type=pig-log4j=version1"
> {code}
> If you use configs.sh to do the same
> {code}
> configs.sh -u $AMBARI_USER -p $AMBARI_PASSWORD -port $AMBARI_PORT get 
> $AMBARI_HOST $CLUSTER_NAME pig-log4j
> {code}
> it will have replaced the * with the file list in the working directory
> So,
> {code}
>  "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) 
> under one\n# or more contributor license agreements.  See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership.  The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License.  You may obtain a copy of the License 
> at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required 
> by applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# * Set root logger level to DEBUG and its only 
> appender to A.\nlog4j.logger.org.apache.pig=info, A\n\n# * A is set to be 
> a ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# 
> * A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> will be output as 
> {code}
> "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under 
> one\n# or more contributor license agreements. See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership. The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License. You may obtain a copy of the License at\n#\n# 
> http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by 
> applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied. See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# bigr configs.sh gpfs mmls ssh symphony Set root logger 
> level to DEBUG and its only appender to A.\nlog4j.logger.org.apache.pig=info, 
> A\n\n# bigr configs.sh gpfs mmls ssh symphony A is set to be a 
> ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# bigr 
> configs.sh gpfs mmls ssh symphony A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> As you can see, there are no * string in the output any longer, but 
> instead it has been replaced with "bigr configs.sh gpfs mmls ssh symphony" 
> which happened to be the local files in my working dir. 
> It all comes from this line in configs.sh, line 241-247
> {code}
> if [ "$propertiesStarted" -gt "0" ]; then
>   if [ -z $FILENAME ]; then
> echo $line
>   else
> echo $line >> $FILENAME
>   fi
> fi
> {code}
> where the echo do not quote the $line to output



--

[jira] [Commented] (AMBARI-15754) configs.sh expands ***** in config values to a local file list, causing broken config files

2017-02-22 Thread Siddharth Wagle (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-15754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15879521#comment-15879521
 ] 

Siddharth Wagle commented on AMBARI-15754:
--

[~afernandez] +1 LGTM

> configs.sh expands * in config values to a local file list, causing 
> broken config files
> ---
>
> Key: AMBARI-15754
> URL: https://issues.apache.org/jira/browse/AMBARI-15754
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.0.0, 2.0.1, 2.1.0, 2.3.0, 2.0.2, 2.1.1, 2.1.2, trunk, 
> 2.0.3, 2.2.0, 2.4.0, 2.2.1, 2.2.2, 2.4.1
>Reporter: Asger Askov Blekinge
>Assignee: Asger Askov Blekinge
>  Labels: easyfix, patch
> Fix For: trunk
>
> Attachments: AMBARI-15754.v2.patch
>
>
> When you try to get the value of, say, pig-log4j like this, it outputs 
> correctly
> {code}
> curl -k -s -u $AMBARI_USER:$AMBARI_PASSWORD 
> "$AMBARI_HOST:$AMBARI_PORT/api/v1/clusters/$CLUSTER_NAME/configurations?type=pig-log4j=version1"
> {code}
> If you use configs.sh to do the same
> {code}
> configs.sh -u $AMBARI_USER -p $AMBARI_PASSWORD -port $AMBARI_PORT get 
> $AMBARI_HOST $CLUSTER_NAME pig-log4j
> {code}
> it will have replaced the * with the file list in the working directory
> So,
> {code}
>  "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) 
> under one\n# or more contributor license agreements.  See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership.  The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License.  You may obtain a copy of the License 
> at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required 
> by applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# * Set root logger level to DEBUG and its only 
> appender to A.\nlog4j.logger.org.apache.pig=info, A\n\n# * A is set to be 
> a ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# 
> * A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> will be output as 
> {code}
> "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under 
> one\n# or more contributor license agreements. See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership. The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License. You may obtain a copy of the License at\n#\n# 
> http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by 
> applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied. See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# bigr configs.sh gpfs mmls ssh symphony Set root logger 
> level to DEBUG and its only appender to A.\nlog4j.logger.org.apache.pig=info, 
> A\n\n# bigr configs.sh gpfs mmls ssh symphony A is set to be a 
> ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# bigr 
> configs.sh gpfs mmls ssh symphony A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> As you can see, there are no * string in the output any longer, but 
> instead it has been replaced with "bigr configs.sh gpfs mmls ssh symphony" 
> which happened to be the local files in my working dir. 
> It all comes from this line in configs.sh, line 241-247
> {code}
> if [ "$propertiesStarted" -gt "0" ]; then
>   if [ -z $FILENAME ]; then
> echo $line
>   else
> echo $line >> $FILENAME
>   fi
> fi
> {code}
> where the echo do not quote the $line to output



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (AMBARI-15754) configs.sh expands ***** in config values to a local file list, causing broken config files

2017-02-21 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-15754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15877412#comment-15877412
 ] 

Hadoop QA commented on AMBARI-15754:


{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12853859/AMBARI-15754.v2.patch
  against trunk revision .

{color:red}-1 patch{color}.  Top-level trunk compilation may be broken.

Console output: 
https://builds.apache.org/job/Ambari-trunk-test-patch/10678//console

This message is automatically generated.

> configs.sh expands * in config values to a local file list, causing 
> broken config files
> ---
>
> Key: AMBARI-15754
> URL: https://issues.apache.org/jira/browse/AMBARI-15754
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.0.0, 2.0.1, 2.1.0, 2.3.0, 2.0.2, 2.1.1, 2.1.2, trunk, 
> 2.0.3, 2.2.0, 2.4.0, 2.2.1, 2.2.2, 2.4.1
>Reporter: Asger Askov Blekinge
>  Labels: easyfix, patch
> Attachments: AMBARI-15754.v2.patch
>
>
> When you try to get the value of, say, pig-log4j like this, it outputs 
> correctly
> {code}
> curl -k -s -u $AMBARI_USER:$AMBARI_PASSWORD 
> "$AMBARI_HOST:$AMBARI_PORT/api/v1/clusters/$CLUSTER_NAME/configurations?type=pig-log4j=version1"
> {code}
> If you use configs.sh to do the same
> {code}
> configs.sh -u $AMBARI_USER -p $AMBARI_PASSWORD -port $AMBARI_PORT get 
> $AMBARI_HOST $CLUSTER_NAME pig-log4j
> {code}
> it will have replaced the * with the file list in the working directory
> So,
> {code}
>  "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) 
> under one\n# or more contributor license agreements.  See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership.  The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License.  You may obtain a copy of the License 
> at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required 
> by applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# * Set root logger level to DEBUG and its only 
> appender to A.\nlog4j.logger.org.apache.pig=info, A\n\n# * A is set to be 
> a ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# 
> * A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> will be output as 
> {code}
> "content" : "\n#\n#\n# Licensed to the Apache Software Foundation (ASF) under 
> one\n# or more contributor license agreements. See the NOTICE file\n# 
> distributed with this work for additional information\n# regarding copyright 
> ownership. The ASF licenses this file\n# to you under the Apache License, 
> Version 2.0 (the\n# \"License\"); you may not use this file except in 
> compliance\n# with the License. You may obtain a copy of the License at\n#\n# 
> http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by 
> applicable law or agreed to in writing,\n# software distributed under the 
> License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR 
> CONDITIONS OF ANY\n# KIND, either express or implied. See the License for 
> the\n# specific language governing permissions and limitations\n# under the 
> License.\n#\n#\n#\n\n# bigr configs.sh gpfs mmls ssh symphony Set root logger 
> level to DEBUG and its only appender to A.\nlog4j.logger.org.apache.pig=info, 
> A\n\n# bigr configs.sh gpfs mmls ssh symphony A is set to be a 
> ConsoleAppender.\nlog4j.appender.A=org.apache.log4j.ConsoleAppender\n# bigr 
> configs.sh gpfs mmls ssh symphony A uses 
> PatternLayout.\nlog4j.appender.A.layout=org.apache.log4j.PatternLayout\nlog4j.appender.A.layout.ConversionPattern=%-4r
>  [%t] %-5p %c %x - %m%n"
> {code}
> As you can see, there are no * string in the output any longer, but 
> instead it has been replaced with "bigr configs.sh gpfs mmls ssh symphony" 
> which happened to be the local files in my working dir. 
> It all comes from this line in configs.sh, line 241-247
> {code}
> if [ "$propertiesStarted" -gt "0" ]; then
>   if [ -z $FILENAME ]; then
> echo $line
>   else
> echo $line >> $FILENAME
>   fi
> fi
> {code}
> where the echo do not quote the $line to output



--
This message was sent by Atlassian JIRA