Hi Tony, It's been a while since we discussed this. I finally got time to structure the code well enough to run the experiment. Please see my comments inline.
On 10/09/09 08:51, Tony Nguyen wrote: > Karen Tung wrote: >> Tony Nguyen wrote: >>>>> >>>>>> We are not sure what to do with item 3. In the discussion thread >>>>>> above, I mentioned we >>>>>> can do this as a special case in one of the LiveCD/AI boot up SMF >>>>>> script. >>>>>> Is there a better way to do it? >>>>> Is it possible to leave the symlink creation to manifest-import? I >>>>> can't imagine a significant performance issue with generating a >>>>> single symlink? >>>>> >>>> The Live CD does not run manifest-import at all at boot time. At >>>> the time when >>>> the Live CD is constructed, we dummy out the start method for the >>>> manifest-import script >>>> so it won't run when the Live CD boots up. If we were to enable >>>> running this script >>>> at boot up, I assume it will not just create that one single >>>> symlink and apply the platform.xml profile. >>>> It will probably do many things too. Is that a correct >>>> assumption? If so, we really >>>> can't run manifest-import at LiveCD start up. Any other suggestions? >>> >>> manifest-import script is responsible for many tasks but only carry >>> out necessary operations. The operations that consume time are those >>> making changes to repository and in your case is minimal as there's >>> no import or cleanup. >>> >>> That said, instead of dummy out the start method, we can put the >>> profile application section into a function and add an option to >>> manifest-import script to run only that function. During the liveCD >>> construction process would modify the start method to invoke >>> manifest-import with the new option. Others may have additional ideas. >>> >>> -tony >>> >> Hi Tony, >> >> Assuming we take the approach to put the profile application into a >> function, would that function only apply one profile or >> all the profiles manifest-import normally applies? If it applies all >> of them, then, it doesn't make sense for profiles >> to be applied during the Live CD's construction time, since there's >> no check to see whether profile x has already been applied, >> so, we will skip profile x. Is that correct? >> > I'm not quite clear what you meant by 'all'. Currently, profile > application in section three applies generic and platform profiles. We > were discussing the platform profile symlink so suggestion was to make > the code responsible for this be a function. The script also applies > site profile in section 5, after upgrade handling. During image construction time, DC currently applies the profiles in the following order: 1) generic 2) platform 3) Live CD specific profile 4) site profile So, if we were to introduce a special option to apply the platform profile at boot time, I want to clarify whether specifying the option will only create the symlink and apply the platform profile at boot time. I would still apply the 3 other profiles at image construction time. > >> I will take Dave's suggestion to do some experiment with running >> manifest-import at LiveCD boot time. >> During the Live CD construction process, I will only import the >> manifests. Then, I will enable manifest-import >> to run during boot time. Since all the manifests are already >> imported, I assume the current manifest-import >> script will just do the profile applications. I will also put the >> special profiles that need to be applied for the LiveCD >> as the site specific profile (/var/svc/profile/site.xml) for this >> test. If this experiment shows that it >> does not affect boot time, and we decide to go with this route, we >> might need the added >> functionality in profile application to apply more than one "special" >> profiles. >> > Yes, experiment is definitely worthwhile. > I did the experiement of enabling manifest-import at LiveCD boot time. I found that enabling manifest-import at LiveCD boot time would cause all the SMF services to be imported, even though they are already imported during image construction time. Obviously, this greatly slowed down the LiveCD boot time. Here are the numbers just for reference. Boot time is measured from the time I select the option in the grub menu, to the time the GDM login screen comes up. Dell Latitude Laptop, 1G of memory: - manifest-import disabled: 2 min 56 sec - manifest-import enabled: 3 min 46 sec VirtualBox, 1G memory allocated: - manifest-import disabled: 2 min 52 sec - manifest-import enabled: 7 min 15 sec Given these numbers, it likes enabling manifest-import is not an option. Thanks, --Karen
