On 06/15/12 17:34, Dan Price wrote:

Greetings,

I apologize for the rush, but would appreciate comments as soon as
possible.  Hopefully this should not be lengthy, as the changes are
simple to review.

In the very near future I will be integrating changes into the IPS gate
which substantially improve and rework the progress tracking we do in the
packaging system.  In the course of discussing these changes with Ethan he
suggested that I should have the AI team review the output changes I am
making.  So that is part 1 of this request.

This bugfix also represents an API boundary; we need to make
corresponding changes in Caiman in order to cope with the new API.
That is part 2 of this request.

Part 1: Output Changes
----------------------
Caiman will no longer carry around its own subclasses of the progress
trackers.  It will simply hook up existing progress trackers as needed,
and the packaging system will do the rest.  The new code provides a
superior user experience for the CLI progress tracker, including:

    - visibility into the different phases of planning.
    - visibility into manifest fetching.
    - monitoring of download phase percentage progress,
      megabytes downloaded, and an estimate of download speed.
    - monitoring of action execution.
    - information at the end of each phase about how long the
      phase took.

The item that Ethan thought most significant is that we no longer print
the name of each package as it is downloaded.  I understand that some
admins may wish to see this information, and so I have modified the AI
code so that, at the DEBUG log level, it prints the installation plan to
the *log* (not to the screen) before commencing the download.  This is
similar to the way you can get the pkg plan by passing -v to pkg
subcommands, although I simplified the output format (it's all of 3
lines of code).

[As an aside; in the future we may not download packages one-at-a-time,
so I would discourage this anyway]

Ethan encouraged me to post the output printed to the console when
performing a bare-metal install.  Keep in mind that the periodic output
you see below is currently dumped every 20 seconds (which you can very
by looking at the timestamps); however, that's a configurable parameter,
and I'm happy to tune it to whatever you prefer-- I personally felt that
3 times a minute was the outer limit to "keep the admin warm."-- a
nice balance between not spamming the terminal and not freaking out
the user.

As before, output will also go to the log.  Ethan and I worked together
to ensure that nothing changes except for the format of the messages.

The output from doing a bare-metal install is attached as a text file
to this message.  The corresponding log file is also attached; look for
the string "Installation Plan" to see the new output.  I have gzipped it,
as it is large.

The output for installing a zone or when using DC uses the fancy progress
tracker, just as before, and is largely the same as before.  It has
been cleaned up and is much richer.  There's nothing there to review.

Part 2: Code Changes
--------------------
Code which implements the changes is posted here:

https://cr.opensolaris.org/action/browse/pkg/dp/pkg-progress-ai/


Code in ips.py seems fine.

However, a problem I see is that the InstallCLIProgressTracker you're removing has one other consumer,

http://src.opensolaris.org/source/xref/caiman/slim_source/usr/src/lib/install_ict/cleanup_cpio_install.py#203

which you'll only see used by interactive installers as part of the cleanup of the installed image after copying from media. Should be relatively easy to change to use the same debug logging as in AI, as it's only going into the logs.

Dave


The 15 or so lines of replacement code is annoyingly complicated-- the
dance of loglevels is a pain-- but I believe it mirrors exactly the way
the code worked before my putback, and of course I am testing it.  I would
encourage the install team to fix this code in the future-- it should
not be the case that "sometimes a message is DEBUG and sometimes it is
INFO," but that's another wad for another day.

The progress tracking wad is posted below as reference materials; I am not
requesting comment on that work in this thread; that code is still
undergoing minor changes in response to codereview feedback.

https://cr.opensolaris.org/action/browse/pkg/dp/pkg-progress/

Thanks for your attention and help.  Thanks especially to Ethan,
without whom I would be sunk.

        -dp




_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to