Public bug reported: 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 ** Affects: cloud-init Importance: High Assignee: Chad Smith (chad.smith) Status: In Progress ** Description changed: 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) + 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: + 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 ** Changed in: cloud-init Importance: Undecided => High ** Changed in: cloud-init Assignee: (unassigned) => Chad Smith (chad.smith) ** Changed in: cloud-init Status: New => In Progress -- 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: In Progress 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp