Bug 995526
Summary: | regression: --cost ignored in kickstart file | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ian Collier <imc> |
Component: | anaconda | Assignee: | Anaconda Maintenance Team <anaconda-maint-list> |
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 19 | CC: | anaconda-maint-list, dshea, g.kaviyarasu, imc, jonathan, mkolman, sbueno, stephent98, vanmeeuwen+fedora |
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: | 2013-08-21 19:33:43 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: | |||
Attachments: |
Description
Ian Collier
2013-08-09 15:37:14 UTC
Thanks for your report. The F19 Installation Guide does not show a "--cost" suboption for the "repo" option: 15.4. Kickstart Options http://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/s1-kickstart2-options.html However, the yum.conf man page shows "cost" as a repository option: $ man yum.conf | less -N ... 500 [repository] OPTIONS 501 The repository section(s) take the following form: 502 503 Example: [repositoryid] 504 name=Some name for this repository 505 baseurl=url://path/to/repository/ ... 650 cost relative cost of accessing this repository. Useful for weighing one repo's packages as greater/less than any other. defaults to 1000 ... $ rpm -qf /usr/share/man/man5/yum.conf.5 yum-3.4.3-105.fc19.noarch >The F19 Installation Guide does not show a "--cost" suboption for the "repo" option No, but the Anaconda documentation does: https://fedoraproject.org/wiki/Anaconda/Kickstart#repo and the kickstart file passes ksvalidator because both pykickstart and pyanaconda contain code to deal with this option. It worked in F17 Thanks for pointing that out. The F19 Installation Guide lists three suboptions: repo --name=<repoid> [--baseurl=<url>| --mirrorlist=<url>] http://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/s1-kickstart2-options.html The Anaconda/Kickstart wiki lists nine suboptions: https://fedoraproject.org/wiki/Anaconda/Kickstart#repo repo --name=<name> [--baseurl=<url>|--mirrorlist=<url>] [options] --name= --baseurl= --mirrorlist= --cost= --excludepkgs= --includepkgs= --proxy=[protocol://][username[:password]@]host[:port] --ignoregroups=true --noverifyssl So it looks like there needs to be a documentation bug, too ... (In reply to Ian Collier from comment #0) ... > ... This same scheme did > work properly in Fedora 17. ... Did you try F18? (In reply to Steve Tyler from comment #3) ... > So it looks like there needs to be a documentation bug, too ... Bug 995886 - kickstart "repo" suboptions incomplete > Did you try F18?
Sorry, I skipped 18 (or rather, used FedUp) so have no data on that.
(In reply to Ian Collier from comment #0) ... > ... However, after the install, every package is > shown as having been installed from the web mirror. ... Could you clarify this ... are you looking at a log file? If so, could you attach it? Also, it would be helpful to have the complete kickstart file. (If you are concerned about any sensitive data, it can be replaced with "xxx".) Both as separate, uncompressed, text/plain attachments. Steve, anaconda should write a "cost=" line in the repo files that it generates when a cost is specified through kickstart. This is not happening. I was going to try to reproduce it, but since you already have it all figured out ... The complete kickstart file is probably a distraction, since you'd have to edit it anyway - just add the above repo line to any valid kickstart file. How I know where the packages were installed from: do "yum list installed" and look down the right-hand column. Logs don't seem to say anything useful. However, I did also note that files would appear in /tmp/yum.cache/Fedora_19.mirror/packages during the install. OK, thanks. Now I understand. You are looking at the repoid column.[1] During installs and updates from an installed system, this command will show what sites are being used, but I'm not sure how it could be run during a kickstart install: $ watch -n 1 ss -tar [1] Called "repo" in the yum man page section on List Options. Called "repoid" in other parts of the yum man page. Called "repo id" in the repolist output: $ sudo yum repolist all The column header should probably be "repo id/release/arch", AIUI. Thanks for inspiring me to research these inconsistencies in yum terminology ... :-) (In reply to Steve Tyler from comment #11) ... > During installs and updates from an installed system, this command will show > what sites are being used, but I'm not sure how it could be run during a > kickstart install: > > $ watch -n 1 ss -tar ... During a kickstart install in a VM, "watch -n 1 ss -tar" can be run from a terminal window on the VM host. I was assuming you are doing bare metal installs and not VM installs ... NB: The "ss" command is not available in the installer environment, although the "watch" command is available. Created attachment 786495 [details] ks-bz995526.cfg F19 kickstart file with two updates repos weighted by cost Confirming Ian's result -- there is no "cost" option written to the *.repo files when the attached ks-bz995526.cfg kickstart file is used: $ ls yum.repos.d/ anaconda.repo updates-kern.repo updates-serv.repo $ cat yum.repos.d/anaconda.repo [anaconda] name=Install - anaconda enabled=1 baseurl=http://mirrors.kernel.org/fedora/releases/19/Fedora/x86_64/os/ $ cat yum.repos.d/updates-kern.repo [updates-kern] name=Install - updates-kern enabled=1 baseurl=http://mirrors.kernel.org/fedora/updates/19/x86_64/ $ cat yum.repos.d/updates-serv.repo [updates-serv] name=Install - updates-serv enabled=1 baseurl=http://mirrors.servercentral.net/fedora/updates/19/x86_64/ $ Created attachment 786523 [details]
anaconda-ks.cfg without "repo" options from installed F19 system
Further, there are no "repo" options in /root/anaconda-ks.cfg.
(In reply to Steve Tyler from comment #15) > Created attachment 786523 [details] > anaconda-ks.cfg from installed system > > Further, there are no "repo" options in /root/anaconda-ks.cfg. Ian, could you confirm this with your installed system? For the record, testing is in a VM with: $ qemu-kvm -m 4096 -hda f19-test-2.img -cdrom ~/xfr/fedora/F19/Fedora-19-x86_64-DVD.iso -vga std -boot menu=on The kickstart file is served from the host via NFS by appending this to the kernel command-line: ks=nfs:walnut.lan:/var/tmp/kickstart/ks-bz995526.cfg > Further, there are no "repo" options in /root/anaconda-ks.cfg.
Yes, I did notice that.
Created attachment 786586 [details] ks-bz995526-f18.cfg F18 kickstart file with two updates repos weighted by cost NB: yum requires pyxattr, which is not in the Fedora repo, so this uses the Everything repo for the "url" option. With F18, the "cost" option is written to the *.repo files when the attached ks-bz995526-f18.cfg kickstart file is used. $ ls yum.repos.d/ anaconda.repo updates-kern.repo updates-serv.repo $ cat yum.repos.d/anaconda.repo [anaconda] name=Install - anaconda enabled=1 baseurl=http://mirrors.kernel.org/fedora/releases/18/Everything/x86_64/os/ $ cat yum.repos.d/updates-kern.repo [updates-kern] name=Install - updates-kern enabled=1 baseurl=http://mirrors.kernel.org/fedora/updates/18/x86_64/ cost=1002 $ cat yum.repos.d/updates-serv.repo [updates-serv] name=Install - updates-serv enabled=1 baseurl=http://mirrors.servercentral.net/fedora/updates/18/x86_64/ cost=1001 $ Tested with: $ qemu-kvm -m 4096 -hda f18-test-2.img -cdrom ~/xfr/fedora/F18/Fedora-18-x86_64-DVD.iso -vga std -boot menu=on ks=nfs:walnut.lan:/var/tmp/kickstart/ks-bz995526-f18.cfg Created attachment 786614 [details]
anaconda-ks-f18.cfg with "repo" options from installed F18 system
The F18 /root/anaconda-ks.cfg kickstart file has the "repo" options, including the "--cost" suboptions.
(In reply to Ian Collier from comment #18) > > Further, there are no "repo" options in /root/anaconda-ks.cfg. > > Yes, I did notice that. Thanks, Ian. Bug 997116 - "repo" options not written to /root/anaconda-ks.cfg Created attachment 786707 [details] anaconda-tb-6OLaPX captured while paused at the Reboot button This dump was captured[1] after the kickstart install was completed, and the installer was paused at the Reboot button. The problem here is that ksdata did not get dumped: $ grep -n ksdata anaconda-tb-6OLaPX 879: _intf.storage.ksdata: Already dumped (AnacondaKSHandler instance) 1075:ksdata: Already dumped (AnacondaKSHandler instance) $ grep -n AnacondaKSHandler anaconda-tb-6OLaPX 879: _intf.storage.ksdata: Already dumped (AnacondaKSHandler instance) 935: _intf.payload.data: Already dumped (AnacondaKSHandler instance) 955: _intf._currentAction._data: Already dumped (AnacondaKSHandler instance) 974: _intf._currentAction._spokes._data: Already dumped (AnacondaKSHandler instance) 988: _intf._currentAction._spokes._advanced._data: Already dumped (AnacondaKSHandler instance) 1015: _intf._currentAction._spokes._data: Already dumped (AnacondaKSHandler instance) 1075:ksdata: Already dumped (AnacondaKSHandler instance) $ grep -n cost anaconda-tb-6OLaPX 5739:repo --name=updates-kern --baseurl=http://mirrors.kernel.org/fedora/updates/19/x86_64/ --cost=1002 5740:repo --name=updates-serv --baseurl=http://mirrors.servercentral.net/fedora/updates/19/x86_64/ --cost=1001 [1] Captured from the installer console with: # pkill -USR2 -o anaconda Tested with: $ qemu-kvm -m 4096 -hda f19-test-2.img -cdrom ~/xfr/fedora/F19/Fedora-19-x86_64-DVD.iso -vga std -boot menu=on This does appear to have the same root cause as bug 994940, probably related to e3ce3f19b1d1158c645e848e161e842eba28bccd somehow. I bet most of those other parameters wouldn't get written out either. *** This bug has been marked as a duplicate of bug 994940 *** |