----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/36592/#review92336 -----------------------------------------------------------
ambari-server/src/main/resources/scripts/ru_magician.py (line 246) <https://reviews.apache.org/r/36592/#comment146442> psycopg2 is covered by LGPL, so it only needs the copyright information at the top of the file. MySQLdb is either GPL XOR the Python license, so it does not require open-sourcing the code anways. See http://www.antoncohen.com/2011/09/python-libraries-should-not-be-licensed.html and https://docs.python.org/2/license.html I will add the Python and LGPL License files to the Jira, and distribute those 2 files and this script in my own GitHub account instead of checking into trunk. - Alejandro Fernandez On July 20, 2015, 11:15 p.m., Alejandro Fernandez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/36592/ > ----------------------------------------------------------- > > (Updated July 20, 2015, 11:15 p.m.) > > > Review request for Ambari, Jonathan Hurley, Nate Cole, Sid Wagle, and Yusaku > Sako. > > > Bugs: AMBARI-12455 > https://issues.apache.org/jira/browse/AMBARI-12455 > > > Repository: ambari > > > Description > ------- > > Support has identified the need to come up with a script to fix any > mismatches in the database, or identify problems during Rolling Upgrade. > This can be a simple Python script that, > > - On a newly installed cluster, ensures that there is at least one cluster > version whose state is CURRENT. If not, will advise the user to restart > services. > - If the user has Registered and Installed repos, check that each one has a > unique version and display name. Further, if any are stuck in an INSTALLING > state, will let the user take three potential actions: leave as is, force to > INSTALLED, force to INSTALL_FAILED. > - If the user has Registered and Installed repos, and one cluster_version is > already in an UPGRADING state, perhaps because hdp-select changed the > symlinks and a component was restarted, or the user inadvertently started a > manual upgrade, will allow the user to force it back to INSTALLED. > - If the user in the in the middle of an upgrade, and they want to force one > of the versions are CURRENT, it will update all DB records accordingly, and > set the previously CURRENT version to INSTALLED. > For now, this will support Ambari 2.0.0 and higher, and MySQL, and Postgres. > > > Diffs > ----- > > ambari-server/src/main/resources/scripts/ru_magician.py PRE-CREATION > > Diff: https://reviews.apache.org/r/36592/diff/ > > > Testing > ------- > > Tested on Ambari 2.1.0 with Postgres, and Ambari 2.0.1 on MySQL (using local > and external DB), all of the scenarios above. > I still have to do more thorough testing in the cases of Finalize, but this > is a good preliminary patch to start getting some feedback. > > I could have used SQLAlchemy as my ORM, but I really wanted a standalone > script that could be a quick v1, so I went for raw SQL that works on both > Postgres & MySQL. > > > Thanks, > > Alejandro Fernandez > >
