Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate a router Mist-managed #671

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/concepts_application_discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ A variant on the packet-capture technique described previously is to apply a fil

Apply a capture-filter on the LAN-side `device-interface`, and set the filter to `udp port 53`. Because DNS transactions are small (two packets), and because they are infrequent, this filter can be left in place for a long time before the capture file is harvested.

After running tests, retrieve the file from the system for post-processing. We have had success using the `dnsanon` tool to extract the contents of a PCAP file into a text file containing the DNS queries. The `dnsanon` tool can be found at https://ant.isi.edu/software/dnsanon/.
After running tests, retrieve the file from the system for post-processing. We have had success using the `dnsanon` tool to extract the contents of a PCAP file into a text file containing the DNS queries.

:::note
The `dnsanon` tool is open source software and is not supported. Use at your own risk.
Expand Down
126 changes: 126 additions & 0 deletions docs/wan_migration_to_mist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
---
title: Migrating a Router to Mist
sidebar_label: Migrating a Router to Mist
---

This document explains the process of migrating a Conductor-managed router to a Mist-managed environment.

## Prerequisites

- The conductor and router are running version 3.7.0 or newer of the [Mist WAN Assurance plugin](release_notes_wan_assurance_plugin_3.7.md).
- The router was previously onboarded and connected to the Mist cloud using the [ZTP Onboarding to a Conductor workflow](config_wan_assurance.md).
- For HA routers, each node should have a direct connection to the Mist cloud.
- The router must be online and connected to the cloud for the migration process to be initiated.
- The router is running a cloud-ready installation of SSR software, such as V6.0.0 or greater.
- The router configuration must be re-created on the Mist cloud.
- The Mist cloud configuration should have the necessary components for establishing a successful cloud connection post migration.

:::warning
The migration operation will be service impacting.
:::

## Migrating a Standalone Router

Use the following steps to perform the migration.

#### 1. Login

1. Login to the Conductor as `root`.
2. SSH to the router from the conductor.
3. Use the `harware-bootstrapper migrator` to perform the migration process. The options for using the script are shown below:

```
Usage: python -m hardware-bootstrapper migrator [OPTIONS]

migrate the device from conductor managed to mist managed

Options:
-v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO or DEBUG
-l, --log-dir PATH Log directory
--verify Only verify if device is migratable
--dry-run Perform a dry run. Log instead of making changes
-f, --force Skip confirmation
--help Show this message and exit.
```
#### 2. Run the Compatibility Check

This check verifies that the router is compatible for migration to Mist.

```
[root@t133-dut2 centos]# /usr/libexec/hardwareBootstrapper128t migrator --verify
Verifying 128T is up
Validing reverse ssh
Validing mist agent state
only verify flag present. Exiting
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought engineering developed a migrate command that performed several of these steps outlined here.
@agrawalkaushik to confirm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did. Spoke to Chris offline and the doc was created using the wrong source. Chris will be re-writing this.


#### 3. Run the Migrator

Once you initiate this command, expect a loss of connectivity to the router from the conductor. The migrator runs system checks, and then asks whether to proceed.

1. Run the command `/usr/libexec/hardwareBootstrapper128t migrator`
2. The migrator runs system checks, and then asks whether to proceed.
3. Enter Y to proceed.

```
[root@t133-dut2 centos]# /usr/libexec/hardwareBootstrapper128t migrator
Verifying 128T is up
Validing reverse ssh
Validing mist agent state
WARNING: This tool could break connection to your conductor and/or MIST. Only run this command if you know what you are doing.
Proceed? (y/n)
Cleaning migration backup directory
Backing up file: /etc/128technology/global.init to /etc/128T-hardware-bootstrapper/migration-backups
Backing up file: /etc/128technology/local.init to /etc/128T-hardware-bootstrapper/migration-backups
Backing up file: /etc/128T-hardware-bootstrapper/config.json to /etc/128T-hardware-bootstrapper/migration-backups
Backing up file: /etc/udev/rules.d/128-persistent-net.rules to /etc/128T-hardware-bootstrapper/migration-backups
invalid format returned for interfaces: 17
unable to find device map. using default: {'ethernet': [{'type': 'WAN', 'name': 'ge-0-0', 'description': '', 'bcpNetwork': {'standaloneBranch': {'name': 'lan1'}}, 'pciAddress': '0000:00:03.0', 'vmbusId': None}, {'type': 'LAN', 'name': 'ge-0-1', 'description': '', 'bcpNetwork': {'standaloneBranch': {'name': 'lan2'}}, 'pciAddress': '0000:00:04.0', 'vmbusId': None}, {'type': 'HASync', 'name': 'ge-0-2', 'description': '', 'bcpNetwork': {'standaloneBranch': {'name': 'lan3'}}, 'pciAddress': '0000:00:05.0', 'vmbusId': None}, {'type': 'HAFabric', 'name': 'ge-0-3', 'description': '', 'bcpNetwork': {'standaloneBranch': {'name': 'lan4'}}, 'pciAddress': '0000:00:06.0', 'vmbusId': None}]}
invalid format returned for interfaces: 17
Writing linux udev rules
Removing conductor address from global.init
Stopping and disabling salt-minion service
Populating Hardware Config
Restarting 128T-mist-agent service
```

#### 4. Unassign the Router from the Mist Site

1. Log in to your Mist Org.
2. Go to WAN Edges Inventory.

![Show Device](/img/mist-migration-unassign1.png)

3. Select your device.
4. From the More dropdown, select Assign to Site.

![Assign to Site](/img/mist-migration-unassign3.png)

5. In the Assign WAN Edges dialog, use the Site dropdown to select Unassigned. This unassigns your router from your conductor managed site.

![Select Unassigned](/img/mist-migration-unassign4.png)

6. Select the Organization, and choose WAN Edge Templates from the pull out menu.

![WAN Edge Templates](/img/mist-migration-unassign5.png)

7. Select the `Standalone_SSR_Migration` template from the list.
8. Click the Assign to Sites button.
9. Select your site from the list of sites, and click apply.

![Assign to Site](/img/mist-migration2.png)

10. From the Organization menu, select Inventory.
11. Choose your site.
12. Assign the device for migration back to your site and select `Manage configuration with Mist`.

![Manage with Mist](/img/mist-migration-unassign6.png)

#### 5. Installation

The device starts installing the necessary cloud components to become a Mist-managed device. The SSR restarts several times during the process.

You are not able to remote SSH into the device from the conductor until the migration is complete.

If the SSR is currently running a package-based 6.x install, it will not be converted to image-based until the next upgrade.

1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ module.exports = {
"wan_telemetry_troubleshooting",
],
},
"wan_migration_to_mist",
],
"Administration": [
{
Expand Down
Binary file added static/img/mist-migration-unassign1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mist-migration-unassign3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mist-migration-unassign4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mist-migration-unassign5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mist-migration-unassign6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mist-migration2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading