Bug 1046887 - Get wrong cfg_path by using find_grub_cfg() in class Bootloader for uefi boot
Summary: Get wrong cfg_path by using find_grub_cfg() in class Bootloader for uefi boot
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-node
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ovirt-3.6.3
: 3.6.0
Assignee: Ryan Barry
QA Contact: cshao
URL:
Whiteboard:
Keywords: Reopened
Depends On: 1227752
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-27 09:24 UTC by haiyang,dong
Modified: 2016-03-09 14:11 UTC (History)
11 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2016-03-09 14:11:46 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0378 normal SHIPPED_LIVE ovirt-node bug fix and enhancement update for RHEV 3.6 2016-03-09 19:06:36 UTC
oVirt gerrit 26418 None ABANDONED Redo Bootloader.find_grub_cfg() Never
oVirt gerrit 36077 master ABANDONED Split find_grub_cfg EFI changes from iSCSI 2016-02-02 17:38 UTC
oVirt gerrit 53001 master MERGED Bootloader: find grub configs on EFI 2016-02-10 08:43 UTC
oVirt gerrit 53464 ovirt-3.6 MERGED Bootloader: find grub configs on EFI 2016-02-12 13:55 UTC

Description haiyang,dong 2013-12-27 09:24:16 UTC
Description of problem:
[root@dhcp-8-156 admin]# python
Python 2.6.6 (r266:84292, Sep  4 2013, 07:46:00) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ovirt.node.utils.system import Bootloader
>>> cfg_item = Bootloader().Arguments()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/ovirt/node/utils/system.py", line 619, in __init__
  File "/usr/lib/python2.6/site-packages/ovirt/node/utils/system.py", line 629, in __get_arguments
  File "/usr/lib/python2.6/site-packages/ovirt/node/utils/system.py", line 625, in __get_lines
  File "/usr/lib/python2.6/site-packages/ovirt/node/utils/fs.py", line 127, in __iter__
IOError: [Errno 2] No such file or directory: '/dev/.initramfs/live/grub/grub.conf'
>>> 


Version-Release number of selected component (if applicable):
rhevh-6.5-20131220.0.iso
ovirt-node-3.0.1-13.el6_5.noarch

How reproducible:
100%

Steps to Reproduce:


Actual results:

Expected results:

Additional info:

Comment 3 haiyang,dong 2014-10-24 03:04:12 UTC
Test version:
rhev-hypervisor7-7.0-20141006.0.el7ev
ovirt-node-3.1.0-0.20.20141006gitc421e04.el7.noarch.rpm

Due to this bug, <Set Console Path> and Enable SCSI DH_ALUA function of TUI menu will fail in uefi boot machine.
so need set Priority and Severity into "urgent".

Comment 4 Fabian Deutsch 2014-10-30 21:56:18 UTC
The attached patch is very invasive, to risky right now.

A patch with fewer changes will much more likely be accepted.

Comment 5 Fabian Deutsch 2014-12-08 10:33:51 UTC
(In reply to haiyang,dong from comment #3)
> Test version:
> rhev-hypervisor7-7.0-20141006.0.el7ev
> ovirt-node-3.1.0-0.20.20141006gitc421e04.el7.noarch.rpm
> 
> Due to this bug, <Set Console Path> and Enable SCSI DH_ALUA function of TUI
> menu will fail in uefi boot machine.
> so need set Priority and Severity into "urgent".

Haiyang,

is this afffecting only iscsi uefi or all uefi boots?

Comment 6 haiyang,dong 2014-12-09 02:26:16 UTC
(In reply to Fabian Deutsch from comment #5)
> (In reply to haiyang,dong from comment #3)
> > Test version:
> > rhev-hypervisor7-7.0-20141006.0.el7ev
> > ovirt-node-3.1.0-0.20.20141006gitc421e04.el7.noarch.rpm
> > 
> > Due to this bug, <Set Console Path> and Enable SCSI DH_ALUA function of TUI
> > menu will fail in uefi boot machine.
> > so need set Priority and Severity into "urgent".
> 
> Haiyang,
> 
> is this afffecting only iscsi uefi or all uefi boots?

Hey Fabian,

It will affect all uefi boots.

Comment 7 Ying Cui 2014-12-09 13:06:46 UTC
This bug is urgent bug, need to consider it to fix in rhev 3.5.0. Thanks.

Comment 8 Fabian Deutsch 2014-12-09 21:35:37 UTC
Ying, please clarify:

According to comment 3 this bug only affects RHEV-H when the user is setting a console or enabling alua, is this correct?

Asked different: Do regular installations on UEFI work?

Comment 9 Ying Cui 2014-12-10 04:36:20 UTC
Haiyang, could you please provide more info for comment 8 to clarify? I am not clear well on this bug too, see comment 3, this bug is priority to 'Urgent' and comment 6 for affecting all EFI boots. Maybe there is misunderstanding on this bug not sure what impact does it have. Thanks.

Comment 10 haiyang,dong 2014-12-10 05:39:41 UTC
(In reply to Fabian Deutsch from comment #8)
> Ying, please clarify:
> 
> According to comment 3 this bug only affects RHEV-H when the user is setting
> a console or enabling alua, is this correct?

Correct.
> 
> Asked different: Do regular installations on UEFI work?

Installations on UEFI work well.

Comment 11 Eyal Edri 2014-12-14 13:25:54 UTC
bug pushed to 3.5.1, removing from 3.5.0 trackers.

Comment 12 Fabian Deutsch 2015-03-13 10:05:49 UTC
Haiyang, can you please clarify when this bug appears?

Comment 13 haiyang,dong 2015-03-16 03:21:50 UTC
Test version:
rhevh-6.6-20150312.0.el6ev.iso
ovirt-node-3.2.1-10.el6.noarch

Test steps:
1. Install rhevh-6.6-20150312.0.el6ev.iso into uefi boot machine
2. Login rhevh and try set <Set Console Path> and Enable SCSI DH_ALUA function of TUI menu.

Test result:
ERROR An error appeared in the UI with thrown RuntimeError('Grub config file does not exist)

some logs info from /var/log/ovirt-node.log
--------------------------------------------------
2015-03-15 23:01:12,894       INFO Current page is 'Status'
2015-03-15 23:01:14,774       INFO Showing Console details
2015-03-15 23:01:14,775       INFO Running <function real_console at 0x45f0b90>
2015-03-15 23:01:15,799      ERROR An error appeared in the UI: RuntimeError('Grub config file does not exist: <ovirt.node.utils.fs.File object at 0x45d79d0>',)
2015-03-15 23:01:15,800       INFO Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ovirt/node/app.py", line 304, in run
  File "/usr/lib/python2.6/site-packages/ovirt/node/ui/urwid_builder.py", line 441, in run
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 271, in run
  File "/usr/lib64/python2.6/site-packages/urwid/raw_display.py", line 241, in run_wrapper
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 336, in _run
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 707, in run
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 786, in _loop
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 387, in _update
  File "/usr/lib64/python2.6/site-packages/urwid/main_loop.py", line 487, in process_input
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1102, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1559, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 2240, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1102, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/decoration.py", line 618, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1559, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1559, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/decoration.py", line 618, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1102, in keypress
  File "/usr/lib/python2.6/site-packages/ovirt/node/ui/widgets.py", line 759, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1559, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/container.py", line 1559, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/decoration.py", line 618, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/wimp.py", line 534, in keypress
  File "/usr/lib64/python2.6/site-packages/urwid/widget.py", line 463, in _emit
  File "/usr/lib64/python2.6/site-packages/urwid/signals.py", line 120, in emit
  File "/usr/lib/python2.6/site-packages/ovirt/node/ui/widgets.py", line 542, in on_click_cb
  File "/usr/lib64/python2.6/site-packages/urwid/signals.py", line 120, in emit
  File "/usr/lib/python2.6/site-packages/ovirt/node/ui/urwid_builder.py", line 111, in on_widget_click_cb
  File "/usr/lib/python2.6/site-packages/ovirt/node/base.py", line 103, in __call__
  File "/usr/lib/python2.6/site-packages/ovirt/node/base.py", line 85, in emit
  File "/usr/lib/python2.6/site-packages/ovirt/node/ui/__init__.py", line 201, in __call__
  File "/usr/lib/python2.6/site-packages/ovirt/node/app.py", line 176, in call_on_ui_save
  File "/usr/lib/python2.6/site-packages/ovirt/node/plugins.py", line 406, in _on_ui_save
  File "/usr/lib/python2.6/site-packages/ovirt/node/setup/core/status_page.py", line 211, in on_merge
  File "/usr/lib/python2.6/site-packages/ovirt/node/setup/core/status_page.py", line 277, in __init__
  File "/usr/lib/python2.6/site-packages/ovirt/node/setup/core/status_page.py", line 296, in _console
  File "/usr/lib/python2.6/site-packages/ovirt/node/plugins.py", line 188, in dry_or
  File "/usr/lib/python2.6/site-packages/ovirt/node/setup/core/status_page.py", line 289, in real_console
  File "/usr/lib/python2.6/site-packages/ovirt/node/utils/system.py", line 1007, in __init__
  File "/usr/lib/python2.6/site-packages/ovirt/node/utils/system.py", line 999, in find_grub_cfg
RuntimeError: Grub config file does not exist: <ovirt.node.utils.fs.File object at 0x45d79d0>
2015-03-15 23:02:10,244       INFO Starting '<module 'ovirt.node.setup' from '/usr/lib/python2.6/site-packages/ovirt/node/setup/__init__.pyc'>' application with '<class 'ovirt.node.ui.urwid_builder.UrwidUIBuilder'>' UI
2015-03-15 23:02:10,244       INFO Console path is /dev/tty1
2015-03-15 23:02:10,251       INFO Creating UI for application '<ovirt.node.app.Application object at 0x7ff9c03bbc90>'
2015-03-15 23:02:10,251       INFO Creating UI for application '<ovirt.node.app.Application object at 0x7ff9c03bbc90>'
2015-03-15 23:02:10,446       INFO Current page is 'Status'
2015-03-15 23:02:10,502       INFO Current page is 'Status'
2015-03-15 23:02:13,875       INFO Checking network stuff
2015-03-15 23:02:13,881       INFO Current page is 'Network'
2015-03-15 23:02:14,126       INFO Current page is 'Security'
2015-03-15 23:02:14,359       INFO Current page is 'Keyboard'
2015-03-15 23:02:14,484       INFO Current page is 'SNMP'
2015-03-15 23:02:14,636       INFO Current page is 'CIM'
2015-03-15 23:02:14,826       INFO Current page is 'Logging'
2015-03-15 23:02:14,980       INFO Current page is 'Kdump'
2015-03-15 23:02:15,155       INFO Running <function <lambda> at 0x2c06de8>
2015-03-15 23:02:15,551       INFO Running <function <lambda> at 0x2c06de8>
2015-03-15 23:02:15,554       INFO Current page is 'Remote Storage'
2015-03-15 23:02:15,557       INFO Current page is 'Diagnostics'
2015-03-15 23:02:15,764       INFO Current page is 'Performance'
2015-03-15 23:02:16,330       INFO Current page is 'Diagnostics'
2015-03-15 23:02:17,243       INFO Current page is 'Performance'
2015-03-15 23:02:17,841       INFO Current page is 'RHEV-M'
2015-03-15 23:02:19,028       INFO Current page is 'Performance'
2015-03-15 23:02:19,074       INFO Current page is 'Diagnostics'
2015-03-15 23:02:19,243       INFO Running <function <lambda> at 0x34f0cf8>
2015-03-15 23:02:19,244       INFO Running <function <lambda> at 0x2c78de8>
2015-03-15 23:02:19,247       INFO Current page is 'Remote Storage'
2015-03-15 23:02:22,632    WARNING No widget for path page.save
2015-03-15 23:02:22,633       INFO Running <function <lambda> at 0x2c7bc80>
2015-03-15 23:02:22,633    WARNING No widget for path page.save
2015-03-15 23:02:22,634       INFO Running <function <lambda> at 0x2c7bc80>
2015-03-15 23:02:22,637       INFO Running <function <lambda> at 0x2c7bc80>
2015-03-15 23:02:22,638       INFO Running <function <lambda> at 0x34fcc80>
2015-03-15 23:02:22,659       INFO Running <function <lambda> at 0x34f0a28>
2015-03-15 23:02:22,660       INFO Captured nothing
2015-03-15 23:02:22,660       INFO An exception during the transaction: Grub config file does not exist: <ovirt.node.utils.fs.File object at 0x3500c50>
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ovirt/node/ui/__init__.py", line 949, in __run_transaction
  File "/usr/lib/python2.6/site-packages/ovirt/node/plugins.py", line 188, in dry_or
  File "/usr/lib/python2.6/site-packages/ovirt/node/ui/__init__.py", line 949, in <lambda>
  File "/usr/lib/python2.6/site-packages/ovirt/node/config/defaults.py", line 1383, in commit
  File "/usr/lib/python2.6/site-packages/ovirt/node/utils/system.py", line 1007, in __init__
  File "/usr/lib/python2.6/site-packages/ovirt/node/utils/system.py", line 999, in find_grub_cfg
RuntimeError: Grub config file does not exist: <ovirt.node.utils.fs.File object at 0x3500c50>

Comment 14 Fabian Deutsch 2015-03-16 08:19:06 UTC
Thanks.

Looks like the grub config is not found on uefi machines.

Comment 15 Fabian Deutsch 2015-05-27 14:43:13 UTC
The patch is invasive, as long as there is not customer ticket, I'm moving this out to 3.6.

Comment 17 cshao 2016-02-02 08:03:37 UTC
Still can reproduce this issue with rhev-hypervisor7-7.2-20160126.0 build.

Test version:
rhev-hypervisor7-7.2-20160126.0
ovirt-node-3.6.1-5.0.el7ev.noarch

Test steps:
1. Install rhevh7.2 into uefi boot machine
2. Login rhevh and try set <Set Console Path>

Test result:
ERROR An error appeared in the UI: RuntimeError('Grub config file does not exist: /dev/.initramfs/live/grub2/grub.cfg',)

Comment 19 cshao 2016-02-25 03:56:06 UTC
The bug is blocked by Bug 1311800 - Report error when install rhevh from UEFI machine, I will verify this bug after fix 1311800.

NOTE: SCSI DH_ALUA function has been dropped, detail info please refer Bug 1282402 - Drop SCSI ALUA from RHEV-H TUI

Comment 20 cshao 2016-03-02 06:21:17 UTC
Test version:
rhev-hypervisor7-7.2-20160301.1
ovirt-node-3.6.1-8.0.el7ev.noarch


Test steps:
1. Install rhevh7.2 into uefi machine
2. Login rhevh and try set <Set Console Path>

Test result:
Set console path can succeed, so the bug is fixed, change bug status to VERIFIED.

NOTE:SCSI DH_ALUA function has been dropped from RHEV-H TUI, so we don't need cover this scenario, detail info please refer bug 1282402.

Comment 22 errata-xmlrpc 2016-03-09 14:11:46 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, 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://rhn.redhat.com/errata/RHBA-2016-0378.html


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