Bug 1777664

Summary: The measurement for "--wait $time" should be "seconds" instead of "minutes"
Product: Red Hat Enterprise Linux 8 Reporter: zhoujunqin <juzhou>
Component: virt-managerAssignee: Pavel Hrdina <phrdina>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: crobinso, jsuchane, kanderso, mxie, phrdina, tzheng, xiaodwan, zili
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-2.2.1-4.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:47:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhoujunqin 2019-11-28 02:26:10 UTC
Description of problem:
The measurement  for "--wait $time" should be "seconds" instead of "minutes".
When I set "--wait 1" , it means waiting 1 minute(or 60 seconds) for installation to complete, but it shows "Waiting 60 minutes" in virt-install log.

Version-Release number of selected component (if applicable):
libvirt-4.5.0-36.module+el8.2.0+4817+92ef2d83.x86_64
qemu-kvm-2.12.0-90.module+el8.2.0+4652+138f0dc3.x86_64
virt-manager-2.2.1-2.el8.noarch
virt-install-2.2.1-2.el8.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install a vm with option "--wait 1" 
# virt-install --memory 2048 --disk /var/lib/libvirt/images/vnc.qcow2  --import --wait 1 
Using default --name vm1
WARNING  No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.

Starting install...
...
Domain installation still in progress.
Waiting 60 minutes for installation to complete.

Actual results:
As described.

Expected results:
Fix it.

Additional info:
a. Install a vm with option "--wait 2" 
# virt-install --memory 2048 --disk /var/lib/libvirt/images/vnc.qcow2  --import --wait 2
Using default --name vm1
WARNING  No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.

...
Domain installation still in progress.
Waiting 120 minutes for installation to complete.
Installation has exceeded specified time limit. Exiting application.

b.
Fixed by 414ffa5ef82548d502a4de98d40228a68bdb29c1 in upstream.

Comment 4 Pavel Hrdina 2020-08-13 14:19:29 UTC
Upstream commit:

commit 414ffa5ef82548d502a4de98d40228a68bdb29c1
Author: Fabiano FidĂȘncio <fidencio>
Date:   Thu Jul 25 14:09:53 2019 +0200

    virt-install: Use minutes instead of seconds on get_time_string()

Comment 15 zhoujunqin 2020-11-24 09:23:37 UTC
I can reproduce this issue with package:
virt-install-2.2.1-3.el8.noarch
virt-manager-common-2.2.1-3.el8.noarch


Steps:
# virt-install --memory 2048 --disk  /var/lib/libvirt/images/rhel8.3-av.qcow2  --import --wait 2 
Using default --name vm1
WARNING  No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.

Starting install...
Gtk-Message: 03:35:42.811: Failed to load module "pk-gtk-module"
Gtk-Message: 03:35:42.895: Failed to load module "pk-gtk-module"
Domain installation still in progress.
Waiting 120 minutes for installation to complete.

(virt-viewer:14795): GSpice-WARNING **: 03:36:08.801: PulseAudio context failed Connection refused

(virt-viewer:14795): GSpice-WARNING **: 03:36:08.801: pa_context_connect() failed: Connection refused

(virt-viewer:14795): GSpice-WARNING **: 03:36:08.932: Warning no automount-inhibiting implementation available
Installation has exceeded specified time limit. Exiting application.


Then try to verify this bug with new build:
virt-manager-common-2.2.1-4.el8.noarch
virt-install-2.2.1-4.el8.noarch
libvirt-6.0.0-30.module+el8.4.0+8705+34397d87.x86_64
qemu-kvm-4.2.0-37.module+el8.4.0+8837+c89bcfe6.x86_64
kernel-4.18.0-249.el8.x86_64


Steps:

1. Install a vm with "--wait 1"

# virt-install --memory 2048 --disk  /var/lib/libvirt/images/rhel8.3-av.qcow2  --import --wait 1
Using default --name vm1
WARNING  No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.

Starting install...
Gtk-Message: 03:50:00.448: Failed to load module "pk-gtk-module"
Gtk-Message: 03:50:00.466: Failed to load module "pk-gtk-module"
Domain installation still in progress.
Waiting 1 minutes for installation to complete.

...
Installation has exceeded specified time limit. Exiting application.


2. Install a vm with "--wait 2"

# virt-install --memory 2048 --disk  /var/lib/libvirt/images/rhel8.3-av.qcow2  --import --wait 2 
Using default --name vm1
WARNING  No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.

Starting install...
Gtk-Message: 03:46:48.307: Failed to load module "pk-gtk-module"
Gtk-Message: 03:46:48.325: Failed to load module "pk-gtk-module"
Domain installation still in progress.
Waiting 2 minutes for installation to complete.
...
Installation has exceeded specified time limit. Exiting application.


Test result: virt-install has used minutes instead of seconds on get_time_string.

But one question here, usually we use "1 minute", and "2 minutes" when we count more than 1, will you do a fix for the grammar issue, thanks.

Comment 16 Pavel Hrdina 2020-11-24 13:16:53 UTC
This can be possible fixed in upstream but it's definitely not something we would need to fix in RHEL. It's a cosmetic detail that for 1 minute the messages says "1 minutes".

Comment 17 zhoujunqin 2020-11-26 08:10:29 UTC
(In reply to Pavel Hrdina from comment #16)
> This can be possible fixed in upstream but it's definitely not something we
> would need to fix in RHEL. It's a cosmetic detail that for 1 minute the
> messages says "1 minutes".

Thanks for your response, Pavel.
I submit one issue in upstream - https://github.com/virt-manager/virt-manager/issues/196.

And I move this bug from ON_QA status to VERIFIED status since the bug issue has been fixed, thanks.

Comment 19 errata-xmlrpc 2021-05-18 15:47:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virt-manager bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1843