ubuntu template should fail on error
Bug #922645 reported by
Serge Hallyn
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Serge Hallyn | ||
Oneiric |
Fix Released
|
High
|
Unassigned |
Bug Description
lxc-create should fail if parts of the ubuntu container setup failed.
TEST CASE:
1. make sure /var/cache/lxc is empty
2. lxc-create -n test -t ubuntu -- oneiric
3. edit /var/cache/
4. lxc-create -n test2 -t ubuntu -- oneiric
5. verify exit code is 0 (echo $?)
6. chroot /var/lib/
7. lxc-destroy -n test2
7. Install updated lxc
8. Repeat step 4
9. verify exit code is not 0
Related branches
lp:~serge-hallyn/ubuntu/precise/lxc/fix-resolvconf
- Stéphane Graber: Pending requested
-
Diff: 1246 lines (+1155/-3)10 files modified.pc/0030-ubuntu-template-fail.patch/templates/lxc-ubuntu.in (+541/-0)
.pc/0031-ubuntu-template-resolvconf.patch/templates/lxc-ubuntu.in (+543/-0)
.pc/applied-patches (+2/-0)
debian/changelog (+12/-0)
debian/control (+1/-1)
debian/lxcguest.lxcmount.upstart (+2/-1)
debian/patches/0030-ubuntu-template-fail.patch (+20/-0)
debian/patches/0031-ubuntu-template-resolvconf.patch (+25/-0)
debian/patches/series (+2/-0)
templates/lxc-ubuntu.in (+7/-1)
Changed in lxc (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
description: | updated |
To post a comment you must log in.
lxc-create does a good job now of cleaning up after failures. So just adding 'set -e' to the top of lxc-ubuntu seems to be working for me.