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

[Update] POST /linode/instances/{linodeId}/migrate #119

Merged
merged 3 commits into from
Sep 6, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 32 additions & 6 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4941,13 +4941,25 @@ paths:
x-linode-cli-command: linodes
post:
x-linode-grant: read_write
summary: Initiate Pending Migration
summary: Initiate Pending Host Migration/DC Migration
description: >
In some circumstances, a Linode may have pending migrations scheduled that
you can initiate when convenient. In these cases, a Notification
will be returned from [GET /account/notifications](#getNotifications).
This endpoint initiates the scheduled migration, which will shut the Linode
down, migrate it, and then bring it back to its original state.
Initiate a pending host migration that has been scheduled by Linode or
initiate a cross data center (DC) migration. A list of pending migrations,
if any, can be accessed from [GET /account/notifications](/api/v4/account-notifications).
When the migration begins, your Linode will be shutdown if not already off.
If the migration initiated the shutdown, it will reboot the Linode when completed.


To initiate a cross DC migration, you must pass a `region` parameter to the
request body specifying the target data center region.
You can view a list of all available regions and their feature capabilities
from [GET /regions](/api/v4/regions). If your Linode has a pending migration already queued,
leslitagordita marked this conversation as resolved.
Show resolved Hide resolved
you will not be able to initiate a DC migration until it has completed.


**Note:** Next Generation Network (NGN) data centers do not support IPv6 `/116` pools or IP Failover.
If you have these features enabled on your Linode and attempt to migrate to an NGN data center,
Copy link
Collaborator

Choose a reason for hiding this comment

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

@alsaihn can you confirm this? I thought we just wouldn't persist the IPv6 pool and IP failover, not that we would prevent the migration from happening. I did a quick check in the code and didn't see anything that would fail the migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yoshizzle I found that information in this related KB post. I also checked w/ Sal, but more verification makes sense. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

There's a ticket for that exact behavior in our backlog, so the comment as listed here is accurate for now. It will have to change later though.

the migration will not initiate. NGN data centers include Toronto and Mumbai.
tags:
- Linode Instances
operationId: migrateLinodeInstance
Expand All @@ -4969,6 +4981,8 @@ paths:
by using the [GET /regions](/api/v4/regions) endpoint.
A cross-region migration will cancel a pending migration
that has not yet been initiated.

A cross-region migration will initiate a `linode_migrate_datacenter_create` event.
leslitagordita marked this conversation as resolved.
Show resolved Hide resolved
example: us-east
responses:
'200':
Expand All @@ -4979,6 +4993,18 @@ paths:
type: object
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"region": "us-central"
}' \
https://api.linode.com/v4/linode/instances/123/migrate
- lang: CLI
source: >
linode-cli linodes migrate 123 --region us-central
/linode/instances/{linodeId}/mutate:
parameters:
- name: linodeId
Expand Down