Bug 1128474

Summary: Adjust anaconda for new format of .buildstamp with Product name included
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: anacondaAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: anaconda-maint-list, awilliam, bcl, dennis, g.kaviyarasu, jonathan, kalevlember, kevin, mikhail.v.gavrilov, mruckman, robatino, sgallagh, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: anaconda-21.48.14-1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-15 09:15:56 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:
Description Flags
X.log none

Description Mikhail 2014-08-10 18:10:22 UTC
Description of problem:
Get error: "Error setting up base repository" when try install Workstation 21 Alpha T2 netinstall

Demonstration: https://drive.google.com/file/d/0B0nwzlfiB4aQUWg3amVobnhTYnM/edit?usp=sharing

Comment 1 David Shea 2014-08-11 13:33:15 UTC
Please attach the log files from /tmp to this bug as individual, text/plain attachments

Comment 2 Mikhail 2014-08-11 19:58:46 UTC
Ok, how I can do it? Host machine catches pressing Ctrl-Alt-F2.

Comment 3 David Shea 2014-08-13 14:30:55 UTC
I have no clue. I can't figure out how to ssh into a boxes, instance, either, so I'm at a loss. Does the error happen every time you try? If so, does the error persist if you enter the Installation Source spoke and hit Done?

My suspicions are that either there's a problem with attempting to download the repo files before the network is fully up, such as in bug 1124590, or there was some temporary problem with a fedora mirror, or given the ssh issues I'm having there may be a problem with boxes itself.

Comment 4 Mikhail 2014-08-23 15:32:48 UTC
Created attachment 929912 [details]

Comment 5 Mikhail 2014-08-23 15:33:14 UTC
Created attachment 929913 [details]

Comment 6 Mikhail 2014-08-23 15:33:33 UTC
Created attachment 929914 [details]

Comment 7 Mikhail 2014-08-23 15:33:49 UTC
Created attachment 929915 [details]

Comment 8 Mikhail 2014-08-23 15:34:05 UTC
Created attachment 929916 [details]

Comment 9 Mikhail 2014-08-23 15:34:21 UTC
Created attachment 929917 [details]

Comment 10 Mikhail 2014-08-23 15:34:39 UTC
Created attachment 929918 [details]

Comment 11 Mikhail 2014-08-23 15:42:12 UTC
(In reply to David Shea from comment #3)
> Does the error happen every time you try?

> If so, does the error persist if you enter the Installation Source spoke and hit Done?

Comment 12 Fedora Blocker Bugs Application 2014-09-02 23:56:40 UTC
Proposed as a Blocker for 21-alpha by Fedora user bcl using the blocker tracking app because:

 Net install ought to work.

Comment 13 Brian Lane 2014-09-02 23:58:49 UTC
The problem ends up being that the Product entry in .buildstamp is no longer just 'Fedora'. It now includes the name of the variant. Anaconda uses the value of this to determine the name of the default repo to use for mirror installs. It doen't match the name in /etc/anaconda.repo.d/fedora.repo so it thinks the base repo setup has failed.

Comment 14 Mike Ruckman 2014-09-03 16:15:50 UTC
Discussed in 2014-09-03 Blocker Review meeting. Accepted as a blocker because it violates "The network install image must default to a valid publicly-accessible package source" Alpha criterion.

Comment 15 Fedora Update System 2014-09-04 18:52:26 UTC
anaconda-21.48.4-1.fc21 has been submitted as an update for Fedora 21.

Comment 16 Adam Williamson 2014-09-05 16:51:19 UTC
I think this may be broken again in TC6, only slightly differently. The fix for this was to make anaconda try to split the product name:

DEFAULT_REPOS = [productName.split('-')[0].lower(), "rawhide"]

but I think in TC6 the separator changed from - to _ (see also https://bugzilla.redhat.com/show_bug.cgi?id=1138746 ) so that doesn't actually work. I'm not 100% sure though, can't actually test very easily right now, bandwidth impaired.

Comment 17 Fedora Update System 2014-09-06 00:59:00 UTC
Package anaconda-21.48.4-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-21.48.4-1.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 18 Brian Lane 2014-09-08 23:26:18 UTC
After talking to sgallah, kalev and dgilmore this was the conclusion:

The products want the ability to make Product specific netinst isos. Personally, I think this is the wrong approach, but in order to allow them the flexibility I'll revert my .buildstamp Product patch.

This means that when making a compose the composer has to be sure they include a package installing a repo to /etc/yum.repos.d/ that has an id matching the lower-case version of the product name (eg. fedora-server or fedora-workstation). Without this the closest mirror option will not work because anaconda doesn't know the name of the repo to use.

Comment 19 Adam Williamson 2014-09-08 23:31:23 UTC
Note, we're tracking the overall issue of 'what the hell to do with Product netinsts' as https://bugzilla.redhat.com/show_bug.cgi?id=1134524 . I added a summary of the plan there; I'll add in your note about the repo file name, as i don't believe we captured that.

Comment 20 Fedora Update System 2014-09-10 02:38:45 UTC
anaconda-21.48.5-1.fc21 has been submitted as an update for Fedora 21.

Comment 21 Fedora Update System 2014-09-10 16:41:50 UTC
Package anaconda-21.48.5-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-21.48.5-1.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 22 Fedora Update System 2014-09-11 20:34:10 UTC
anaconda-21.48.6-1.fc21 has been submitted as an update for Fedora 21.

Comment 23 Adam Williamson 2014-09-16 15:27:33 UTC
I believe we can say for sure that anaconda is behaving as desired at this point, I can confirm this looking at the URLs requested in RC1. MirrorManager isn't providing the metalinks at the right places yet, but anaconda is doing its job.

Comment 24 Adam Williamson 2014-11-06 01:38:44 UTC
So I hate to spin this merry-go-round one more time, but I think we may want to go back to the "first part of Product" approach for Final.

To recap briefly - for Alpha we invented the 'fedora-repos-anaconda' with fedora-server.repo , fedora-workstation.repo , and fedora-cloud.repo pointing to Product-specific repositories (repos within the installer trees for each Product).

That was all very well only we found out it didn't really work - see https://bugzilla.redhat.com/show_bug.cgi?id=1134524#c24 and https://bugzilla.redhat.com/show_bug.cgi?id=1134524#c25 . The netinsts wound up listing all groups and we couldn't 'solve' that.

So for Beta we decided, hey, we don't really need Product-specific netinsts anyway, let's drop the Workstation netinst and have the Server netinst be the only official netinst image, have it default to the Server environment group but offer all the other environment groups too, that's fine.

OK, but we kept fedora-repos-anaconda and left pyanaconda/packaging/__init__.py looking for productName.lower() as DEFAULT_REPOS. This *works*, but it's unnecessarily complex and probably wasting time, bandwidth and RAM in anaconda.

I believe for Final we can do the following:

1. Change pyanaconda/packaging/__init__.py back to:
DEFAULT_REPOS = [productName.split('-')[0].lower(), "rawhide"]
(which was the initial fix for this bug)

2. Drop 'installpkg fedora-repos-anaconda' from lorax/share/runtime-install.tmpl

3. Drop the fedora-repos-anaconda package

Then we'll be back to using fedora.repo as the default repo for network installs (in Fedora) and we won't have the never-really-working Product-specific repos messing stuff up.

Comment 25 Adam Williamson 2014-11-06 02:12:09 UTC
bcl wanted me to test this, so I did.

https://www.happyassassin.net/temp/updates-1128474.img is an updates.img against Beta which flips the DEFAULT_REPOS line back to:

DEFAULT_REPOS = [productName.split('-')[0].lower(), "rawhide"]

My test procedure is this:

1. Boot Beta x86_64 Server netinst
2. On the Welcome screen, flip to ctrl-alt-F2 and delete the /etc/anaconda.repos.d/fedora-{workstation, server, cloud}.repo files
3. flip back to ctrl-alt-F6, go to hub
4. After initial source configuration succeeds (it always does), go into Installation Source, change source to ftp://aa (or some other nonsense URL), go back to hub
5. Go back to Installation Source, change source to 'Closest mirror', go back to hub, see if it succeeds

It seems the first attempt always succeeds because it sets up the repos before you delete them, but the 'change to a garbage URL then change back to closest mirror' dodge lets you test things properly - it re-configures the repos when you do that. When I run the test without the updates image, I get "Error setting up base repository". When I run the test with the updates image, there is no error, all Environments are available on Software Selection, and Fedora Server is the default.

That's exactly what I'd expect, and indicates that changing the DEFAULT_REPOS line and removing the repos from the install image (that's step 1 and 2 above) should work as intended.

It also seems to save ~30MB of RAM; after step 3, RAM usage is always ~422MB, after a successful step 5, it's ~390MB.

Comment 26 Brian Lane 2014-11-06 19:04:15 UTC
I'd like to make sure everyone is on the same page before I push these reverting reverts. So chime in if you have a problem with this.

We should also make sure that actual images are created frequently before the deadlines to prevent any surprises.

Comment 27 Adam Williamson 2014-11-06 19:42:57 UTC
We're still building boot.iso nightly in development/21 , I believe, and it should be affected by these changes (i.e. if they're busted it should break).

We'll be doing regular TC composes too I'm sure, now TC1 has happened. I'd usually look to do a TC at least for each new major anaconda build.

Comment 28 Stephen Gallagher 2014-11-06 21:16:38 UTC
For the record, I'm +1 on the plan in comment #24.

Comment 29 Kalev Lember 2014-11-06 22:18:35 UTC
+1, sounds like a good plan to me as well.

Comment 30 Dennis Gilmore 2014-11-06 23:59:48 UTC
I am +1 for this as it will let us deal with fedup how it wants to.

Comment 31 Brian Lane 2014-11-07 02:57:40 UTC
lorax-21.28-1 as well.

Comment 32 Fedora Update System 2014-11-11 21:02:39 UTC
anaconda-21.48.14-1.fc21 has been submitted as an update for Fedora 21.

Comment 33 Fedora Update System 2014-11-13 18:16:50 UTC
Package anaconda-21.48.14-1.fc21, python-blivet-0.61.9-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-21.48.14-1.fc21 python-blivet-0.61.9-1.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 34 Fedora Update System 2014-11-15 09:15:56 UTC
anaconda-21.48.14-1.fc21, python-blivet-0.61.9-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.