execscript runs before many configuration steps
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
VMBuilder |
Fix Released
|
Low
|
Unassigned | ||
vm-builder (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Natty |
Won't Fix
|
Low
|
Unassigned |
Bug Description
=======
SRU Justification
1. Impact: users cannot modify grub parameters or specify NFS automount to /etc/fstab with execscript
2. Bug addressed: the bug was addressed by delaying the call to execscripts
3. Patch: See the linked bzr tree.
4. TEST CASE: Use vmbuilder with an execscript adding NFS automount to /etc/fstab.
5. Regression potential: If there were cases where users depended on execscripts running earlier (which is unlikely), their installs would break.
=======
Hi all,
--exec scripts are currently run at the end of distro install, rather than
at the end of Hypervisor.
Because it runs so early, I've had trouble:
Adding an NFS automount to /etc/fstab
Adding options to GRUB to pass to my custom kernel
Installing my own kernel package (I'd rather just use dpkg than setup
a repo, etc.)
While some of these things can be done at firstboot, kernel and grub reconfiguration can't be done, making any kernel options critical for the first boot impossible.
Similarly, network reconfiguration is difficult as most of the network configuration is done after execscript is executed.
Related branches
- Serge Hallyn: Approve
-
Diff: 22 lines (+1/-1)2 files modifiedVMBuilder/distro.py (+0/-1)
VMBuilder/hypervisor.py (+1/-0)
description: | updated |
Changed in vmbuilder: | |
status: | Confirmed → Fix Released |
description: | updated |
Changed in vm-builder (Ubuntu): | |
status: | New → Fix Released |
importance: | Undecided → Low |
Changed in vm-builder (Ubuntu Natty): | |
status: | New → Confirmed |
importance: | Undecided → Low |
tags: | added: testcase |
As a workaround for my own purpose, I've modified the execscript to be run later by just moving the call to self.callhooks( 'post_install' ) in Distro to self.distro. call_hooks( 'post_install) at the end of install_os, before unmount_partitions.
With that change, I seem to have much more control to achieve what I want with my execscript.
I'm a little new to launchpad, but I'll try to post a patch shortly to demonstrate the change.