Bug 1144106 - ppc grub2 changed config location
Summary: ppc grub2 changed config location
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: lab controller
Version: 0.17
Hardware: Unspecified
OS: Unspecified
unspecified
urgent vote
Target Milestone: 0.18.2
Assignee: Amit Saha
QA Contact: Dan Callaghan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-18 16:34 UTC by andrew
Modified: 2018-02-06 00:41 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-07 07:19:53 UTC


Attachments (Terms of Use)

Description andrew 2014-09-18 16:34:30 UTC
Description of problem:

Right now beaker is not creating the grub(hexip).cfg config files in the correct directory for the latests version of grub2.

Version-Release number of selected component (if applicable):


How reproducible: 100%


Steps to Reproduce:
1. install system with grub2-2.02-0.8 configured on the LC
2. beaker creates symlink for core.elf in /ppc/{hexip-grub2)
3. beaker creates grub2 config in /boot/grub2/grub.cfg-0A1043F9

Actual results:


Expected results:

3. Beaker needs to create grub2 config in /ppc/(grub.cfg-0A1043F9)
for the network boot to be successful 

Additional info:

Comment 3 Dan Callaghan 2014-09-18 22:02:37 UTC
So it was actually a grub bug that it was previously hardcoding /boot/grub2/ as the config directory instead of looking relative to the image location, which is what /ppc/ is. On the other arches grub already always looks relative to the image directory. Evidently they have fixed the ppc port to do the same. I should have kicked up a stink about it when I first noticed it, then we might have found out sooner, but I just shrugged it off as another random boot loader inconsistency. Sigh...

Comment 4 Amit Saha 2014-09-22 03:13:58 UTC
(In reply to andrew from comment #0)
> Description of problem:
> 
> Right now beaker is not creating the grub(hexip).cfg config files in the
> correct directory for the latests version of grub2.
> 
> Version-Release number of selected component (if applicable):
> 
> 
> How reproducible: 100%
> 
> 
> Steps to Reproduce:
> 1. install system with grub2-2.02-0.8 configured on the LC
> 2. beaker creates symlink for core.elf in /ppc/{hexip-grub2)
> 3. beaker creates grub2 config in /boot/grub2/grub.cfg-0A1043F9

just a note to avoid confusion: 

The above paths are actually, <tftp_root>/ppc/ .. and <tftp_root>/grub2/..

Patch: http://gerrit.beaker-project.org/#/c/3343/

Comment 5 Amit Saha 2014-09-22 03:22:15 UTC
(In reply to andrew from comment #0)
> Description of problem:
> 
> Right now beaker is not creating the grub(hexip).cfg config files in the
> correct directory for the latests version of grub2.
> 
> Version-Release number of selected component (if applicable):
> 
> 
> How reproducible: 100%
> 
> 
> Steps to Reproduce:
> 1. install system with grub2-2.02-0.8 configured on the LC
> 2. beaker creates symlink for core.elf in /ppc/{hexip-grub2)
> 3. beaker creates grub2 config in /boot/grub2/grub.cfg-0A1043F9
> 
> Actual results:
> 
> 
> Expected results:
> 
> 3. Beaker needs to create grub2 config in /ppc/(grub.cfg-0A1043F9)
> for the network boot to be successful 

Andrew: Does this look right? http://gerrit.beaker-project.org/#/c/3343/2/documentation/admin-guide/tftp.rst

Comment 6 Dan Callaghan 2014-09-22 07:52:07 UTC
There is a short-term workaround for this problem. You can create a symlink in the new config location pointing at the old one, which Beaker 0.17.3 writes.

    ln -s ../boot/grub2/grub.cfg-0A1043F9 /var/lib/tftpboot/ppc/grub2.cfg-0A1043F9

The downside is of course that you have to do that for every system manually.

Comment 8 Brendan Conoboy 2014-09-23 21:17:07 UTC
We'd like to start provisioning ppc64le guests ASAP so even a short term solution in advance of the Beaker 19 release is very desirable.

Comment 9 Dan Callaghan 2014-09-24 03:14:24 UTC
(In reply to Dan Callaghan from comment #6)
>     ln -s ../boot/grub2/grub.cfg-0A1043F9 /var/lib/tftpboot/ppc/grub2.cfg-0A1043F9

This was a typo, should be:

    ln -s ../boot/grub2/grub.cfg-0A1043F9 /var/lib/tftpboot/ppc/grub.cfg-0A1043F9

Comment 15 Brendan Conoboy 2014-09-30 06:02:59 UTC
Adding grub2 maintainer for comment on pathname changes.

Comment 16 Jeff Burke 2014-10-01 19:05:47 UTC
Peter,
 Any thoughts about Comment 13. We are blocked from getting systems running in Beaker until this is fixed or we get a workaround.


Regards,
Jeff

Comment 17 Amit Saha 2014-10-01 23:03:23 UTC
(In reply to Jeff Burke from comment #16)
> Peter,
>  Any thoughts about Comment 13. We are blocked from getting systems running
> in Beaker until this is fixed or we get a workaround.

Workaround is to *also* create the grub config in <tftp_root>..but i am not sure how good that idea is.

Comment 18 Brendan Conoboy 2014-10-02 02:03:47 UTC
Hey guys, we're the providers of grub2.  Do we really need a workaround or should we be updating the grub2 package itself?  I'd really like to get beaker.engineering.redhat.com up and running on ppc64le right away, so if grub2 is in error let's fix grub2.  If this is an eng-ops specific path we can perhaps spin out a special grub2 for you.  What do you prefer?

Comment 19 Dan Callaghan 2014-10-02 03:49:10 UTC
Okay, I guess I was taking a very fatalistic view of the GRUB2 issues because every boot loader we have to deal with in Beaker has random implementation-defined behaviour that we have to just continually work around. But yes, if we can actually fix GRUB itself that is much better than just working around it in Beaker. So I have filed some bugs about these problems:

Firstly, we still have no idea what the expected behaviour is because it is not documented anywhere:
https://bugzilla.redhat.com/show_bug.cgi?id=1148650

More importantly, this bug is for the inconsistency noted in comment 13:
https://bugzilla.redhat.com/show_bug.cgi?id=1148652

The ideal solution is for someone (Peter Jones? IBM?) to tell us where the config file is *supposed* to be, and then fix GRUB to *actually* look in the right place, and then we can make sure Beaker is writing it to the correct location.

The expedient solution is to make Beaker write the config file to every possible location we have seen GRUB use, just to get it working... Amit has a patch for that. I think the soonest we could have that released is Monday.

Comment 20 Amit Saha 2014-10-02 04:13:42 UTC
> 
> The expedient solution is to make Beaker write the config file to every
> possible location we have seen GRUB use, just to get it working... Amit has
> a patch for that. I think the soonest we could have that released is Monday.

http://gerrit.beaker-project.org/#/c/3365/

Comment 24 Brendan Conoboy 2014-10-03 03:40:34 UTC
Answering for Peter,

The config files should be stored in the same directory the grub binary is stored.  That is the correct behavior for grub2.  I've added more information at https://bugzilla.redhat.com/show_bug.cgi?id=1148652#c4

Comment 26 Dan Callaghan 2014-10-07 07:19:53 UTC
Beaker 0.18.2 has been released.


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