You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2015/06/12 16:42:48 UTC
ambari git commit: AMBARI-11857 - Missing jdbc driver error during
KMS rolling upgrade process (Gautam Borad via jonathanhurley)
Repository: ambari
Updated Branches:
refs/heads/trunk 4a946466e -> 51ed522eb
AMBARI-11857 - Missing jdbc driver error during KMS rolling upgrade process (Gautam Borad via jonathanhurley)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/51ed522e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/51ed522e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/51ed522e
Branch: refs/heads/trunk
Commit: 51ed522ebff3f7d191967f0aacc49166a4360b43
Parents: 4a94646
Author: Jonathan Hurley <jh...@hortonworks.com>
Authored: Fri Jun 12 10:42:38 2015 -0400
Committer: Jonathan Hurley <jh...@hortonworks.com>
Committed: Fri Jun 12 10:42:38 2015 -0400
----------------------------------------------------------------------
.../0.5.0.2.3/package/scripts/kms_server.py | 7 ++++-
.../0.5.0.2.3/package/scripts/upgrade.py | 30 ++++++++++++++++++++
.../stacks/HDP/2.3/upgrades/upgrade-2.3.xml | 6 ++++
3 files changed, 42 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/51ed522e/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
index 4be76ef..3512561 100755
--- a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py
@@ -25,6 +25,7 @@ from resource_management.core.logger import Logger
from resource_management.core import shell
from kms import kms, setup_kms_db, setup_java_patch, enable_kms_plugin
from kms_service import kms_service
+import upgrade
class KmsServer(Script):
@@ -63,7 +64,11 @@ class KmsServer(Script):
def pre_rolling_restart(self, env):
import params
env.set_params(params)
- upgrade.prestart(env, "ranger-kms-server")
+
+ upgrade.prestart(env, "ranger-kms")
+ setup_kms_db()
+ kms()
+ setup_java_patch()
if __name__ == "__main__":
KmsServer().execute()
http://git-wip-us.apache.org/repos/asf/ambari/blob/51ed522e/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/upgrade.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/upgrade.py
new file mode 100644
index 0000000..41885bb
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/upgrade.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+from resource_management.core.resources.system import Execute
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions import hdp_select
+from resource_management.libraries.functions.format import format
+
+def prestart(env, hdp_component):
+ import params
+
+ if params.version and params.stack_is_hdp23_or_further:
+ conf_select.select(params.stack_name, hdp_component, params.version)
+ hdp_select.select(hdp_component, params.version)
http://git-wip-us.apache.org/repos/asf/ambari/blob/51ed522e/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml
index b472c5f..8734ce7 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.3.xml
@@ -60,6 +60,12 @@
</task>
</execute-stage>
+ <execute-stage service="RANGER_KMS" component="RANGER_KMS_SERVER" title="Pre Upgrade Ranger KMS">
+ <task xsi:type="manual">
+ <message>Before continuing, please backup Ranger KMS database</message>
+ </task>
+ </execute-stage>
+
</group>
<group name="ZOOKEEPER" title="ZooKeeper">