Description of problem: In vdsm %posttrans scriplet, all errors are hidden. This make it impossible to debug install or upgrade issues. All errors must be logged to stderr. Host deploy scripts should propagate errors during install or upgrade to engine event log. %posttrans if [ -f "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" ]; then # removing temporary files at first to avoid leaving upgrade leftovers /bin/rm -f "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version" if [ -f "%{_localstatedir}/lib/%{vdsm_name}/vdsmd_start_required" ]; then vdsmd_start_required='yes' /bin/rm -f "%{_localstatedir}/lib/%{vdsm_name}/vdsmd_start_required" /bin/systemctl stop vdsmd >/dev/null 2>&1 || : fi if [ -f "%{_localstatedir}/lib/%{vdsm_name}/supervdsmd_start_required" ]; then supervdsmd_start_required='yes' /bin/rm -f "%{_localstatedir}/lib/%{vdsm_name}/supervdsmd_start_required" /bin/systemctl stop supervdsmd >/dev/null 2>&1 || : fi if /bin/systemctl status vdsm-network >/dev/null 2>&1; then /bin/systemctl stop vdsm-network >/dev/null 2>&1 || : fi if ! %{_bindir}/vdsm-tool is-configured >/dev/null 2>&1; then %{_bindir}/vdsm-tool configure --force >/dev/null 2>&1 fi if [ "${supervdsmd_start_required}" = 'yes' ]; then /bin/systemctl start supervdsmd >/dev/null 2>&1 || : fi if [ "${vdsmd_start_required}" = 'yes' ]; then /bin/systemctl start vdsmd >/dev/null 2>&1 || : fi fi exit 0 Version-Release number of selected component (if applicable): Issues exists since: commit 45f60872674efccfe6f945fc1e1a451a1da52e4a Adding reconfigure libvirt to vdsm upgrade flow How reproducible: Always Steps to Reproduce: 1. Simulate failure in vdsm-tool configure by modifying one of the configuratiors to fails. 2. Install or upgrade vdsm Actual results: Error in vdsm-tool configure is hidden Expected results: All errors during %posttrans scriptlet must be logged. Additional info: See bug 2013383 - could be much easier to handle if error was not hidden.
Steps: 1) add break stuff to vdsm-tool code 2) add the RPM to host 3) run reinstall/install host Results: ``` "stderr_lines" : [ "Traceback (most recent call last):", " File \"/usr/bin/vdsm-tool\", line 226, in <module>", " sys.exit(main())", " File \"/usr/bin/vdsm-tool\", line 169, in main", " raise Exception(\"test error\")", "Exception: test error" ], ``` Error message is present in the logs and can be used for debug purposes. Verified in: vdsm-4.50.0.13-1.el8ev.x86_64
This bugzilla is included in oVirt 4.5.1 release, published on June 22nd 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.