summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorChris Patterson <cpatterson@microsoft.com>2023-03-31 11:17:10 -0400
committerGitHub <noreply@github.com>2023-03-31 10:17:10 -0500
commit2a61a589fc0145314a61a31df4fd71c4639c0154 (patch)
treef479d6be3d25086668e60e6b640cf4c5144a0b68 /cloudinit
parentb33d528e132de53933d3e4d6900e0a298ea6dec0 (diff)
downloadcloud-init-git-2a61a589fc0145314a61a31df4fd71c4639c0154.tar.gz
config/cc_resizefs: fix do_resize arguments (#2106)
Daily PPA builds were crashing due to refactor: stop passing log instances to cc_* handlers (#2016). When dropping the logger argument, the tuple became a list which then gets expanded in the call to do_resize() and crashes. ``` Traceback (most recent call last):   File "/usr/lib/python3/dist-packages/cloudinit/config/modules.py", line 257, in _run_modules     run_name, mod.handle, func_args, freq=freq   File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 67, in run     return self._runners.run(name, functor, args, freq, clear_on_fail)   File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 172, in run     results = functor(**args)   File "/usr/lib/python3/dist-packages/cloudinit/config/cc_resizefs.py", line 309, in handle     args=(resize_cmd),   File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2722, in log_time     ret = func(*args, **kwargs) TypeError: do_resize() takes 1 positional argument but 2 were given ``` Restore args as a tuple. Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_resizefs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/config/cc_resizefs.py b/cloudinit/config/cc_resizefs.py
index 1ef0f475..ecb54e80 100644
--- a/cloudinit/config/cc_resizefs.py
+++ b/cloudinit/config/cc_resizefs.py
@@ -299,14 +299,14 @@ def handle(name: str, cfg: Config, cloud: Cloud, args: list) -> None:
logfunc=LOG.debug,
msg="backgrounded Resizing",
func=do_resize,
- args=(resize_cmd),
+ args=(resize_cmd,),
)
else:
util.log_time(
logfunc=LOG.debug,
msg="Resizing",
func=do_resize,
- args=(resize_cmd),
+ args=(resize_cmd,),
)
action = "Resized"