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/
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
--
Daniel Price, Solaris Kernel Engineering
13:19:44 Install Log: /system/volatile/install_log 13:19:44 Using XML Manifest: /system/volatile/ai.xml 13:19:44 Using profile specification: /system/volatile/profile 13:19:44 Starting installation. 13:19:45 0% Preparing for Installation 13:19:45 100% manifest-parser completed. 13:19:45 0% Preparing for Installation 13:19:46 1% Preparing for Installation 13:19:46 2% Preparing for Installation 13:19:47 3% Preparing for Installation 13:19:47 4% Preparing for Installation 13:19:51 7% target-discovery completed. 13:19:51 Selected Disk(s) : c3t0d0 13:19:51 13% target-selection completed. 13:19:51 17% ai-configuration completed. 13:19:51 19% var-share-dataset completed. 13:20:01 21% target-instantiation completed. 13:20:01 21% Beginning IPS transfer 13:20:01 Creating IPS image 13:20:29 Startup: Retrieving catalog 'solaris' ... Done 13:20:37 Startup: Caching catalogs ... Done 13:20:37 Startup: Refreshing catalog 'solaris' ... Done 13:20:37 Installing packages from: 13:20:37 solaris 13:20:37 origin: http://ipkg.us.oracle.com/solaris11/dev/ 13:20:38 Startup: Refreshing catalog 'solaris' ... Done 13:20:42 Planning: Solver setup ... Done 13:20:43 Planning: Running solver ... Done 13:20:43 Planning: Finding local manifests ... Done 13:20:43 Planning: Fetching manifests: 0/498 0% complete 13:20:56 Planning: Fetching manifests: 498/498 100% complete 13:21:03 Planning: Package planning ... Done 13:21:03 Planning: Merging actions ... Done 13:21:05 Planning: Checking for conflicting actions ... Done 13:21:06 Planning: Consolidating action changes ... Done 13:21:06 Planning: Evaluating mediators ... Done 13:21:08 Planning: Planning completed in 29.73 seconds 13:21:08 Please review the licenses for the following packages post-install: 13:21:08 runtime/java/jre-7 (automatically accepted) 13:21:08 consolidation/osnet/osnet-incorporation (automatically accepted, 13:21:08 not displayed) 13:21:08 Package licenses may be viewed using the command: 13:21:08 pkg info --license <pkg_fmri> 13:21:08 Download: 0/64283 items 0.0/538.5MB 0% complete 13:21:28 Download: 3749/64283 items 19.1/538.5MB 3% complete (1.0M/s) 13:21:48 Download: 6389/64283 items 66.7/538.5MB 12% complete (1.5M/s) 13:22:08 Download: 9085/64283 items 92.0/538.5MB 17% complete (917k/s) 13:22:28 Download: 11950/64283 items 101.0/538.5MB 18% complete (798k/s) 13:22:48 Download: 14216/64283 items 127.6/538.5MB 23% complete (1.4M/s) 13:23:08 Download: 17754/64283 items 146.6/538.5MB 27% complete (740k/s) 13:23:28 Download: 21315/64283 items 160.6/538.5MB 29% complete (825k/s) 13:23:48 Download: 25102/64283 items 277.0/538.5MB 51% complete (7.7M/s) 13:24:09 Download: 30001/64283 items 312.1/538.5MB 57% complete (2.1M/s) 13:24:29 Download: 33349/64283 items 336.4/538.5MB 62% complete (919k/s) 13:24:49 Download: 35510/64283 items 345.2/538.5MB 64% complete (251k/s) 13:25:09 Download: 38056/64283 items 361.0/538.5MB 67% complete (1.2M/s) 13:25:29 Download: 41918/64283 items 387.4/538.5MB 71% complete (2.1M/s) 13:25:49 Download: 46191/64283 items 404.2/538.5MB 75% complete (545k/s) 13:26:09 Download: 49060/64283 items 444.4/538.5MB 82% complete (2.5M/s) 13:26:29 Download: 51565/64283 items 465.4/538.5MB 86% complete (599k/s) 13:26:49 Download: 54089/64283 items 500.1/538.5MB 92% complete (1.6M/s) 13:27:09 Download: 59750/64283 items 513.6/538.5MB 95% complete (757k/s) 13:27:29 Download: 62050/64283 items 530.5/538.5MB 98% complete (1.1M/s) 13:27:38 Download: Completed 538.45 MB in 389.77 seconds (1.4M/s) 13:27:39 Actions: 1/87955 actions (Installing new actions) 13:27:59 Actions: 23087/87955 actions (Installing new actions) 13:28:19 Actions: 29248/87955 actions (Installing new actions) 13:28:39 Actions: 36706/87955 actions (Installing new actions) 13:28:59 Actions: 45237/87955 actions (Installing new actions) 13:29:19 Actions: 53324/87955 actions (Installing new actions) 13:29:39 Actions: 62633/87955 actions (Installing new actions) 13:29:59 Actions: 73144/87955 actions (Installing new actions) 13:30:19 Actions: 86389/87955 actions (Installing new actions) 13:30:23 Actions: Completed 87955 actions in 164.75 seconds. 13:30:24 Finalize: Updating package state database ... Done 13:30:33 Finalize: Updating image state ... Done 13:30:41 Finalize: Creating fast lookup database ... Done 13:30:48 23% generated-transfer-1868-1 completed. 13:30:49 25% initialize-smf completed. 13:30:52 Setting console boot device property to ttya 13:30:52 Disabling boot loader graphical splash 13:30:52 Installing boot loader to devices: ['/dev/rdsk/c3t0d0s1'] 13:31:03 Setting boot devices in firmware 13:31:03 35% boot-configuration completed. 13:31:03 37% update-dump-adm completed. 13:31:03 40% setup-swap completed. 13:31:04 42% device-config completed. 13:31:04 44% apply-sysconfig completed. 13:31:04 46% transfer-zpool-cache completed. 13:31:11 87% boot-archive completed. 13:31:11 89% transfer-ai-files completed. 13:31:11 99% create-snapshot completed. 13:31:11 Automated Installation succeeded. 13:31:12 You may wish to reboot the system at this time. Automated Installation finished successfully The system can be rebooted now Please refer to the /system/volatile/install_log file for details After reboot it will be located at /var/log/install/install_log
install_log.txt.gz
Description: application/gunzip
_______________________________________________ caiman-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

