From fa7b60d5269cb76c4205b4709bd3048e14b9a0c7 Mon Sep 17 00:00:00 2001 From: Jay Faulkner Date: Mon, 15 Sep 2014 14:39:57 -0700 Subject: Fix bug 1338614 util.log_time()'s return value was what was being sent to fork_cb. This means the resize ran in parallel and the call to fork_cb threw a traceback (trying to call Nonetype). By permitting fork_cb to take kwargs, and using the correct method syntax, this now forks and resizes in the background as appropriate. --- cloudinit/config/cc_resizefs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit/config/cc_resizefs.py') diff --git a/cloudinit/config/cc_resizefs.py b/cloudinit/config/cc_resizefs.py index 667d5977..a6280e6c 100644 --- a/cloudinit/config/cc_resizefs.py +++ b/cloudinit/config/cc_resizefs.py @@ -154,8 +154,8 @@ def handle(name, cfg, _cloud, log, args): # Fork to a child that will run # the resize command util.fork_cb( - util.log_time(logfunc=log.debug, msg="backgrounded Resizing", - func=do_resize, args=(resize_cmd, log))) + util.log_time, logfunc=log.debug, msg="backgrounded Resizing", + func=do_resize, args=(resize_cmd, log)) else: util.log_time(logfunc=log.debug, msg="Resizing", func=do_resize, args=(resize_cmd, log)) -- cgit v1.2.3