Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how to disable the script os_check_type.py when using different OS versions in the ambari cluster

how to disable the script os_check_type.py when using different OS versions in the ambari cluster

hi all

 

After reading some posts as

 

( https://community.cloudera.com/t5/Support-Questions/How-to-register-host-with-different-OS-to-Ambari... ) ,

 

( https://community.cloudera.com/t5/Support-Questions/HDP-Support-for-mix-of-OS-Releases-within-a-cl...

that discussed about using different OS rhel version in the cluster 

 

I see the solution about to disable the script:

 

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

 

but not clearly how to disable it?

 

for example one option is just to remove the execution from the script as

 

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

 

but not sure if this is the meaning !

 

the script : 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()

Michael-Bronson
Don't have an account?
Coming from Hortonworks? Activate your account here