ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Fernandez" <afernan...@hortonworks.com>
Subject Re: Review Request 36592: RU - Magician Script to correct data inconsistencies, allow retrying repo installation, force finalize to versions, etc
Date Mon, 20 Jul 2015 23:15:00 GMT

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


Changes
-------

Updated license to LGPL, added more code to fix the host_role_command table to ABORT any tasks
still in progress when forcing a version to CURRENT for an RU in progress.


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 (updated)
-----

  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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message