yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #71722
[Bug 1755965] Re: util.subp regression: no longer accept commands as string
This is fixed in 18.1-17-g97012fbb-0ubuntu1
** Also affects: cloud-init (Ubuntu)
Importance: Undecided
Status: New
** Changed in: cloud-init (Ubuntu)
Status: New => Fix Released
** Changed in: cloud-init (Ubuntu)
Importance: Undecided => Critical
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1755965
Title:
util.subp regression: no longer accept commands as string
Status in cloud-init:
Fix Committed
Status in cloud-init package in Ubuntu:
Fix Released
Bug description:
Revision 46cb6716c27d4496ce3d2bea7684803f522f277d regressed behavior
of util.subp which now no longer accepts a string as the command to
run.
To test:
# failure path
$ python -c 'from cloudinit.util import subp; print(subp("echo hi mom", shell=True))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "cloudinit/util.py", line 1905, in subp
cmd=args)
cloudinit.util.ProcessExecutionError: Unexpected error while running command.
Command: echo hi mom
Exit code: 127
Reason: -
Stdout:
Stderr: c: 1: c: e: not found
# revert commit causing regression
$ git diff 46cb6716c27d4496ce3d2bea7684803f522f277d 46cb6716c27d4496ce3d2bea7684803f522f277d^ > patch1
$ patch -p1 < patch1
patching file cloudinit/util.py
patching file tests/unittests/test_util.py
$ python -c 'from cloudinit.util import subp; print(subp("echo hi mom", shell=True))'
(u'hi mom\n', u'')
This also caused symptoms like the following Azure failure:
LP: #1754495
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1755965/+subscriptions
References