Bug 1003032

Summary: Cannot find a valid baseurl for repo: updates
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: spin-kickstartsAssignee: Brian Lane <bcl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: adam.stokes, admiller, bcl, bruno, dhuff, Jasper.Hartline, katzj, kevin, 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: 2014-10-07 23:41:01 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:

Description Kamil Páral 2013-08-30 14:15:47 UTC
Description of problem:

I can't create a F20 LiveCD if I have "updates" repo enabled. I have no idea why, because the URL is correct:

$ cat ks/spin-kickstarts/fedora-repo-not-rawhide.ks repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-$releasever&arch=$basearch
#repo --name=updates-testing --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-$releasever&arch=$basearch

Which goes to:
http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f20&arch=x86_64

My spin-kickstarts git is up-to-date, and f20 branch is active.

If I comment out "updates" line, I no longer receive the crash.

$ sudo livecd-creator -c ks/spin-kickstarts/fedora-livecd-desktop.ks --releasever 20 --cache /var/cache/live -f "live-broken"
/usr/lib/python2.7/site-packages/pykickstart/commands/partition.py:309: UserWarning: A partition with the mountpoint / has already been defined.
  warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint)
lazy umount succeeded on /var/tmp/imgcreate-GUx4oB/install_root//var/cache/yum
Traceback (most recent call last):
  File "/bin/livecd-creator", line 237, in <module>
    sys.exit(main())
  File "/bin/livecd-creator", line 218, in main
    creator.install()
  File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 642, in install
    ayum.setup(yum_conf, self._instroot)
  File "/usr/lib/python2.7/site-packages/imgcreate/yuminst.py", line 105, in setup
    self.doTsSetup()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 129, in doTsSetup
    return self._getTs()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 137, in _getTs
    if not remove_only and self._tsInfo.pkgSack is None:
  File "/usr/lib/python2.7/site-packages/yum/transactioninfo.py", line 140, in <lambda>
    pkgSack = property(fget=lambda self: self._getPkgSack(),
  File "/usr/lib/python2.7/site-packages/yum/transactioninfo.py", line 137, in _getPkgSack
    self._pkgSack = self._pkgSackCtor()
  File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 76, in __call__
    return self.ayum.pkgSack
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1050, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 770, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 383, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 224, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 316, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1480, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1666, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1662, in _getRepoXML
    self._loadRepoXML(text=self.ui_id)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1653, in _loadRepoXML
    return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1627, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1452, in _commonLoadRepoXML
    result = self._getFileRepoXML(local, text)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1230, in _getFileRepoXML
    size=102400) # setting max size as 100K
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1012, in _getFile
    result = self.grab.urlgrab(misc.to_utf8(relative), local,
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 693, in <lambda>
    grab = property(lambda self: self._getgrab())
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 688, in _getgrab
    self._setupGrab()
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 627, in _setupGrab
    urls = self.urls
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 870, in <lambda>
    urls = property(fget=lambda self: self._geturls(),
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 867, in _geturls
    self._baseurlSetup()
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 833, in _baseurlSetup
    self.check()
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 554, in check
    'Cannot find a valid baseurl for repo: %s' % self.ui_id
yum.Errors.RepoError: Cannot find a valid baseurl for repo: updates


Version-Release number of selected component (if applicable):
livecd-tools-20.0-1.fc20.x86_64
Fedora 19

How reproducible:
always

Steps to Reproduce:
1. sudo livecd-creator -c ks/spin-kickstarts/fedora-livecd-desktop.ks --releasever 20 --cache /var/cache/live -f "live-broken"

Comment 1 Bruno Wolff III 2013-08-30 14:25:39 UTC
It is intended that this should work. There is an updates repo out there for f20, though I am just mirroring it now. I'll look at testing the validity of the repo this weekend.

Is the system you are running livecd-creator on really f20 (or are you using an f20 mock)?

Comment 2 Kamil Páral 2013-08-30 15:03:32 UTC
I'm using F19 with livecd-tools.fc20 installed. No mock.

Comment 3 Bruno Wolff III 2013-08-30 15:10:30 UTC
That's not really going to give you what you want. I expect that you'll end up building the image using f19 packages. However, that doesn't account for the error. I had thought that maybe you were doing it on rawhide and that might have resulted in trying to use a non-existant repo.

It is still possible I messed up the updates reference. I did some sort of test with it when I made the change to split out the repo directives to separate files. But maybe it didn't test it properly.

Comment 4 Bruno Wolff III 2013-08-30 15:11:33 UTC
Nevermind about part of that. I just noticed you used the releasever option to set 20 as the release. That should have worked.

Comment 5 Kamil Páral 2013-08-30 15:19:17 UTC
It should have worked, I used it the same way in the past (.fc19 package on F18 or .fc18 package on F17). That's what bcl advised me to do, anyway.

Comment 6 Bruno Wolff III 2013-08-31 13:23:44 UTC
There was a missing 'f' in the updates and updates-testing URLs. Changes have been committed to upstream git and packages for f20 and rawhide with the fix (the rawhide changes don't really matter in the short run) are building now.

Comment 7 Kamil Páral 2013-09-02 08:47:42 UTC
Oh, I haven't noticed. Thanks. After updating spin-kickstarts from git the problem is gone.