-
Notifications
You must be signed in to change notification settings - Fork 107
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
handle volume snapshot status changes #439
Conversation
7ded5d6
to
3526b0e
Compare
@Ladas please review |
@@ -17,7 +17,7 @@ class ManageIQ::Providers::Amazon::CloudManager < ManageIQ::Providers::CloudMana | |||
require_nested :Template | |||
require_nested :Vm | |||
|
|||
OrchestrationTemplate.register_eligible_manager(self) | |||
self::OrchestrationTemplate.register_eligible_manager(self) |
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.
why is this change needed?
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.
There was an issue, probably related to the rails dev env lazy code loading.
Rails was looking at the top level constant first, and there is no such method.
However, I forgot how to reproduce it now, so, reverting.
@@ -61,6 +61,14 @@ def self.create_snapshot(cloud_volume, options = {}) | |||
|
|||
def raw_delete_snapshot | |||
with_provider_object(&:delete) | |||
update!(:status => 'deleting') | |||
EmsRefresh.queue_refresh_task( |
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.
so, there is no event for deletion?
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.
yep
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.
@agrare is this ok? If the event is missing, I think we do not have much choice. (except full refresh)
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.
Can we do a targeted refresh of the vm the cloud_volume is connected to? Not sure what amazon supports here for targets.
Also are you using the task that is returned? Can you just use EmsRefresh.queue_refresh
?
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.
it's a volume snapshot, so Vm is only optional (volume doesn't have to be attached to anything)
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.
Okay sounds like a full is the only way to go then.
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.
And why not to just refresh the snapshot like it is now?
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.
Oh we can target the snapshot? If we can do a targeted definitely lets do that.
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.
@agrare fixing queue_refresh
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.
done
0c07ecd
to
e4681d3
Compare
e4681d3
to
64304bd
Compare
64304bd
to
b2a1a4b
Compare
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.
Looks great 👍
Checked commits AlexanderZagaynov/manageiq-providers-amazon@3183efa~...b2a1a4b with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1561937
Related: ManageIQ/manageiq-content#285
Note:
AWS CloudWatch should send specific events.
To setup, one should create CloudWatch rule and target it to the
AWSConfig_topic
SNS topic.This rule's event pattern should be:
More info: https://aws.amazon.com/ru/blogs/aws/new-cloudwatch-events-for-ebs-snapshots