0

主要问题 - 在 ambari/HDP 集群中使用不同的操作系统版本(如 RHEL 7.0 和 RHEL 7.2/7.5)

在阅读了一些帖子后

https://community.cloudera.com/t5/Support-Questions/How-to-register-host-with-different-OS-to-Ambari/mp/151089

https://community.cloudera.com/t5/Support-Questions/HDP-Support-for-mix-of-OS-Releases-within-a-cluster/mp/97315

讨论了在集群中使用不同的 OS RHEL 版本

我看到了关于禁用脚本的解决方案:

/usr/lib/python2.6/site-packages/ambari_server/os_check_type.py

但不清楚如何禁用它?

例如,我理解的一个选项是将脚本中的执行删除为

chmod -x  /usr/lib/python2.6/site-packages/ambari_server/os_check_type.py

但不确定这是不是这个意思!

more os_check_type.py
#!/usr/bin/ambari-python-wrap

'''
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.
'''

import sys
from ambari_commons import OSCheck

def main(argv=None):
  # Same logic that was in "os_type_check.sh"
  if len(sys.argv) != 2:
    print "Usage: <cluster_os>"
    raise Exception("Error in number of arguments. Usage: <cluster_os>")
    pass

  cluster_os = sys.argv[1]
  current_os = OSCheck.get_os_family() + OSCheck.get_os_major_version()

  # If agent/server have the same {"family","main_version"} - then ok.
  print "Cluster primary/cluster OS family is %s and local/current OS family is %s" % (
    cluster_os, current_os)
  if current_os == cluster_os:
    sys.exit(0)
  else:
    raise Exception("Local OS is not compatible with cluster primary OS family. Please perform manual bootstrap on this host.")


if __name__ == "__main__":
  main()
4

0 回答 0