Bug 1437512 - when rng device is attached, suspend and hibernate fails
Summary: when rng device is attached, suspend and hibernate fails
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.2.0
Hardware: x86_64
OS: Unspecified
medium
high
Target Milestone: ovirt-4.2.0
: ---
Assignee: Arik
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On: 1496475 1505336
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-30 12:59 UTC by Shira Maximov
Modified: 2017-11-22 23:20 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Previously, suspension and hibernation (S3 and S4) were enabled on the guest operating system although not supported in RHV. Now, they are disabled.
Clone Of:
Environment:
Last Closed: 2017-11-16 18:37:11 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+
ahadas: devel_ack+


Attachments (Terms of Use)
/var/log/messages (2.86 MB, text/plain)
2017-03-30 12:59 UTC, Shira Maximov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 80969 0 master MERGED core: disable s3/s4 2017-08-29 10:32:24 UTC

Description Shira Maximov 2017-03-30 12:59:10 UTC
Created attachment 1267524 [details]
/var/log/messages

Description of problem:
when Random Generator enabled, The actions suspend and hibernate fails.

Version-Release number of selected component (if applicable):
Red Hat Virtualization Manager Version: 4.1.1.5-0.1.el7


How reproducible:
100%

Steps to Reproduce:
1. enable  Random Generator on VM
2. run : systemctl suspend /  systemctl hibernate
3.

Actual results:
actions fails.

Expected results:


Additional info:

Comment 1 Tomas Jelinek 2017-03-31 06:25:17 UTC
well, it is not the best idea to do suspend from inside of the VM, we have our own infra for doing it - e.g. the "moon" icon in ui.

But anyway, just tried using centos 7 VM with kernel 3.10.0-327 and it worked when I had the /dev/urandom enabled.

So, some questions:
- if you suspend it using the moon icon from webadmin, does it work?
- what is installed on the VM? OS/Kernel?
- what was the configuration of the random source you used?

Comment 2 Michal Skrivanek 2017-03-31 08:32:50 UTC
we should use
<pm>
  <suspend-to-disk enabled='no'/>
  <suspend-to-mem enabled='no'/>
</pm>

to not advertise S3/S4 as they are not really supported and there are numerous obscure bugs - that's the reason we use migration to file exclusively.
I suppose it won't help with the guest still seeing S0(freeze)...worth testing, but as of now we do not have a way how to wake up from that.

Comment 3 Yaniv Kaul 2017-04-02 10:52:29 UTC
(In reply to Michal Skrivanek from comment #2)
> we should use
> <pm>
>   <suspend-to-disk enabled='no'/>
>   <suspend-to-mem enabled='no'/>
> </pm>
> 
> to not advertise S3/S4 as they are not really supported and there are
> numerous obscure bugs - that's the reason we use migration to file
> exclusively.
> I suppose it won't help with the guest still seeing S0(freeze)...worth
> testing, but as of now we do not have a way how to wake up from that.

I actually like S3 before suspend - as it is (the only?) way for the OS to, when it wakes up, again, to do all the clock sync'ing, expire stuff, reconnect, what not. Otherwise, the whole external suspend-resume is quite transparent to the OS - which is not ideal.

Comment 4 Shira Maximov 2017-04-03 11:13:54 UTC
(In reply to Tomas Jelinek from comment #1)
> well, it is not the best idea to do suspend from inside of the VM, we have
> our own infra for doing it - e.g. the "moon" icon in ui.
> 
> But anyway, just tried using centos 7 VM with kernel 3.10.0-327 and it
> worked when I had the /dev/urandom enabled.
> 
> So, some questions:
> - if you suspend it using the moon icon from webadmin, does it work?
> - what is installed on the VM? OS/Kernel?
> - what was the configuration of the random source you used?


1. the suspend from the webadmin works
2. Red Hat Enterprise Linux Server release 7.3 (Maipo)
   kernel release 3.10.0-514.6.1.el7.x86_64
3. I also used /dev/urandom

Comment 5 Michal Skrivanek 2017-08-22 08:25:36 UTC
can you please add it to vm xml? no need to make it configurable

Comment 6 Michal Skrivanek 2017-08-23 11:37:24 UTC
(In reply to Yaniv Kaul from comment #3)
> I actually like S3 before suspend - as it is (the only?) way for the OS to,
> when it wakes up, again, to do all the clock sync'ing, expire stuff,
> reconnect, what not. Otherwise, the whole external suspend-resume is quite
> transparent to the OS - which is not ideal.

Yeah, but QEMU team decided few years ago that the bugs they have in S3/S4 implementation are not worth fixing and prefer to move away from it

Comment 7 Arik 2017-08-29 07:35:41 UTC
The proposed patch makes use of libvirt API for disabling S3/S4. However, despite the settings being reflected correctly in libvirt (via dumpxml) the S3/S4 are enabled from the OS point of view in our tests with u/s qemu (fedora 25) and fedora 25 as a guest.
The verification of this bug should include:
1. Verifying it on rhel 7.4. S3/S4 is supposed to be disabled even without our fix.
2. Verifying it with u/s qemu with different guests (in order to see if our test failed because of a specification versions combination or is it a bug with u/s qemu).

Comment 8 Nisim Simsolo 2017-10-19 11:14:17 UTC
Although we set VM XML to   
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
The VM still enters into suspend/hibernate mode. The depends on bug I opened on libvirt was closed as NOTABUG (https://bugzilla.redhat.com/show_bug.cgi?id=1496475#c6).

Please advise.

Comment 9 Michal Skrivanek 2017-10-19 11:48:49 UTC
possibly there are options leveraging the guest agent for configuring supported guests not to enable suspend. That would be an RFE though, and not sure if it's really worth pursuing

Comment 10 Michal Skrivanek 2017-11-16 18:37:11 UTC
the bug this depends on got closed, this can't be solved at ovirt-engine level


Note You need to log in before you can comment on or make changes to this bug.