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
Catch provider errors in salt cloud #14612
Comments
This happens all over inside salt-cloud |
K. Good to know. I'll clean it up. Thanks @UtahDave! |
👍 |
I'd like to add that when you are running salt-cloud with a map file, tons of these exceptions cause the entire script to abort. If you are running in parallel mode, it bails out on installing salt on any machines that were being spun up, and you end up with nodes that have booted up, and no way of knowing which of them have salt installed (other than re-running your map, comparing the list of running nodes to the list of nodes that respond to a test.ping). In fact, there are tons of reasons why salt-cloud will boot a minion, but the salt install will fail, and it would be really nice if there were a way to easily get that list. As it stands, I have to go manually run the list through something like excel, and manually delete and then re-run my map file. It's either that or manually install salt on those boxes. A more elegant solution would be VERY welcome. |
@luciddr34m3r Excellent feedback. Would you mind taking that second point regarding the inability to see failed bootstraps and turning it into a separate GitHub issue? I think it's different enough from the original problem that we should tackle them independently. Thanks! |
@cachedout Done. #14659 |
@luciddr34m3r Thanks! |
Just to point out we are having similar issues with libcloud and linode, not libcloud per se, more linode. We have poked linode to try and get them to make their label and name for linodes to be RFC 1034/1035/2181 complaint in terms of what a hostname can be (1 to 63 chars). Programmatically bifurcating too match linodes notion of label/name in relation to what it is, a hostname has proved painful a number of times. We bump into it now and again. Perhaps if saltstack and libcloud communities made a shout out to linode, maybe linode would move on this. |
Good Evening, At this time we are currently in the process of reviewing what changes are required in order to specifically support this functionality on our platform. While we cannot currently provide an answer at this time, we are aware of this issue, and are actively looking to rectify this. While greater support from saltstack, and libcloud would strengthen the case for this mitigation, at this time it would be un-needed as we are already seeking to quash this in the coming weeks. Penny |
Ran into this again today. There's also an icky side effect when it fails like this, there's a "Brand New" linode left in your account cause the rename is what failed, not the creation. Should Salt Cloud try and cleanup instances which haven't successfully built? |
Deleting nodes, by default, that have just been created seems like a bad default behavior to me. But I would not be opposed to allowing an option, if you can think of a good way to do it. |
This particular stacktrace is now being caught for both the Libcloud:
Linode-Python:
However, when this driver was rewritten in 2015.8 to use the Linode API directly, the API doesn't appear to throw an exception if the label doesn't match Linode's label specs. The create function continues until completion. The side-effect of this is similar to the one described above: A Linode is created with a linode id such as |
I have fixed this bug by implementing a check to Here's a sample output of an invalid name:
Where no extraneous linodes were created. See #26709 for more information. |
Catch and format in a friendlier way.
The text was updated successfully, but these errors were encountered: