chef-boneyard / knife-linode

DEPRECATED: Chef knife plug-in for Linode
Apache License 2.0
78 stars 27 forks source link

Knife just created a bunch of Linodes that failed to work, and I got charged for it #14

Closed tubbo closed 11 years ago

tubbo commented 12 years ago

I was experimenting with knife-linode over the weekend to learn more about Hosted Chef, since I had a bunch of free credit on my Linode account after attending some conferences. I tried and failed to create a server using knife linode create 'role[mothership]' a bunch of times, and I was shocked to discover that Knife actually did place an order for a new box each time. I discovered this because I now have about ~$90 in charges on my Linode bill.

I would reproduce the bug for you guys and show an exact log, but I honestly don't want my Linode account charged anymore. I received a Fog::Compute::Linode::Error exception that basically said something along the lines of "license key doesn't start/end with alphanumeric characters". Except it definitely does. So somehow, Knife placed a bunch of orders on my Linode account but it still raised an exception that I didn't have a proper license key. This is when I had the license key stored in knife[:linode_api_key] in knife.rb, as well as when I passed the --license-key in directly through the command line.

ghost commented 12 years ago

If you remove the servers, you should get credit on your linode account. Unfortunately the way linode bills is by charging you up front for a months worth of compute, and then they refund you when you release the server. I like linode because they're cheap and featureful, but they're not good for elastic billing.

I looked into our code and I don't see anywhere in knife-linode where we do any kind of validation on the linode api key. I tried looking through fog as well, and can't find where that validation is happening there either. Unless I can get a bit more information back it looks like the error was caused by linode's server.create API call returning a validation error and then still spinning up a linode instance. I would hope you could contact them and get a refund since the error seems to be on their side.

And if you can get them to look at the logs and tell you what is happening on the API it might be useful to be able to work around this problem, although if I'm understanding it correctly I don't think there is much that we can do on our end. If the linode.create API call fails we can't get back the server id from the fog API, even if the linode API returned it correctly, so we can't try tactics of deleting a sever after an exception is thrown, or checking for the server id and warning that it got created.

Its possibly still that we're using the API wrong or fog is using the API wrong, but from your description of the problem -- that you tried to use a valid API key and that it was rejected because it failed a validation check at the linode API, yet the server was created by the linode API anyway -- that sounds like a linode bug. And at this point, without details, there's nothing to do but talk to linode to get the logs of your sessions.

Sorry I can't be more helpful than that.

On 8/20/12 6:02 AM, Tom Scott wrote:

I was experimenting with knife-linode over the weekend to learn more about Hosted Chef, since I had a bunch of free credit on my Linode account after attending some conferences. I tried and failed to create a server using |knife linode create 'role[mothership]'| a bunch of times, and I was shocked to discover that Knife actually /did/ place an order for a new box each time. I discovered this because I now have about ~$90 in charges on my Linode bill.

I would reproduce the bug for you guys and show an exact log, but I honestly don't want my Linode account charged anymore. I received a |Fog::Compute::Linode::Error| exception that basically said something along the lines of "license key doesn't start/end with alphanumeric characters". Except it definitely does. So somehow, Knife placed a bunch of orders on my Linode account but it still raised an exception that I didn't have a proper license key. This is when I had the license key stored in |knife[:linode_api_key]| in knife.rb, as well as when I passed the |--license-key| in directly through the command line.

— Reply to this email directly or view it on GitHub https://github.com/opscode/knife-linode/issues/14.

stevendanna commented 12 years ago

@tubbo Once again, our apologies for the inconvenience this caused you. Based on Lamont's response it looks like this bug is likely in Fog or with the linode API itself.

gnoll110 commented 11 years ago

It a bug is Linode's processing. They bill too early in the unit of work, before it knows weather the actual transacting will fail or not. They do a roll back (that create a count transaction). BUT they bill you a whole day, for the part day between the two transactions.

I raise a support request with Linode, got the few dollars taken off my next bill. They said they are look at the issue.

I've issued this credit at this time. We are actively working on revamping our billing system and hope to move it into production soon. When this happens we will have an update on our blog. Keep an eye out!
sethvargo commented 11 years ago

Hey @tubbo. Unfortunately we no longer use GitHub issues to track issues on the knife-plugins. Could you please create a ticket in JIRA at https://tickets.opscode.com if this is still an issue? The Project is "Knife Plugins" and the Component is "knife-linode". Sorry about that :smile: