You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by GitBox <gi...@apache.org> on 2019/11/20 20:14:40 UTC

[GitHub] [metron] mmiklavc commented on a change in pull request #1566: METRON-2322 Add Ambari connection check to upgrade_helper script

mmiklavc commented on a change in pull request #1566: METRON-2322 Add Ambari connection check to upgrade_helper script
URL: https://github.com/apache/metron/pull/1566#discussion_r348723274
 
 

 ##########
 File path: metron-platform/metron-common/src/main/scripts/upgrade_helper.sh
 ##########
 @@ -57,12 +57,18 @@ if [ "$mode" == "backup" ]; then
     fi
     if [ -f "/var/lib/ambari-server/resources/scripts/configs.py" ]; then
         echo Backing up Ambari config...
-        for config_type in $(curl -u $username:$password -H "X-Requested-By: ambari" -X GET  http://$ambari_address/api/v1/clusters/$cluster_name?fields=Clusters/desired_configs | grep '" : {' | grep -v Clusters | grep -v desired_configs | cut -d'"' -f2 | grep metron); 
-        do 
-            echo Saving $config_type
-            /var/lib/ambari-server/resources/scripts/configs.py -u $username -p $password -a get -l ${ambari_address%:*} -n $cluster_name -c $config_type -f $AMBARI_CONFIG_DIR/${config_type}.json
-        done
-        echo Done backing up Ambari config...
+        echo Checking connection...
+        ret_status=$(curl -i -u "$username":"$password" -H "X-Requested-By: ambari" -X GET  http://$ambari_address/api/v1/clusters/$cluster_name | head -n 1)
 
 Review comment:
   Hm, good find. When I ran this locally I did not run into this problem. I will add that change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services