batrick / ceph-linode

Launch Ceph using the Linode VPS provider
GNU General Public License v3.0
13 stars 10 forks source link

linode-launch.py fails - unable to create linodes #26

Closed tserlin closed 6 years ago

tserlin commented 6 years ago

I'm unable to create linodes when running the following command:

# LINODE_API_KEY=<snip> python ceph-linode/linode-launch.py
...
2018-05-21 18:50:57,867 ERROR list index out of range
Traceback (most recent call last):
  File "ceph-linode/linode-launch.py", line 136, in create
    do_create(*args, **kwargs)
  File "ceph-linode/linode-launch.py", line 54, in do_create
    plan = filter(lambda p: p[u'LABEL'].lower().find(str(machine['plan']).lower()) >= 0, plans)[0]
IndexError: list index out of range

This same command worked about 2 months ago.

Note: I'm running this command from another linode, on CentOS 7.

tserlin commented 6 years ago

Based on this https://www.linode.com/api/utility/avail.linodeplans , Linode plan labels used to be in the form of "Linode 1024", "Linode 2048", etc.

When I query the API right now, I get "Nanode 1GB", "Linode 2GB", etc.

tserlin commented 6 years ago

OK, this works...

Just modify the cluster.json file so that you have lines for the linode plans like:

"plan": 2,
"plan": 1,

So, "1" for 1GB plan, "2" for 2GB plan, and so on.

batrick commented 6 years ago

Well that's aggravating.@tserlin, mind submitting a PR that changes the sample cluster.json?

tserlin commented 6 years ago

@batrick

Here you go: https://github.com/batrick/ceph-linode/pull/27