Bug 1156008

Summary: docs: document that %packages --nocore is not safe
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: anaconda-maint-list, g.kaviyarasu, jonathan, jsedlak, mkolman, robatino, vanmeeuwen+fedora
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:aecfae153969164c6ce70faf250b7204becfc43ea8df65634d734835dfb2ab82
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-24 14:42:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: anaconda-tb
none
File: anaconda.log
none
File: environ
none
File: ks.cfg
none
File: lsblk_output
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: syslog
none
File: ifcfg.log
none
File: packaging.log none

Description Kamil Páral 2014-10-23 11:49:48 UTC
Description of problem:
This happened during "generating initramfs" phase in a kickstarted installation.

Version-Release number of selected component:
anaconda-21.48.10-1

The following was filed automatically by anaconda:
anaconda 21.48.10-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
  File "/usr/lib64/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 137, in _run_program
    preexec_fn=chroot, cwd=root, env=env)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 193, in execWithRedirect
    log_output=log_output, binary_output=binary_output)[0]
  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 171, in execInSysroot
    return execWithRedirect(command, argv, stdin=stdin, root=getSysroot())
  File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/__init__.py", line 599, in recreateInitrds
    "--depmod", "--update", kernel])
  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 105, in doConfiguration
    payload.recreateInitrds(force=True)
  File "/usr/lib64/python2.7/threading.py", line 766, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 227, in run
    threading.Thread.run(self, *args, **kwargs)
OSError: [Errno 2] No such file or directory

Additional info:
addons:         com_redhat_kdump
cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   ks=file:///ks.cfg  inst.stage2=http://download.eng.brq.redhat.com/pub/fedora/fedora-alt/stage/21_Beta_TC4/Server/x86_64/os/
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.17.0-301.fc21.x86_64
product:        Fedora"
release:        Cannot get release name.
type:           anaconda
version:        Fedora

Comment 1 Kamil Páral 2014-10-23 11:50:04 UTC
Created attachment 949824 [details]
File: anaconda-tb

Comment 2 Kamil Páral 2014-10-23 11:50:06 UTC
Created attachment 949825 [details]
File: anaconda.log

Comment 3 Kamil Páral 2014-10-23 11:50:07 UTC
Created attachment 949826 [details]
File: environ

Comment 4 Kamil Páral 2014-10-23 11:50:08 UTC
Created attachment 949827 [details]
File: ks.cfg

Comment 5 Kamil Páral 2014-10-23 11:50:10 UTC
Created attachment 949828 [details]
File: lsblk_output

Comment 6 Kamil Páral 2014-10-23 11:50:11 UTC
Created attachment 949829 [details]
File: nmcli_dev_list

Comment 7 Kamil Páral 2014-10-23 11:50:12 UTC
Created attachment 949830 [details]
File: os_info

Comment 8 Kamil Páral 2014-10-23 11:50:15 UTC
Created attachment 949831 [details]
File: program.log

Comment 9 Kamil Páral 2014-10-23 11:50:21 UTC
Created attachment 949832 [details]
File: storage.log

Comment 10 Kamil Páral 2014-10-23 11:50:23 UTC
Created attachment 949833 [details]
File: syslog

Comment 11 Kamil Páral 2014-10-23 11:50:24 UTC
Created attachment 949834 [details]
File: ifcfg.log

Comment 12 Kamil Páral 2014-10-23 11:50:26 UTC
Created attachment 949835 [details]
File: packaging.log

Comment 13 Kamil Páral 2014-10-23 12:25:40 UTC
Another user experienced a similar problem:

Yet another crash during kickstarted installation. Most probably a duplicate of bug 1156008.

addons:         com_redhat_kdump
cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-21_B_T4-x86_64 quiet inst.ks=hd:vda1:/ks.cfg
hashmarkername: anaconda
kernel:         3.17.0-301.fc21.x86_64
package:        anaconda-21.48.10-1
product:        Fedora"
reason:         OSError: [Errno 2] No such file or directory
release:        Cannot get release name.
version:        Fedora

Comment 14 Kamil Páral 2014-10-23 12:26:56 UTC
Another user experienced a similar problem:

And another crash. Duplicate of bug 1156008, most probably.

addons:         com_redhat_kdump
cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   ks=file:///ks.cfg  inst.stage2=http://download.eng.brq.redhat.com/pub/fedora/fedora-alt/stage/21_Beta_TC4/Server/x86_64/os/
hashmarkername: anaconda
kernel:         3.17.0-301.fc21.x86_64
package:        anaconda-21.48.10-1
product:        Fedora"
reason:         OSError: [Errno 2] No such file or directory
release:        Cannot get release name.
version:        Fedora

Comment 15 Martin Kolman 2014-10-23 12:38:21 UTC
Looks like new-kernel-pkg is missing for some reason:

13:48:39,323 INFO program: Running... new-kernel-pkg --mkinitrd --dracut --depmod --update 3.17.1-302.fc21.x86_64
13:48:39,335 ERR program: Error running new-kernel-pkg: No such file or directory

Maybe a comps error ?

Comment 16 Kamil Páral 2014-10-23 13:18:03 UTC
Another user experienced a similar problem:

And another crash, yay. I'm fairly certain now what causes it, it's %packages --nocore. If I don't specify --nocore (which means select @core by default), everything works correctly.

addons:         com_redhat_kdump
cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-21_B_T4-x86_64 quiet inst.ks=http://192.168.11.1:8000/ks.cfg
hashmarkername: anaconda
kernel:         3.17.0-301.fc21.x86_64
package:        anaconda-21.48.10-1
product:        Fedora"
reason:         OSError: [Errno 2] No such file or directory
release:        Cannot get release name.
version:        Fedora

Comment 17 Kamil Páral 2014-10-23 13:24:17 UTC
Having functional --nocore might be important for some people (ultra small deployments), so I'm proposing this as a Final blocker. We probably have no better criteria than:
https://fedoraproject.org/wiki/Fedora_21_Beta_Release_Criteria#Unattended_installation

Comment 18 Jan Sedlák 2014-10-23 13:36:32 UTC
Another user experienced a similar problem:

I have tried kparal's kickstart file and encountered same problem.

addons:         com_redhat_kdump
cmdline:        /usr/bin/python  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-21_B_T4-x86_64 quiet inst.ks=http://192.168.122.1:8000/kamil-ks.cfg
hashmarkername: anaconda
kernel:         3.17.0-301.fc21.x86_64
package:        anaconda-21.48.10-1
product:        Fedora"
reason:         OSError: [Errno 2] No such file or directory
release:        Cannot get release name.
version:        Fedora

Comment 19 Brian Lane 2014-10-24 02:25:27 UTC
The whole point of --nocore is that you get to keep the pieces if you break things.

In this case you're missing grubby which provides new-kernel-pkg.

Comment 20 Kamil Páral 2014-10-24 14:35:50 UTC
Sorry to reopen this, but this is not sufficient. Current documentation doesn't say anything any --nocore being dangerous or "you're on your own"-style option:
http://fedoraproject.org/wiki/Anaconda/Kickstart

     --nocore 
        Do not install the @core group (installed by default, otherwise). 

If there was such information, I wouldn't have reported this bug in the first place.

> The whole point of --nocore is that you get to keep the pieces if you break things.

And my point is - how should I have known? And how should the users know?

Anaconda is not doing really well at keeping its documentation up to date and relevant. I'd like that to improve. Documentation *is* a part of the program and quite a few people act according to it.

I'd edit the wiki myself, if I felt like knowing all the background, but as you can see, I don't. Please put more info into the wiki, thanks.

Comment 21 Chris Lumens 2014-10-24 14:42:17 UTC
This is common sense stuff here - if you disable the group that includes all the useful base stuff, things are gonna fail.  You're not a new Fedora user, so stop acting like one.  You know what's in these groups and when things are likely to fail.  This was added specifically for building cloud images, not for general user consumption.

Now you have all the same background we do.  This is a group project, and there's a specific reason stuff like this is on the wiki - so anyone can do the editing.  Now you can go and do it too.  See, that would help keep documentation up to date and relevant.

Comment 22 Kamil Páral 2014-10-24 14:46:54 UTC
I still don't feel like having the same background as you, but I made the change myself here:
https://fedoraproject.org/w/index.php?title=Anaconda%2FKickstart&diff=392537&oldid=390965

Comment 23 Chris Lumens 2014-10-24 14:52:33 UTC
No, as I said - this was added specifically for building cloud images.  I didn't say it wasn't supported.

Comment 24 Kamil Páral 2014-10-24 15:41:35 UTC
That's what I understood from comment 19. But it's a nice illustration why I believe it's more time effective if people having the full information edit the documentation, rather than relying on middlemen. I don't really understand why we're having this conversion in the first place. Instead of discussing with me, any of you could have provided 100% correction information on the wiki already, and save a lot of time as well. Whenever I report a problem in anaconda's documentation, I have this feeling of "not our problem, you fix it" approach. And so I do try to fix it, if there's really no other way.

Comment 25 David Shea 2014-10-24 15:47:51 UTC
It should be pretty obvious that

%packages --nocore
%end

isn't going to do anything useful. So instead of seeing that this is an area in kickstart documentation that could be clarified, you decided to be obtuse about it and provide incorrect information. And we're the ones being unhelpful.

Comment 26 Kamil Páral 2014-10-24 17:41:14 UTC
It seems I'm the one having a bad day, after all.

I can assure you it wasn't any obvious to me that
%packages --nocore
%end
is not going to do anything useful. Quite the opposite, I was trying to heavily optimize shortly before Beta final validation to have as small "minimal installation" as possible, and the selection above resulted in mere 150 packages, thus helping me to execute more test cases quicker (at least that was the idea). If I knew this was not going work properly, I wouldn't have wasted time (quite precious, yesterday and today) debugging, reporting, and asking my colleagues to reproduce it. Let's describe that as obtuse. Not deliberately, though.

My prime goal is to have it covered in documentation, because I know I forget easily and I'd fall into the same trap during the next or next+1 release. I have made my documentation edit before ever seeing comment 21 (which was actually a mid-air collision), so much for providing "incorrect information". But if you don't find it ridiculous, please hand me a snippet that is accurate and intended for the end-user, and I'll paste it into the wiki.