Bug 1153550 - `liveinst --updates=URL` is the only working syntax, but help page mentions `liveinst --updates URL`
Summary: `liveinst --updates=URL` is the only working syntax, but help page mentions `...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-16 08:03 UTC by Kamil Páral
Modified: 2014-11-15 09:16 UTC (History)
5 users (show)

Fixed In Version: anaconda-21.48.14-1.fc21
Clone Of:
Environment:
Last Closed: 2014-11-15 09:16:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
updates.img (5.27 KB, application/x-gzip)
2014-10-16 08:04 UTC, Kamil Páral
no flags Details
anaconda.log (5.21 KB, text/plain)
2014-10-16 08:04 UTC, Kamil Páral
no flags Details
ifcfg.log (2.57 KB, text/plain)
2014-10-16 08:04 UTC, Kamil Páral
no flags Details
journal (295.76 KB, text/plain)
2014-10-16 08:04 UTC, Kamil Páral
no flags Details
packaging.log (371 bytes, text/plain)
2014-10-16 08:04 UTC, Kamil Páral
no flags Details
program.log (33.71 KB, text/plain)
2014-10-16 08:05 UTC, Kamil Páral
no flags Details
rpm-qa (46.19 KB, text/plain)
2014-10-16 08:05 UTC, Kamil Páral
no flags Details
sensitive-info.log (109 bytes, text/plain)
2014-10-16 08:05 UTC, Kamil Páral
no flags Details
storage.log (204.31 KB, text/plain)
2014-10-16 08:05 UTC, Kamil Páral
no flags Details
patch to tell user about --updates=<url> (1.35 KB, application/mbox)
2014-10-28 00:19 UTC, Brian Lane
no flags Details

Description Kamil Páral 2014-10-16 08:03:44 UTC
Description of problem:
[liveuser@localhost ~]$ liveinst --updates http://192.168.11.1:8000/updates.img
Starting installer, one moment...
anaconda 21.48.9-1 for Fedora 21 (pre-release) started.

** (anaconda:2372): WARNING **: atk-bridge: Couldn't listen on dbus server: Failed to bind socket "/tmp/.cache/at-spi2-socket-2372": No such file or directory


As you can see, no updates.img was downloaded (no curl output, also no /tmp/update* files). If I put the same URL on kernel cmdline as inst.updates=, the update.img is downloaded and applied (there is curl output after running liveinst, and there are /tmp/update* files).

I created a simple updates.img which changes Timbuktu word to XXXTimbuktu, so it's easy to verify whether the updates.img was applied or not. With inst.updates= it works, with liveinst --updates= it does not.

Version-Release number of selected component (if applicable):
Fedora-Live-Workstation-x86_64-21_Beta-TC3.iso
anaconda 21.48.9-1

How reproducible:
always

Steps to Reproduce:
1. run Live
2. run liveinst --updates=<url>
3. see that the updates.img was not applied

Comment 1 Kamil Páral 2014-10-16 08:04:17 UTC
Created attachment 947485 [details]
updates.img

Comment 2 Kamil Páral 2014-10-16 08:04:51 UTC
Created attachment 947486 [details]
anaconda.log

Comment 3 Kamil Páral 2014-10-16 08:04:53 UTC
Created attachment 947487 [details]
ifcfg.log

Comment 4 Kamil Páral 2014-10-16 08:04:57 UTC
Created attachment 947488 [details]
journal

Comment 5 Kamil Páral 2014-10-16 08:04:59 UTC
Created attachment 947489 [details]
packaging.log

Comment 6 Kamil Páral 2014-10-16 08:05:01 UTC
Created attachment 947490 [details]
program.log

Comment 7 Kamil Páral 2014-10-16 08:05:04 UTC
Created attachment 947491 [details]
rpm-qa

Comment 8 Kamil Páral 2014-10-16 08:05:05 UTC
Created attachment 947492 [details]
sensitive-info.log

Comment 9 Kamil Páral 2014-10-16 08:05:09 UTC
Created attachment 947493 [details]
storage.log

Comment 10 Kamil Páral 2014-10-16 08:07:49 UTC
This is in fact Alpha functionality, but the criterion just says:
"The installer must be able to download and use an installer update image from an HTTP server. "
https://fedoraproject.org/wiki/Fedora_21_Alpha_Release_Criteria#Update_image
which is actually satisfied, you just need to use a different method than documented in `liveinst --help` (and probably also elsewhere). So proposing as Final blocker, either the functionality or the docs should be adjusted to match.

Comment 11 Brian Lane 2014-10-16 13:50:34 UTC
You need to use liveinst --updates=http...

The liveinst cmdline parser isn't very flexible and expects the = to be there.

Comment 12 Kamil Páral 2014-10-20 14:28:15 UTC
Oh, damn. That didn't really occur to me. On the other hand, to me defense, `liveinst --help` doesn't mention any equal sign:

  --updates UPDATES_URL
        Path to an updates image that is on local filesystem or
        available over FTP or HTTP. UPDATES_URL must be either a local
        filesystem path, a network URL or <disk>:<path> where <disk> can
        be one of sdX, /dev/sdX, LABEL=xxx, UUID=xxx and <path> defaults
        to /updates.img if missing. See the Anaconda docs for more
        details about the path specification. Please note that the
        updates image only updates the installation environment and is
        completely unrelated to package updates.

(the same syntax is shown also in the usage section)

So, can we please at least fix the documentation if not the code (ideally for all cases where equal sign is needed)? Of course using argparse or optparse would also count :-)

Removing blocker nomination, this is a tiny documentation bug.

Comment 13 Brian Lane 2014-10-21 23:53:54 UTC
It ends up that fixing this is more pain that it is worth.

liveinst is passing through all of its args to anaconda so what you are seeing is actually the anaconda help, not liveinst.

liveinst is bash, so to be able to handle --updates=foo and --updates foo would mean a rewrite of the argument handling loop and that's just not worth it for a single option that's only used for testing.

Comment 14 Kamil Páral 2014-10-22 13:19:31 UTC
I understand the cost/benefit ratio, but still I think it's a valid bug, and maybe WONTFIX is too harsh?

Could you perhaps adjust argparse to print "--option=VALUE" instead of "--option VALUE" in the help text? That is the lowest common denominator, that would work everywhere. Or at least adding a short note to the beginning of "liveinst --help" output would help a bit. That's the easiest thing that can be done here.

Btw, I'm not sure why you say `liveinst --updates` is used only for testing. It's often used by users when there is a bug in anaconda in an already released stable version of Fedora, and they need to work around it. Which has happened quite a few times in the past:
https://fedoraproject.org/wiki/Common_F20_bugs#dvd-repo-crash
https://fedoraproject.org/wiki/Common_F20_bugs#noefi-doesnt-work
https://fedoraproject.org/wiki/Common_F20_bugs#uefi-msdos-label

Most of them were not specific to Live image, so we recommended `inst.updates=URL`, but that's not a rule. If `liveinst --help` claims the same functionality, I'd expect quite a few people to actually try to use it.

Also, when estimating the cost/benefit ratio, please take into account all those users and QA people, who need to debug why it doesn't work as documented. Most of them are probably smarter than I am, that's why they haven't reported a bug, as I did ;-)

Comment 15 Kamil Páral 2014-10-24 15:17:46 UTC
I have looked at argparse, and there doesn't seem to be any sane way how to make it format the help page with "option=VALUE" syntax.

So probably the easiest way is to include a note in `liveinst --help` output. Not everybody will notice that, but once things don't work for them, there's a high chance they'll look into documentation a few more times and see the warning. It's definitely better than nothing.

Here's a patch:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst
index 7f67e38..db4bb44 100755
--- a/data/liveinst/liveinst
+++ b/data/liveinst/liveinst
@@ -18,6 +18,13 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+if [[ "$*" =~ "--help" ]]; then
+    echo 'PLEASE NOTE: When executed through the `liveinst` wrapper, all long option names'
+    echo 'have to be separated from their values with an `=` sign, not a space, despite of'
+    echo 'what the documentation claims. I.e. `--option=VALUE`, not `--option VALUE`.'
+    echo '********************************************************************************'
+fi
+
 LIVE_INSTALL=0
 IMAGE_INSTALL=0
 RESCUE=0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In case bugzilla wrapped the lines improperly, it's also here:
http://paste.fedoraproject.org/144894/

Thanks.

Comment 16 Brian Lane 2014-10-28 00:18:53 UTC
It is better to just catch this in liveinst and tell the user the right format.

Comment 17 Brian Lane 2014-10-28 00:19:23 UTC
Created attachment 951197 [details]
patch to tell user about --updates=<url>

Comment 18 Brian Lane 2014-10-28 17:09:27 UTC
liveinst --update <url> will now complain to the user and exit the script. We can backport this for f21 after beta if we want to.

Comment 19 Kamil Páral 2014-11-03 14:09:28 UTC
Thanks a lot.

Comment 20 Fedora Update System 2014-11-11 21:02:43 UTC
anaconda-21.48.14-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/anaconda-21.48.14-1.fc21

Comment 21 Fedora Update System 2014-11-13 18:16:54 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:
https://admin.fedoraproject.org/updates/FEDORA-2014-14928/python-blivet-0.61.9-1.fc21,anaconda-21.48.14-1.fc21
then log in and leave karma (feedback).

Comment 22 Fedora Update System 2014-11-15 09:16:00 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.


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