TroveGuestAgentUpdateUpgrade

= Trove Guestagent code update =
 * Trove needs mechanism for updating(during one release cycle)/upgrading(from one release to another) guest code after migration from one release to another, taking into account possible guest RPC API changes.

Warning

 * Note, user should perform backup before update/upgrade. There's no way to downgrade.

Task-list

 * Since guestagent is an application which could be delivered into many kind ways, we need to extend mgmt API calls stack.


 * Task #1: Versionize guest RPC API
 * Define RPC API version per Trove release.


 * Task #2: Update/Upgrade
 * Define pluggable mechanism for guest update/upgrade.
 * Requires: update/upgrade strategy
 * Request parameters:
 * DBInstance ID
 * Type: UUID
 * StrategyName.
 * Type: String.
 * Description: Update/Upgrade strategy.
 * Possible values: from_source, from_package
 * Flow: trove-manage guest-update 5ff34c3d-689f-46f0-904a-9c1cc4d54fcb --strategy from_source
 * If strategy available - execute update/upgrade, restart instance, send finish_update call
 * Required configuration:
 * Available strategy names;
 * Strategy implementations;
 * Version of current guest RPC API;
 * Strategy related parameters (from_source: code repository, from_package: package URL).


 * Task #3: finish_update/upgrade call
 * Perform database check. (mysql ping, nodetool statusthrift, etc)
 * Requires: check process implementation. ( suc, err = util.execute_with_timeout('bla-bla') )
 * Flow: cast finish_update: suc, err = util.execute_with_timeout('mysql ping', run_as_root=True, shell=True)

Conclusion

 * Guest RPC API should have version per release
 * Guest PRC API should contain call which would desribe current API