You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Snapshots that are of a market place image, such as Centos, have a product code.
AWS won't allow the volumes to be attached to the instance, unless the instance is stopped.
I suggest, have the script changed a bit, so it:
Creates an instance per volume
Stops the instance, and attaches the volume
Starts the instance
SSH to the instance which mounts the volume, does the tar and copy to s3
Terminate the temporary instance
Destroy snap volume, etc.
One could go to the extreme of:
Create all the volumes for target snapshots at once. Wait for volumes to be available
Create an instance per volume, with the volume attached, and user data set, so it mounts, tars it up and copies it to s3 etc. Report back to the script success, etc via sqs. All of these run at the same time.
Destroy instances and snapshots.
The above would make this script work for large numbers of snapshots.
Error:
[snap-786aa206] Migrating snap-786aa206 to S3
[snap-786aa206] Tagging snapshot with "migrating"...
[snap-786aa206] Creating temporary EBS volume of type "standard" from snapshot
[snap-786aa206] Attaching vol-04de464a5f5ab334f to this instance (i-0143d3abc47eb48d9) at /dev/sdl...
[snap-786aa206] An error occurred, tagging snapshot with "migrate" so it can be retried later
[snap-786aa206] { Error: snap-786aa206: IncorrectInstanceState: Cannot attach volume 'vol-04de464a5f5ab334f' with Marketplace codes as the instance 'i-0143d3abc47eb48d9' is not in the 'stopped' state.
at SnapshotMigrationError (/usr/lib/node_modules/snap-to-s3/lib/snap-to-s3.js:1948:3)
at _raceToMarkSnapshot.then.then (/usr/lib/node_modules/snap-to-s3/lib/snap-to-s3.js:1682:12)
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
error:
{ IncorrectInstanceState: Cannot attach volume 'vol-04de464a5f5ab334f' with Marketplace codes as the instance 'i-0143d3abc47eb48d9' is not in the 'stopped' state.
at Request.extractError (/usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/services/ec2.js:50:35)
at Request.callListeners (/usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/usr/lib/node_modules/snap-to-s3/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
message: 'Cannot attach volume \'vol-04de464a5f5ab334f\' with Marketplace codes as the instance \'i-0143d3abc47eb48d9\' is not in the \'stopped\' state.',
code: 'IncorrectInstanceState',
time: 2019-07-12T23:44:29.034Z,
requestId: '9523bec0-b2f2-4e82-acf6-ff3f3303c8c9',
statusCode: 400,
retryable: false,
retryDelay: 99.12345406671746 },
snapshotID: 'snap-786aa206' }
Terminating due to fatal errors.
The text was updated successfully, but these errors were encountered:
That sounds like a really great project, but unfortunately I don't have a usecase for it myself, so I won't be working on this. Pull requests welcome though!
Support market place codes on snapshots.
Snapshots that are of a market place image, such as Centos, have a product code.
AWS won't allow the volumes to be attached to the instance, unless the instance is stopped.
I suggest, have the script changed a bit, so it:
One could go to the extreme of:
The above would make this script work for large numbers of snapshots.
Error:
The text was updated successfully, but these errors were encountered: