Skip to content
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

rhv: removed the option to migrate the VMs outside of the cluster. #84

Closed

Conversation

jelkosz
Copy link
Contributor

@jelkosz jelkosz commented Jan 6, 2017

The support for cross cluster migrations was added to oVirt only as a
workaround for el6->el7 migrations but should not be exposed. Since the current
code in manageiq anyway did not work properly, removing the support for it
completely - it is a low level functionality, it is obsoleted and discouraged
to be used.

Links
https://bugzilla.redhat.com/show_bug.cgi?id=1398287

The support for cross cluster migrations was added to oVirt only as a
workaround for el6->el7 migrations but should not be exposed. Since the current
code in manageiq anyway did not work properly, removing the support for it
completely - it is a low level functionality, it is obsoleted and discouraged
to be used.

Links
https://bugzilla.redhat.com/show_bug.cgi?id=1398287
@miq-bot
Copy link
Member

miq-bot commented Jan 6, 2017

Checked commit jelkosz@5c87f1d with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
2 files checked, 1 offense detected

**

  • 💣 💥 🔥 🚒 - Linter/Haml - missing config files

@jelkosz
Copy link
Contributor Author

jelkosz commented Jan 6, 2017

@miq-bot assign @borod108

@jelkosz
Copy link
Contributor Author

jelkosz commented Jan 6, 2017

The fronted part. The backend part is ManageIQ/manageiq#13077

@miq-bot
Copy link
Member

miq-bot commented Jan 6, 2017

@jelkosz @borod108 is an invalid assignee, ignoring...

@jelkosz
Copy link
Contributor Author

jelkosz commented Jan 6, 2017

@borod108 Hi, not sure why the assign did not work, but could you please have a look at this? It is the same patch you have already reviewed but had to be split after the repo split.
Also, your comments have been addressed.

Copy link

@borod108 borod108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to say that "typ" variable and writing "migrate" == typ instead of type == "migrate" is making me uncomfortable but its is only a matter of style and I do not have any right to insist on that :) I think its good to go.
Only thing is there is a weird rubocop comment, I think its probably a false positive, but I would check everything works on the UI side before merging just in case...

@oourfali
Copy link

@miq-bot assign @durandom

@miq-bot
Copy link
Member

miq-bot commented Jan 17, 2017

@oourfali @durandom is an invalid assignee, ignoring...

@@ -1797,6 +1797,15 @@ def task_supported?(typ)
end

vms = VmOrTemplate.where(:id => vm_ids)
if "migrate" == typ
if vms.map(&:ext_management_system).uniq.compact.any? do |ems|
ems.respond_to?("supports_#{typ}_for_all?") && !ems.send("supports_#{typ}_for_all?", vms)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just remove the string interpolation here, which would make it easier to read too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see my comment on the other PR ManageIQ/manageiq#13077 (comment)

So, not sure about this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please don't do that. No more magical send with string interpolation, and especially not when you know the type is migrate :).

@durandom
Copy link
Member

@borod108

I have to say that "typ" variable and writing "migrate" == typ instead of type == "migrate" is making me uncomfortable but its is only a matter of style and I do not have any right to insist on that :) I think its good to go.

https://en.wikipedia.org/wiki/Yoda_conditions

But I feel you pain :)

Copy link
Member

@durandom durandom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@himdel who might review this from a UI side?

:dialog => dialog,
:label => title_for_cluster,
:keys => keys})
- if wf.field_supported(:cluster)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this set somewhere? I dont see it in this PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@durandom what are you referring to?

@@ -1797,6 +1797,15 @@ def task_supported?(typ)
end

vms = VmOrTemplate.where(:id => vm_ids)
if "migrate" == typ
if vms.map(&:ext_management_system).uniq.compact.any? do |ems|
ems.respond_to?("supports_#{typ}_for_all?") && !ems.send("supports_#{typ}_for_all?", vms)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see my comment on the other PR ManageIQ/manageiq#13077 (comment)

So, not sure about this.

@@ -1797,6 +1797,15 @@ def task_supported?(typ)
end

vms = VmOrTemplate.where(:id => vm_ids)
if "migrate" == typ
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Yoda conditions please :) How we do things this is not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done by #207

@matobet
Copy link
Contributor

matobet commented Jan 20, 2017

In @jelkosz's absence I tried to adress your review comments at with #207. @himdel @durandom @borod108 please feel free to continue the review there.

@himdel himdel self-assigned this Jan 23, 2017
@himdel
Copy link
Contributor

himdel commented Jan 24, 2017

Replaced by #207, closing.

@himdel himdel closed this Jan 24, 2017
@jelkosz jelkosz deleted the disallow_migrating_out_of_cluster branch January 24, 2017 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants