You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/24 14:04:00 UTC
[jira] [Updated] (AMBARI-24537) Use Mpack Instance Manager To
Switch Component Instance Version on Upgrade
[ https://issues.apache.org/jira/browse/AMBARI-24537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated AMBARI-24537:
------------------------------------
Labels: pull-request-available (was: )
> Use Mpack Instance Manager To Switch Component Instance Version on Upgrade
> --------------------------------------------------------------------------
>
> Key: AMBARI-24537
> URL: https://issues.apache.org/jira/browse/AMBARI-24537
> Project: Ambari
> Issue Type: Task
> Affects Versions: 3.0.0
> Reporter: Jonathan Hurley
> Assignee: Jonathan Hurley
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 3.0.0
>
>
> Mpacks will not continue use the {{stack-select}} tools which have been used by various stacks over the past few years. Previously, each stack shipped a tool which would manipulate the symlinks on the file system in order to both report versions for components and to change versions during an upgrade.
> The following pieces were required for this old framework:
> - A file, such as {{stack_packages.json}} which provided a mapping between Ambari's component name and the symlink name on the file system.
> - Each component's Python file would need code which flips the version before restarting during an upgrade:
> {code}
> def pre_upgrade_restart(self, env, upgrade_type=None):
> if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, format_stack_version(params.version)):
> stack_select.select_packages(params.version)
> {code}
> Mpacks v2 will instead use the mpack instance manager to change the pointer on the file system:
> {noformat}
> /usr/hwx/mpacks
> └── hdpcore
> ├── 1.0.0-b575
> │ ├── zookeeper_client -> /usr/hwx/modules/zookeeper_clients/3.4.0.0-b42
> │ └── zookeeper_server -> /usr/hwx/modules/zookeeper/3.4.0.0-b42
> └── 1.0.0-b580
> ├── zookeeper_client -> /usr/hwx/modules/zookeeper_clients/3.4.0.0-b43
> └── zookeeper_server -> /usr/hwx/modules/zookeeper_clients/3.4.0.0-b43
> {noformat}
> {noformat}
> /usr/hwx/instances
> └── hdpcore
> └── HDPCORE
> └── default
> ├── zookeeper
> │ └── zookeeper_server
> │ └── ZK-1
> │ ├── current -> /usr/hwx/mpacks/hdpcore/1.0.0-b575/zookeeper_server
> └── zookeeper_client
> ├── current -> /usr/hwx/mpacks/hdpcore/1.0.0-b575/zookeeper_client
> {noformat}
> For each instance of a component, there is a {{current}} pointer which references the mpack (and indirectly) the module version. However, Ambari knows all of this information up front since it's all based on metadata contained with the {{mpack.json}}. Therefore, it is possible for Ambari to do all of this version linking inside of its own framework during the upgrade. The individual Python scripts will no longer have to perform these actions.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)