-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Emit stopping/starting events when "salt-cloud -a stop/start" is used. #44400
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
Emit stopping/starting events when "salt-cloud -a stop/start" is used. #44400
Conversation
|
PR against develop as requested in #44375 |
cachedout
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a new event? If so, does it need to be added to other providers other than just EC2?
|
Good question - only about half of drivers have stop/start methods in them and I am actually planning to add support to one more (softlayer and maybe softlayer_hw). But yes, it would make sense to add these to those that already support stop/start and of course document them. I can do that - though I can't test majority of them. Before I go copy/pasting the same thing into 20 files - any idea why there isn't a helper function to emit all cloud events, since they are all structured very similarly? |
|
Thanks @vitaliyf! All salt events are fired like this, whether they are cloud, master, or minion events. Obviously, there is some cloud-specific tags in there, but the general structure & idea is the same. Copying and pasting that information into each of the start & stop functions is the way to go in this case. I would add the new start and stop functions for the softlayer/softlayer_hw drivers in a new PR. That way it can be reviewed separately from adding these new cloud events. I think in addition to documenting these events as I mentioned above, it would also be prudent to make a note of these new events in the cloud section of the Oxygen release notes. |
|
Hi @vitaliyf - Just checking in here. Did you have a chance to come around to this PR? |
|
Hi @vitaliyf - Just a bump on this to see if you had a chance to come back around. |
|
Yes, I'll try to get some time this week and add events to all stop/start functions that exist. |
|
Hey @vitaliyf - Just checking in here. Were you ever able to come back to this? |
|
After further consideration, we don't need to wait on adding this to all cloud drivers. Let's get this in and future events can be added later. Thanks for this @vitaliyf! |
What does this PR do?
salt-cloud emits numerous events when instances are created, configured and destroyed, but not when they are stopped or started.
New events were added using code from "destroy" method, so they follow the same naming pattern and have same attributes.
What issues does this PR fix or reference?
Previous Behavior
No events are fired when stop/start is used.
New Behavior
New events will be seen on the event bus, for example:
Tests written?
No
Commits signed with GPG?
Yes