Created 03-06-2017 09:08 PM
I'm doing the following
sudo yum update ambari-server
sudo ambari-server upgrade Using python /usr/bin/pythonUpgrading ambari-serverERROR: Unexpected TypeError: print_info_msg() takes exactly 1 argument (2 given)For more info run ambari-server with -v or --verbose option
sudo ambari-server upgrade -v Using python /usr/bin/pythonUpgrading ambari-serverINFO: Loading properties from /etc/ambari-server/conf/ambari.propertiesTraceback (most recent call last): File "/usr/sbin/ambari-server.py", line 941, in <module> mainBody() File "/usr/sbin/ambari-server.py", line 911, in mainBody main(options, args, parser) File "/usr/sbin/ambari-server.py", line 863, in main action_obj.execute() File "/usr/sbin/ambari-server.py", line 78, in execute self.fn(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/ambari_server/serverUpgrade.py", line 337, in upgrade print_info_msg("Upgrade Ambari Server", True)TypeError: print_info_msg() takes exactly 1 argument (2 given)
This is an HA NN and RM cluster with MIT Kerberos on Centos 7.
Created 03-08-2017 04:20 PM
I was able to upgrade ambari-server, turns out ambari_commons.logging_utils.py changed print_msg_info() signature from one argument to two and I had ambari-agent still on the old version, the fix is upgrade ambari-server and agent at the same time if both coexist on a server, that way ambari_commons gets updated logging_utils package. In my case, I actually had to reinstall ambari and restore from backup as I messed up the whole thing trying out different scenarios.
this is new function signature https://github.com/apache/ambari/blob/trunk/ambari-common/src/main/python/ambari_commons/logging_uti...
# # Prints an "info" messsage. # def print_info_msg(msg, forced=False): if forced: print("INFO: " + msg) return if _VERBOSE: print("INFO: " + msg)
this is an old one, from 2.4 branch https://github.com/apache/ambari/blob/branch-2.4.0/ambari-common/src/main/python/ambari_commons/logg...
# # Prints an "info" messsage. # def print_info_msg(msg): if _VERBOSE: print("INFO: " + msg)
Created 03-08-2017 04:20 PM
I was able to upgrade ambari-server, turns out ambari_commons.logging_utils.py changed print_msg_info() signature from one argument to two and I had ambari-agent still on the old version, the fix is upgrade ambari-server and agent at the same time if both coexist on a server, that way ambari_commons gets updated logging_utils package. In my case, I actually had to reinstall ambari and restore from backup as I messed up the whole thing trying out different scenarios.
this is new function signature https://github.com/apache/ambari/blob/trunk/ambari-common/src/main/python/ambari_commons/logging_uti...
# # Prints an "info" messsage. # def print_info_msg(msg, forced=False): if forced: print("INFO: " + msg) return if _VERBOSE: print("INFO: " + msg)
this is an old one, from 2.4 branch https://github.com/apache/ambari/blob/branch-2.4.0/ambari-common/src/main/python/ambari_commons/logg...
# # Prints an "info" messsage. # def print_info_msg(msg): if _VERBOSE: print("INFO: " + msg)
Created 03-08-2017 04:33 PM
addendum: the order of install and upgrade of ambari-server matters and it is the same for Ambari 2.4.2 as well. Morale of the story, read the documentation fully http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-upgrade/content/upgrade_ambari.htm...
Created 03-08-2017 04:33 PM
According to the upgrade instructions from 2.4.2 http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-upgrade/content/upgrade_ambari.htm...
You upgrade server, then agent and then upgrade the DB schema - 'ambari-server upgrade'
The order is important and should be the same for 2.5.0 as well