diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-09-02 15:08:52 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-09-02 15:08:52 +0300 |
commit | 4bb550ec48a0b2842b540c5970fc4b3802b97ffc (patch) | |
tree | 53a505df2a68a591a3217ceba25e60c88e586822 | |
parent | ab3cbc976d5879c86f8fc04b1e33e7ea245c617d (diff) | |
download | vmdb2-4bb550ec48a0b2842b540c5970fc4b3802b97ffc.tar.gz |
Change: don't vgremove and pvremove when cleaning up
-rw-r--r-- | lvm2.vmdb | 4 | ||||
-rw-r--r-- | vmdb/plugins/apt_plugin.py | 6 | ||||
-rw-r--r-- | vmdb/plugins/lvm2_plugin.py | 11 |
3 files changed, 15 insertions, 6 deletions
@@ -33,13 +33,15 @@ steps: size: 1G - mkfs: ext2 - partition: /boot + partition: boot - mkfs: ext4 partition: rootfs - mount: /boot + - mount: /boot + - mount: rootfs - unpack-rootfs: rootfs diff --git a/vmdb/plugins/apt_plugin.py b/vmdb/plugins/apt_plugin.py index 92b6378..97a7d87 100644 --- a/vmdb/plugins/apt_plugin.py +++ b/vmdb/plugins/apt_plugin.py @@ -64,6 +64,12 @@ class AptStepRunner(vmdb.StepRunnerInterface): vmdb.runcmd_chroot( mount_point, argv_prefix + + ['apt-get', 'update'], + env=env) + + vmdb.runcmd_chroot( + mount_point, + argv_prefix + ['apt-get', '-y', '--no-show-progress', 'install'] + packages, env=env) diff --git a/vmdb/plugins/lvm2_plugin.py b/vmdb/plugins/lvm2_plugin.py index 405398c..356223b 100644 --- a/vmdb/plugins/lvm2_plugin.py +++ b/vmdb/plugins/lvm2_plugin.py @@ -45,12 +45,13 @@ class VgcreateStepRunner(vmdb.StepRunnerInterface): vmdb.runcmd(['vgcreate', vgname] + physical) def teardown(self, step, settings, state): - vgname = self.get_vg(step) - physical = self.get_pv(step, state) + return + # vgname = self.get_vg(step) + # physical = self.get_pv(step, state) - vmdb.runcmd(['vgremove', '--force', vgname]) - for phys in physical: - vmdb.runcmd(['pvremove', phys]) + # vmdb.runcmd(['vgremove', '--force', vgname]) + # for phys in physical: + # vmdb.runcmd(['pvremove', phys]) def get_vg(self, step): return step['vgcreate'] |