You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/06/13 11:55:54 UTC

[1/2] ambari git commit: AMBARI-17161. Ubuntu 16, Hive Metastore Start failed (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 e3b945f65 -> 8edd8fd3a
  refs/heads/trunk d56f4391e -> 18d24e55e


AMBARI-17161. Ubuntu 16, Hive Metastore Start failed (aonishuk)


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

Branch: refs/heads/trunk
Commit: 18d24e55e2f9b48a6353113bda1a55cb71295651
Parents: d56f439
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Jun 13 14:55:43 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Jun 13 14:55:43 2016 +0300

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/files/addMysqlUser.sh       | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/18d24e55/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
index 36ed58f..862e9b2 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
@@ -28,10 +28,12 @@ userhost=$4
 # The restart (not start) is required to pick up mysql configuration changes made by sed
 # during install, in case mysql is already started. The changes are required by Hive later on.
 /var/lib/ambari-agent/ambari-sudo.sh service $mysqldservice restart
-  
+
+# MySQL 5.7 installed in non-interactive way uses a socket authentication plugin.
+# "mysql -u root" should be executed from root user
 echo "Adding user $mysqldbuser@% and removing users with empty name"
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"CREATE USER '$mysqldbuser'@'%' IDENTIFIED BY '$mysqldbpasswd';\""
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO '$mysqldbuser'@'%';\""
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"DELETE FROM mysql.user WHERE user='';\""
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"flush privileges;\""
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "CREATE USER '$mysqldbuser'@'%' IDENTIFIED BY '$mysqldbpasswd';"
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO '$mysqldbuser'@'%';"
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "DELETE FROM mysql.user WHERE user='';"
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "flush privileges;"
 /var/lib/ambari-agent/ambari-sudo.sh service $mysqldservice stop


[2/2] ambari git commit: AMBARI-17161. Ubuntu 16, Hive Metastore Start failed (aonishuk)

Posted by ao...@apache.org.
AMBARI-17161. Ubuntu 16, Hive Metastore Start failed (aonishuk)


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

Branch: refs/heads/branch-2.4
Commit: 8edd8fd3a2c3235ef7a80ecc962c700b49cb7872
Parents: e3b945f
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Mon Jun 13 14:55:45 2016 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Mon Jun 13 14:55:45 2016 +0300

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/files/addMysqlUser.sh       | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8edd8fd3/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
index 36ed58f..862e9b2 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/files/addMysqlUser.sh
@@ -28,10 +28,12 @@ userhost=$4
 # The restart (not start) is required to pick up mysql configuration changes made by sed
 # during install, in case mysql is already started. The changes are required by Hive later on.
 /var/lib/ambari-agent/ambari-sudo.sh service $mysqldservice restart
-  
+
+# MySQL 5.7 installed in non-interactive way uses a socket authentication plugin.
+# "mysql -u root" should be executed from root user
 echo "Adding user $mysqldbuser@% and removing users with empty name"
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"CREATE USER '$mysqldbuser'@'%' IDENTIFIED BY '$mysqldbpasswd';\""
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"GRANT ALL PRIVILEGES ON *.* TO '$mysqldbuser'@'%';\""
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"DELETE FROM mysql.user WHERE user='';\""
-/var/lib/ambari-agent/ambari-sudo.sh su mysql -s /bin/bash - -c "mysql -u root -e \"flush privileges;\""
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "CREATE USER '$mysqldbuser'@'%' IDENTIFIED BY '$mysqldbpasswd';"
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO '$mysqldbuser'@'%';"
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "DELETE FROM mysql.user WHERE user='';"
+/var/lib/ambari-agent/ambari-sudo.sh mysql -u root -e "flush privileges;"
 /var/lib/ambari-agent/ambari-sudo.sh service $mysqldservice stop