Prior to this patch, if the openssl command returned a zero exit code
and wrote details to stderr, nova would raise a RuntimeError exception.
This patch changes the behavior to only raise a RuntimeError exception
when openssl returns a non-zero exit code. Regardless of the exit code
a warning will always be logged with stderr details if stderr is not
None. Note that processutils.execute will now raise a
processutils.ProcessExecutionError exception for any non-zero exit code
since we are passing check_exit_code=True, which we convert to a
Runtime error.
Thanks to Dimitri John Ledkov <email address hidden> and Eric Fried
<email address hidden> for helping with this patch.
Conflicts: nova/virt/xenapi/agent.py
NOTE(coreycb): The conflict is due to
Ibe2f478288db42f8168b52dfc14d85ab92ace74b not being in stable/queens.
Change-Id: I212ac2b5ccd93e00adb7b9fe102fcb70857c6073
Partial-Bug: #1771506
(cherry picked from commit 1da71fa4ab1d7d0f580cd5cbc97f2dfd2e1c378a)
(cherry picked from commit 64793cf6f77c5ba7c9ea51662d936c7545ffce8c)
(cherry picked from commit 82de38ad4ce86c5398538a8635713a86407216d0)
Reviewed: https:/ /review. opendev. org/656308 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=5b0adaa0ca5 f757bb224d1ffac 0c6705b03ee2ed
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 5b0adaa0ca5f757 bb224d1ffac0c67 05b03ee2ed
Author: Corey Bryant <email address hidden>
Date: Thu Feb 7 10:12:54 2019 -0500
xenapi/agent: Change openssl error handling
Prior to this patch, if the openssl command returned a zero exit code execute will now raise a s.ProcessExecut ionError exception for any non-zero exit code code=True, which we convert to a
and wrote details to stderr, nova would raise a RuntimeError exception.
This patch changes the behavior to only raise a RuntimeError exception
when openssl returns a non-zero exit code. Regardless of the exit code
a warning will always be logged with stderr details if stderr is not
None. Note that processutils.
processutil
since we are passing check_exit_
Runtime error.
Thanks to Dimitri John Ledkov <email address hidden> and Eric Fried
<email address hidden> for helping with this patch.
Conflicts:
nova/virt/ xenapi/ agent.py
NOTE(coreycb): The conflict is due to db42f8168b52dfc 14d85ab92ace74b not being in stable/queens.
Ibe2f478288
Change-Id: I212ac2b5ccd93e 00adb7b9fe102fc b70857c6073 f580cd5cbc97f2d fd2e1c378a) 7c9ea51662d936c 7545ffce8c) 398538a8635713a 86407216d0)
Partial-Bug: #1771506
(cherry picked from commit 1da71fa4ab1d7d0
(cherry picked from commit 64793cf6f77c5ba
(cherry picked from commit 82de38ad4ce86c5