linode-cli icon indicating copy to clipboard operation
linode-cli copied to clipboard

Cloning onto existing Linode gives error

Open emilv opened this issue 7 years ago • 6 comments

Command run:

$ linode-cli linodes clone 10692855 --linode_id 10894671
Request failed: 400
┌errors──┬──────────────────────────────────────────────┐
│ field  │ reason                                       │
├────────┼──────────────────────────────────────────────┤
│ type   │ A valid Linode type by that ID was not found │
│ region │ region is not valid                          │
└────────┴──────────────────────────────────────────────┘

emilv avatar Oct 16 '18 09:10 emilv

Again, try adding a --no-defaults to the end of your CLI command.

Do you mind posting the contents of your ~/.linode-cli file using a command like this?

cat ~/.linode-cli | grep -v token

That should remove the tokens from the file before outputting it, but please double check. I'm most interested in what your config's region, type, and image are set to in the "DEFAULT" section.

Dorthu avatar Oct 16 '18 11:10 Dorthu

I skipped setting any defaults during configure so here is my file:

$ cat .linode-cli | grep -v token
[DEFAULT]
region =
type =
image =

[pixelstore2]
region =
type =
image =

emilv avatar Oct 16 '18 11:10 emilv

Now I get this error instead:

$ linode-cli linodes clone 10692855 --linode_id 10894892 --no-defaults
Request failed: 400
┌errors───────────┬───────────────────────────────────────────────────────────────────┐
│ field           │ reason                                                            │
├─────────────────┼───────────────────────────────────────────────────────────────────┤
│ backups_enabled │ backups_enabled can only be provided when cloning to a new Linode │
└─────────────────┴───────────────────────────────────────────────────────────────────┘

emilv avatar Oct 16 '18 11:10 emilv

🤔 that has the potential to be an API bug. What does this output?

linode-cli account settings --format backups_enabled

I'm going to make a ticket in our internal bug tracker for this, and I'll update it when I hear back from you.

Dorthu avatar Oct 16 '18 11:10 Dorthu

$ linode-cli account settings --format backups_enabled
┌─────────────────┐
│ backups_enabled │
├─────────────────┤
│ True            │
└─────────────────┘

I appreciate it. This is a useful tool for us!

emilv avatar Oct 16 '18 11:10 emilv

Thank you, that's what I expected. I've updated our internal ticket for this, and based on our release schedule I would expect this to be fixed by Monday afternoon. In the meantime, you can temporarily disable this setting to get the clone to work:

linode-cli account settings-update --backups_enabled no

Running the same command with a "yes" at the end will turn it back on after the fact. Sorry for the inconvenience.

Dorthu avatar Oct 16 '18 11:10 Dorthu

Closing as this issue seems to be resolved in my testing. Feel free to @ me if this issue is still occurring.

lgarber-akamai avatar Nov 28 '22 18:11 lgarber-akamai