Bug 967531 - Kickstart installation can't use default repositories
Kickstart installation can't use default repositories
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Brian Lane
Fedora Extras Quality Assurance
AcceptedFreezeException
: Reopened
: 967472 969927 (view as bug list)
Depends On:
Blocks: F19-accepted/F19FinalFreezeException
  Show dependency treegraph
 
Reported: 2013-05-27 07:19 EDT by Vojtěch Boček
Modified: 2013-06-12 15:41 EDT (History)
11 users (show)

See Also:
Fixed In Version: anaconda-19.30.3-1.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-12 15:41:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Kickstart generated by anaconda (984 bytes, text/plain)
2013-05-27 07:19 EDT, Vojtěch Boček
no flags Details
packaging.log from kickstart installation (20.21 KB, text/plain)
2013-05-27 07:20 EDT, Vojtěch Boček
no flags Details

  None (edit)
Description Vojtěch Boček 2013-05-27 07:19:43 EDT
Created attachment 753583 [details]
Kickstart generated by anaconda

Description of problem:
It is not possible to install OS from default repositories using kickstart files. When anaconda does not have complete repositories (inst.repo boot option with partial repo or netinst.iso), it disables default repos from /etc/anaconda.repos.d. This behavior is incorrect as stated in kickstart wiki[1].

It also affects kickstarts generated by netinst.iso - kickstart generated by manual, default install from netinst.iso stops at main Anaconda page with "Error setting up software source".

Kickstart also ignores "repo" command, it still fails at "Error setting up software source", even when I specify --mirrorlist for the repo. I have to use "url --mirrorlist=..." to get it working.

I think commit cf78307f85c3a528764eb081a75ba873e5a2d983[2] caused this behavior: "Disable all built-in repos when setup of user-specified base repo fails and we were instructed not to fall back on the on-disk repo configs."
Kickstart installation however can't be instructed to fall back - "fallback" variable is always false if flags.automatedInstall is set.


[1]: http://fedoraproject.org/wiki/Anaconda/Kickstart#repo
[2]: https://git.fedorahosted.org/cgit/anaconda.git/commit/?id=cf78307f85c3a528764eb081a75ba873e5a2d983

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

How reproducible:
100%


Steps to Reproduce:
1. Do a default installation from netinst.iso
2. Grab /root/anaconda-ks.cfg.
3. Use this kickstart in combination with netinst.iso.

Actual results:
Installation stops because of "Error setting up software source". It also crashes after that, but that is probably unrelated - bug 967527.


Expected results:
Anaconda should use "Closest mirror", just like in manual netinst.iso
Comment 1 Vojtěch Boček 2013-05-27 07:20:22 EDT
Created attachment 753584 [details]
packaging.log from kickstart installation
Comment 2 Vojtěch Boček 2013-05-27 07:20:49 EDT
*** Bug 967472 has been marked as a duplicate of this bug. ***
Comment 3 Kamil Páral 2013-05-27 07:31:32 EDT
This can probably be argued to be a blocker:
"The installer must be able to complete a scripted installation which duplicates the default interactive installation as closely as possible. "
"Any installation method or process designed to run unattended must do so. There should be no prompts requiring user intervention. "
http://fedoraproject.org/wiki/Fedora_19_Beta_Release_Criteria

There is a workaround to use "url" command, however that allows you to use only a single source, so there is no alternative if you want to install from fedora+updates(+updates-testing) repositories.
Comment 4 Brian Lane 2013-05-28 20:27:28 EDT
This was done on purpose for bug 887254 and the Kickstart docs do say that an install method (eg. url, cdrom, etc.) is required.

url --url=http://dl.fedoraproject.org/pub/fedora/linux/development/19/x86_64/os/
repo --name=fedora
repo --name=updates
repo --name=updates-testing
Comment 5 Kamil Páral 2013-05-29 03:54:12 EDT
Brian, bug 887254 was about keyboard and timezone, and I see its point. But does it make sense not to use the default network sources settings? Do users want to override them individually, in GUI?

Furthermore, if you require "url" or other install source definitions (which wasn't required any previous releases and everything worked well), you force the administrator to put in a redundant repository - because I don't want to install from a specific url, I want to install from the closest mirrors. Also, you force the administrator to manage that url - for every Fedora version and every architecture he needs to have a different kickstart (please note that even if some variable substitution works, the URLs are still different between stable and development releases).

Anaconda-generated kickstart (available at /root/anaconda-ks.cfg after installation) doesn't contain "url" line either. If it were required, it should be there.

I think that bug 887254 can be solved in a more elegant fashion. Instead of completely neglecting the defaults (even if provided using "repo"), you can add a new kickstart command "wait", that would pre-set the correct (even default) values, but wouldn't start the installation itself. The user could then use the main hub to override any settings he wishes (keyboard etc) and only then hit "Begin installation". Isn't that nice?

If you don't like the proposed solution, I have even a simpler one, although not that generic: If "repo" is specified inside the kickstart, don't require "url" as well, because it's superfluous. This solution requires administrators to change their kickstarts (add "repo" lines), but doesn't burden them overly with specific url definitions per Fedora release and architecture.

What do you think?
Comment 6 Adam Williamson 2013-05-29 13:08:01 EDT
Discussed at 2013-05-29 blocker review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2013-05-29/f19final-blocker-review-1.2013-05-29-16.02.log.txt . As we could see both sides of this issue and there isn't a clear-cut 'correct' behaviour we didn't currently accept this as a release blocker, though it does clearly have implications for the criterion we have. We accepted it as an FE issue on the basis that if we do decide to tweak this behaviour, we ought to do it for F19 final.

On a personal note, I can see both sides, but I have to side more with kparal: since it's not possible to completely satisfy both demands, I think we should prioritize being as close to previous releases in behaviour as possible, and the behaviour kparal is asking for is what we had in F<19.
Comment 7 Brian Lane 2013-05-31 12:06:21 EDT
Not having a url or cdrom or other install command from https://fedoraproject.org/wiki/Anaconda/Kickstart#install was a bug. This has been fixed. It is useful to have kickstarts that can work with multiple releases though, so what I've done is added variable substitution for $basearch and $releasever to kickstart baseurl and mirrorlist urls.

So now you can do:

url --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
Comment 8 Adam Williamson 2013-05-31 12:53:56 EDT
Should the default install then write out an anaconda-ks.cfg which specifies that 'url' directive?
Comment 9 Brian Lane 2013-05-31 13:34:08 EDT
Yes. And it does.
Comment 10 Kamil Páral 2013-06-03 07:27:41 EDT
(In reply to Brian C. Lane from comment #7)
> Not having a url or cdrom or other install command from
> https://fedoraproject.org/wiki/Anaconda/Kickstart#install was a bug. This
> has been fixed. It is useful to have kickstarts that can work with multiple
> releases though, so what I've done is added variable substitution for
> $basearch and $releasever to kickstart baseurl and mirrorlist urls.

Perfect, thank you. That should make the installations simple again.

(In reply to Brian C. Lane from comment #9)
> Yes. And it does.

I checked with anaconda 19.30 and for DVD install it adds 'cdrom', for kernel pair boot + inst.repo=nfs: it adds 'nfs', but for a standard netinst install it doesn't add anything, no 'url'.
 
Or maybe this was also fixed in anaconda 19.30.2?
Comment 11 Samantha N. Bueno 2013-06-03 10:51:44 EDT
*** Bug 969927 has been marked as a duplicate of this bug. ***
Comment 12 Brian Lane 2013-06-03 15:00:56 EDT
(In reply to Kamil Páral from comment #10)
> Or maybe this was also fixed in anaconda 19.30.2?

Correct. It wasn't writing anything because it was empty. Now that it is required it won't be empty.
Comment 13 Fedora Update System 2013-06-03 18:19:14 EDT
anaconda-19.30.2-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/anaconda-19.30.2-1.fc19
Comment 14 Fedora Update System 2013-06-04 22:29:33 EDT
Package anaconda-19.30.2-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-19.30.2-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9996/anaconda-19.30.2-1.fc19
then log in and leave karma (feedback).
Comment 15 Fedora Update System 2013-06-06 14:38:05 EDT
anaconda-19.30.3-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/anaconda-19.30.3-1.fc19
Comment 16 Kamil Páral 2013-06-07 07:26:43 EDT
Tested with anaconda-19.30.2. "url" and "repo" commands work well together. However, /root/anaconda-ks.cfg still does not contain "url" (or any other source definition) after a default netinst installation.
Comment 17 Fedora Update System 2013-06-07 11:42:58 EDT
Package anaconda-19.30.3-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-19.30.3-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10283/anaconda-19.30.3-1.fc19
then log in and leave karma (feedback).
Comment 18 Kamil Páral 2013-06-10 05:28:21 EDT
I don't suppose anything changed between 19.30.2 and 19.30.3, so moving back to assigned.
Comment 19 Brian Lane 2013-06-11 19:49:03 EDT
(In reply to Kamil Páral from comment #16)
> Tested with anaconda-19.30.2. "url" and "repo" commands work well together.
> However, /root/anaconda-ks.cfg still does not contain "url" (or any other
> source definition) after a default netinst installation.

Do you mean kickstart or interactive install?

I'm not sure we want to write out the url line for interactive, but it certainly does work for kickstart installs with TC2 which is what this bug was about.
Comment 20 Adam Williamson 2013-06-11 20:14:25 EDT
bcl: see comments #8 and #9, where I asked if the interactive install should write out 'url', and you said it already would.
Comment 21 Fedora Update System 2013-06-11 23:39:25 EDT
anaconda-19.30.3-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 22 Kamil Páral 2013-06-12 06:25:46 EDT
(In reply to Brian C. Lane from comment #19)
> > However, /root/anaconda-ks.cfg still does not contain "url" (or any other
> > source definition) after a default netinst installation.
> 
> Do you mean kickstart or interactive install?

Interactive. But from cdrom and nfs interactive install the relevant commands are included. Just for network install the 'url' is missing.

You said the install source is now required. Which means anaconda now generates invalid kickstart file for network installs. That might confuse some users when they try to re-use that generated file for further installs.

Should I separate that into a new bug report? I think this is all tightly related and it's not worth the effort.
Comment 23 Brian Lane 2013-06-12 14:19:25 EDT
I'd prefer a different bug. something like 'gui install missing url from anaconda-ks.cfg'
Comment 24 Adam Williamson 2013-06-12 14:21:55 EDT
Rather "interactive network install missing url from anaconda-ks.cfg", no? It should work for a text install too...
Comment 25 Kamil Páral 2013-06-12 15:41:46 EDT
Created bug 973808. Closing this one again.

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