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

Memory checkbox will not show when VM is not up #12678

Merged
merged 1 commit into from Dec 8, 2016

Conversation

borod108
Copy link

@borod108 borod108 commented Nov 16, 2016

When a VM is powered off there should not be a "save memory" checkbox:
memory box 1

When a VM is powered off there should be a "save memory" checkbox:
memory box 2

When creating a snapshot there is not reason to show
the option to save run time memory if the VM is down.

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

@borod108
Copy link
Author

@masayag please review

Copy link
Contributor

@masayag masayag left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@borod108
Copy link
Author

@miq-bot assign @durandom

@durandom
Copy link
Member

👍 from the prvoiders side

@martinpovolny can you check the UI part and merge if ok?
@miq-bot assign @martinpovolny
@miq-bot add_label ui, providers/rhevm

@durandom
Copy link
Member

@borod108 please resolve the confilict

@miq-bot
Copy link
Member

miq-bot commented Nov 17, 2016

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

When creating a snapshot there is not reason to show
the option to save runtime memory if the VM is down.

https://bugzilla.redhat.com/show_bug.cgi?id=1375850
@borod108
Copy link
Author

@durandom conflict resolved

@borod108
Copy link
Author

@miq-bot
Copy link
Member

miq-bot commented Nov 21, 2016

Checked commit borod108@de813a1 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
3 files checked, 0 offenses detected
Everything looks good. ⭐

@borod108 borod108 closed this Nov 21, 2016
@borod108 borod108 reopened this Nov 21, 2016
@borod108
Copy link
Author

@durandom again had a strange CI error https://travis-ci.org/ManageIQ/manageiq/jobs/177665079#L693
which I did not get locally. Closed and reopened to re-run.

@durandom
Copy link
Member

@martinpovolny I'm 👍 please merge if you are ok too

@borod108
Copy link
Author

borod108 commented Nov 29, 2016

@martinpovolny hi, can we merge this?

@durandom
Copy link
Member

durandom commented Dec 1, 2016

@himdel I'm good from the providers side, if you are from the UI, can you merge this?

@himdel
Copy link
Contributor

himdel commented Dec 2, 2016

@borod108 please update the description to include a screenshot and instructions where to find this in the UI.

(Also seems like you left a part of the PR template in the description..)

Not merging before I can test it :) (though it does look good)

@martinpovolny martinpovolny assigned himdel and unassigned martinpovolny Dec 4, 2016
@borod108
Copy link
Author

borod108 commented Dec 6, 2016

@himdel added images is that ok?

@himdel
Copy link
Contributor

himdel commented Dec 6, 2016

@borod108 thanks, I guess I can try finding it by the images. But if you could also add real instructions (go there, click that, ..), would be even better :)

@borod108
Copy link
Author

borod108 commented Dec 6, 2016

@himdel sure you are right. Will this be ok:
Setup: a CFME with RHV (v4.0 or higher) provider that has two vms one powered on and another powered off (or one vm and then power it off/on and refresh)

  1. From the side menu go to Compute -> Infrastructure -> Virtual Machines

  2. In the Vms & Templates choose the provider and select the VM that is powered on.

  3. In the "Properties" section of the summery page click on "Snapshots"

  4. In the "Snaphots" screen of the VM click the "Create a new snapshot for this VM" (a circle with a plus sign in it at the top toolbar)

  5. a. The "Adding a new Snapshot" screen should have a checkbox with the label "Snapshot VM memory"
    Repeat step 1-4 with the snapshot that is powered off.
    b. The "Adding a new Snapshot" screen should not have a checkbox with the label "Snapshot VM memory"

@himdel
Copy link
Contributor

himdel commented Dec 7, 2016

@borod108 thanks, that really helps! :)

So .. the only question that remains is this..

  • "Snapshots" in summary page are only clickable if @record.supports_snapshosts?
  • supports_snapshots? is false for vm_or_template, and overridden only for openstack cloud & vmware infra
  • the "Snapshot VM memory" checkbox is disabled only when @record.snapshotting_memoery_allowed? is false .. which can happen only for redhat infra VMs
  • so .. as the code is, this PR can't possibly affect anything, can it?

@durandom
Copy link
Member

durandom commented Dec 7, 2016

@himdel

supports_snapshots? is false for vm_or_template, and overridden only for openstack cloud & vmware infra

it's actually only true for rhev?!

❯ g --no-pager grep 'supports :snapshots'
app/models/manageiq/providers/redhat/infra_manager/vm/operations/snapshot.rb:    supports :snapshots do

Could it be, you grepped for something else?

@borod108
Copy link
Author

borod108 commented Dec 7, 2016

@himdel as @durandom wrote it is overridden for rhv to just using the supports_feature_mixin.
So this code effects rhv provider.

@himdel
Copy link
Contributor

himdel commented Dec 7, 2016

@durandom, @borod108 OK, thanks, I'll check further. I was grepping for the supports_snapshots? method.

But seems like we shouldn't both be defininng the method, overriding it, and creating it via supports at the same time..

Either way, I don't have any RHEV VM that'd have the button (snapshots in the summary) clickable..

@durandom
Copy link
Member

durandom commented Dec 7, 2016

Oh, @himdel you are absolutely right. This slipped my review on #11418
We should asap refactor supports_snapshot? to use the SupportsFeatureMixin
@gauravaradhye can you do this?

@himdel can you merge this as is or do you want to test it out with a VM?

@himdel himdel merged commit d05b5f2 into ManageIQ:master Dec 8, 2016
@himdel himdel added this to the Sprint 51 Ending Jan 2, 2017 milestone Dec 8, 2016
@himdel
Copy link
Contributor

himdel commented Dec 8, 2016

@durandom Sure, merged, as long as it can happen.. :)

@himdel himdel added euwe/no and removed euwe/no labels Dec 8, 2016
simaishi pushed a commit that referenced this pull request Jan 9, 2017
@simaishi
Copy link
Contributor

simaishi commented Jan 9, 2017

Euwe backport details:

$ git log -1
commit 3bfba1edcdbd999482b383b406d9a394935c1866
Author: Martin Hradil <himdel@seznam.cz>
Date:   Thu Dec 8 06:35:27 2016 -0500

    Merge pull request #12678 from borod108/bugs/1375850memory_checkbox
    
    Memory checkbox will not show when VM is not up
    (cherry picked from commit d05b5f28253b6bf2a8c5d78e829d48092035fe7f)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1403981

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