Bug 1277638 - anaconda fails to handle kickstart line like "repo --name=updates"
anaconda fails to handle kickstart line like "repo --name=updates"
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
x86_64 Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
: CommonBugs, Reopened
Depends On:
  Show dependency treegraph
Reported: 2015-11-03 12:23 EST by Adam Williamson
Modified: 2015-11-09 19:22 EST (History)
5 users (show)

See Also:
Fixed In Version: anaconda-24.6-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-06 16:07:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
the traceback you get in text mode (244.14 KB, text/plain)
2015-11-03 12:24 EST, Adam Williamson
no flags Details

  None (edit)
Description Adam Williamson 2015-11-03 12:23:13 EST
The documentation for kickstarts - https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst#repo - says this:

"Note: If you want to enable one of the repos in /etc/anaconda.repos.d that is disabled by default (like "updates"), you should use --name= but none of the other options. anaconda will look for a repo by this name automatically. Providing a baseurl or mirrorlist URL will result in anaconda attempting to add another repo by the same name, which will cause a conflicting repo error."

However, in Fedora 23, this does not work. See these two kickstarts:


they are identical, except the second has an added line "repo --name=updates". Using the first results in a working install, the second results in the installer stopping at the hub with the INSTALLATION SOURCE spoke in an error condition: "Error setting up base repository". If you run the install in text mode, you instead get a crash.

This worked fine in F22 and I think previous releases, so it could be quite bad (I suspect quite a lot of people might be expecting it to to work). We should probably add this to the anaconda automated testing stuff.
Comment 1 Adam Williamson 2015-11-03 12:24 EST
Created attachment 1089156 [details]
the traceback you get in text mode

This is the traceback you get when hitting the bug in text mode - I guess this might actually be a separate bug where the text mode fails to handle errors properly, crashing instead of putting the user at the hub screen with the spoke in an error condition?
Comment 2 Adam Williamson 2015-11-03 12:27:04 EST
Here's /tmp/packaging.log , showing the problem pretty clearly:

17:25:49,332 INFO packaging: configuring base repo
12:21:50,366 INFO packaging: added repo: 'anaconda' - https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-23&arch=x86_64
12:21:50,368 ERR packaging: PayloadError: Repository updates has no mirror or baseurl set

(I didn't edit it, that's the whole thing)
Comment 3 Chris Lumens 2015-11-03 13:19:07 EST
This is perfect for a thing to add to kickstart_tests.
Comment 4 Adam Williamson 2015-11-03 16:06:01 EST
So yeah, this is an over-enthusiastic check, added in this commit:


"# one of these must be set to create new repo" is not true, as we can see in _add_repo, this case is explicitly handled:

        if repo.id in self._base.repos:
            if not url and not mirrorlist:

the check in updateBaseRepo needs to be smarter.
Comment 5 Adam Williamson 2015-11-03 16:53:30 EST
Comment 6 Adam Williamson 2015-11-03 17:07:25 EST
You can test the fix for this with F23 Final using kernel param:

Comment 7 David Shea 2015-11-06 15:05:43 EST
PR is pushed, thanks.
Comment 8 Adam Williamson 2015-11-06 15:24:48 EST
I'm still planning to do a test case for this and perhaps try and fix the fact that text installs crash in this case (I think that's a bug too), FWIW - got some other stuff on my plate first though.
Comment 9 David Shea 2015-11-06 15:29:36 EST
What, you want to see if it works, too? Jeez.
Comment 10 Adam Williamson 2015-11-06 16:07:09 EST
we can leave this bug closed, I think, just wanted to note I hadn't forgot about the follow-up.
Comment 11 Adam Williamson 2015-11-09 19:22:05 EST
OK, so I spent a bit of time looking into the TUI crash, and I'm pretty sure I understand exactly what's going on, but wasn't sure what was the best approach to fixing it, so I filed a new bug with an explanation:


working on the kickstart test next.

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