## What changes were proposed in this pull request?
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:
```
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)
```
Mpacks v2 will instead use the mpack instance manager to change the pointer on
the file system:
```
/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
```
```
/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
```
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.
## How was this patch tested?
Testing using a very primitive upgrade orchestration to ensure that the right
functions were hit.
[ Full content available at: https://github.com/apache/ambari/pull/2164 ]
This message was relayed via gitbox.apache.org for [email protected]