Bug 1033844

Summary: dracut-install error if gdisk is not installed
Product: [Fedora] Fedora Reporter: Nicolas Chauvet (kwizart) <kwizart>
Component: cloud-initramfs-toolsAssignee: Juerg Haefliger <juergh>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dracut-maint, harald, Jan.van.Eldik, jonathan, juergh, mkovacik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-29 13:07:16 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:

Description Nicolas Chauvet (kwizart) 2013-11-23 18:02:32 UTC
Description of problem:
dracut -H /boot/initramfs-$(uname -r).img $(uname -r) output an issue if the gdisk package is not installed:
dracut-install: ERROR: installing 'sgdisk'
/usr/lib/dracut/dracut-install -D /var/tmp/initramfs.Jz3wlu -a sgdisk

Version-Release number of selected component (if applicable):
dracut-034-19.git20131021.fc20.armv7hl

How reproducible:
always (at least on my arm minimal image on wandboard quad)

Steps to Reproduce:
1. dracut -H /boot/initramfs-$(uname -r).img $(uname -r)
2.
3.

Actual results:
dracut-install: ERROR: installing 'sgdisk'
/usr/lib/dracut/dracut-install -D /var/tmp/initramfs.Jz3wlu -a sgdisk

Expected results:
dracut should perform quietly

Additional info:
I don't know either if:
1/ the module shoudn't be selected by default,
2/ gdisk be added by default to dracut dependencies or 
3/ gdisk be added by the spin maintainers of the minimal ARM images ...
Advice Welcomed.

Comment 1 Harald Hoyer 2013-11-26 13:11:17 UTC
What is the output of:

# rpm -qf /usr/lib/dracut/modules/*gdisk*

Comment 2 Nicolas Chauvet (kwizart) 2013-11-26 15:03:12 UTC
OK, moving to dracut-modules-growroot, but there is no bugzilla component...

Comment 3 Nicolas Chauvet (kwizart) 2013-11-26 15:05:02 UTC
@Juerg, Can you look at the issue and add the required dependencies.
This was reproduced using the ARM Minimal image, but should be reproducible using the x86 Minimal ones I guess.

Comment 4 Juerg Haefliger 2013-11-27 06:49:17 UTC
I deliberately didn't add this dependency (after talking to Matt Miller). The gdisk package is only required if the partition table on the device to resize is GPT. gdisk pulls in a lot of dependencies (23MB) which are not required/wanted in non-GPT images.

I which there was the concept of 'recommends' in RPMs.

I'm open to suggestions. Maybe we can turn the error into a warning? Or check the partition type and issue the error only in case of GPT? Or check the partition table and automatically pull in gdisk? Not sure I like too much intelligence in dependency resolution though.

Comment 5 Nicolas Chauvet (kwizart) 2013-11-30 16:13:05 UTC
(In reply to Juerg Haefliger from comment #4)
That's a good thing not to have optional dependency turned into Requires: 

> I which there was the concept of 'recommends' in RPMs.
I don't like recommends, this put an interactive action between the RPM transaction.

> I'm open to suggestions. Maybe we can turn the error into a warning?
That would be the more appropriate thing to fix this issue, I think.
But dracut has a concept of hostonly mode where it is checked either or not one module or particular binary is needed, maybe that could be improved in this area.

> check the partition type and issue the error only in case of GPT? Or check
> the partition table and automatically pull in gdisk? Not sure I like too
> much intelligence in dependency resolution though.
We don't default to gpt where the growdisk is used most of the time, so it's unlikely that the issue will rise until gpt is more widely used in the virtual machines or ARM images. 
Now If one spin want to enforce gpt and growroot, then they will need to add gdisk explicitely.

Comment 6 mkovacik 2014-11-20 13:54:11 UTC
(In reply to Juerg Haefliger from comment #4)
> I deliberately didn't add this dependency (after talking to Matt Miller).
> The gdisk package is only required if the partition table on the device to
> resize is GPT. gdisk pulls in a lot of dependencies (23MB) which are not
> required/wanted in non-GPT images.
I'm afraid ignoring a legitimate use case isn't going to help anyone.
Neither will hiding errors behind image-size requirements.

> I'm open to suggestions. Maybe we can turn the error into a warning? Or
> check the partition type and issue the error only in case of GPT? Or check
> the partition table and automatically pull in gdisk? Not sure I like too
> much intelligence in dependency resolution though.

Is it possible to split gdisk package instead?
AFAIK just the sgdisk utility is required in addition for the growpart script to work with GPT...

Comment 7 Harald Hoyer 2014-11-20 14:10:57 UTC
Why not check, if "sgdisk" exists before trying to install it.

Or use:

    inst_multiple -o sgdisk

"-o" meaning optionally.

Comment 8 Fedora End Of Life 2015-05-29 09:50:11 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2015-06-29 13:07:16 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.