You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2014/05/12 19:58:26 UTC

git commit: AMBARI-5632. tag exists problem when running config updates in sequence w/o a sleep (dlysnichenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 1d0fe34b6 -> 55bb122d0


AMBARI-5632. tag exists problem when running config updates in sequence w/o a sleep (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/55bb122d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/55bb122d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/55bb122d

Branch: refs/heads/trunk
Commit: 55bb122d0f03c5254f5df127656d70cb184f5441
Parents: 1d0fe34
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Mon May 12 20:57:24 2014 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Mon May 12 20:57:24 2014 +0300

----------------------------------------------------------------------
 ambari-server/src/main/resources/scripts/configs.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/55bb122d/ambari-server/src/main/resources/scripts/configs.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/scripts/configs.sh b/ambari-server/src/main/resources/scripts/configs.sh
index a07ffb2..57fd2aa 100755
--- a/ambari-server/src/main/resources/scripts/configs.sh
+++ b/ambari-server/src/main/resources/scripts/configs.sh
@@ -138,8 +138,8 @@ doConfigUpdate () {
         newProperties=$newProperties$line
         propertiesStarted=0;
         
-        newTag=`date "+%s"`
-        newTag="version${newTag}000"
+        newTag=`date "+%s%N"`
+        newTag="version${newTag}"
         finalJson="{ \"Clusters\": { \"desired_config\": {\"type\": \"$SITE\", \"tag\":\"$newTag\", $newProperties}}}"
         newFile="doSet_$newTag.json"
         echo "########## PUTting json into: $newFile"
@@ -164,8 +164,8 @@ doConfigFileUpdate () {
   FILENAME=$1
   if [ -f $FILENAME ]; then
     if [ "1" == "`grep -n \"\"properties\"\" $FILENAME | cut -d : -f 1`" ]; then
-      newTag=`date "+%s"`
-      newTag="version${newTag}000"
+      newTag=`date "+%s%N"`
+      newTag="version${newTag}"
       newProperties=`cat $FILENAME`;
       finalJson="{ \"Clusters\": { \"desired_config\": {\"type\": \"$SITE\", \"tag\":\"$newTag\", $newProperties}}}"
       newFile="$FILENAME"