From 1bd29beb098338f46052152ae747e857bacba3b1 Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Fri, 14 Sep 2018 14:16:01 +0200 Subject: [PATCH 1/6] Added --yes to final cache creation. --- lvcache/lvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvcache/lvm.py b/lvcache/lvm.py index 5613d58..d4859b6 100644 --- a/lvcache/lvm.py +++ b/lvcache/lvm.py @@ -111,7 +111,7 @@ def remove_cache_pool(self): self.log.info(line.strip()) def attach_cache_pool(self, cache_lv): - lvconvert('--type', 'cache', + lvconvert('--yes', '--type', 'cache', '--cachepool', '%s/%s' % (cache_lv.vg.name, cache_lv.name), '%s/%s' % (self.vg.name, self.name)) From f188a0571050349845dd797f6daec7b12c3f6cfe Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Tue, 21 Jan 2020 22:05:23 +0100 Subject: [PATCH 2/6] Merge "dictionary changed size during iteration" fix. from https://github.com/larsks/lvcache/pull/14/files --- lvcache/lvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvcache/lvm.py b/lvcache/lvm.py index d4859b6..9a571d4 100644 --- a/lvcache/lvm.py +++ b/lvcache/lvm.py @@ -93,7 +93,7 @@ def cache_status(self): status = dict(zip(cache_status_fields, status.strip().split()[:len(cache_status_fields)])) - for k in status.keys(): + for k in list(status.keys()): if status[k].isdigit(): status[k] = int(status[k]) elif '/' in status[k]: From 2495a840af9754bdaba9fc7714a0fad1675fa69c Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Wed, 22 Jan 2020 10:42:58 +0100 Subject: [PATCH 3/6] Ignore build and dist. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e360a4a..6ea59e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.py[co] *.egg-info setup.cfg +/build/ +/dist/ From 380c4536b11b7b3d7836cbfc4a55f0fc50ba284c Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Wed, 22 Jan 2020 10:44:00 +0100 Subject: [PATCH 4/6] Add eclipse support. --- .project | 17 +++++++++++++++++ .pydevproject | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 .project create mode 100644 .pydevproject diff --git a/.project b/.project new file mode 100644 index 0000000..0a0e3e9 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + lvcache + + + + + + org.python.pydev.PyDevBuilder + + + + + + org.python.pydev.pythonNature + + diff --git a/.pydevproject b/.pydevproject new file mode 100644 index 0000000..ad74947 --- /dev/null +++ b/.pydevproject @@ -0,0 +1,8 @@ + + + +/${PROJECT_DIR_NAME} + +python interpreter +Default + From 304b741ac9e0cfec3e1bc696ef0a9246d6ebf65f Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Wed, 22 Jan 2020 11:13:27 +0100 Subject: [PATCH 5/6] Make adjust work with python3. --- lvcache/cmd_create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvcache/cmd_create.py b/lvcache/cmd_create.py index 489b654..2ff2ff7 100644 --- a/lvcache/cmd_create.py +++ b/lvcache/cmd_create.py @@ -7,7 +7,7 @@ def adjust_512(num): - return 512 * (num/512) + return 512 * int(num/512) class Create(Command): From ef79a823f9ce573358e9f765ce58c28bc8bdb380 Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Wed, 22 Jan 2020 11:46:43 +0100 Subject: [PATCH 6/6] Update version. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 747d8f2..83615e5 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name='lvcache', - version='1.0.1', + version='1.0.2', description='Wrapper for creating cached LVM logical volumes', author='Lars Kellogg-Stedman', author_email='lars@oddbit.com',