"Unable to successfully execute post-install.sh" error while patching vCenter Server Appliance 6.5
search cancel

"Unable to successfully execute post-install.sh" error while patching vCenter Server Appliance 6.5

book

Article ID: 338229

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

  • Patching vCenter Server Appliance 6.5 fails during stage 2 while executing post installation scripts.
  • In the /var/log/vmware/applmgmt/software-package.log file, the following entries are seen:

[56914]DEBUG:vmware.vherd.base.extensibility.script_executor:Script hook 'update_script:PatchHook' failed. Exception
Traceback (most recent call last):
File "/usr/lib/applmgmt/base/py/vmware/vherd/base/extensibility/script_executor.py", line 61, in executeHook
executionResult = scriptExtension(args)
File "/usr/lib/applmgmt/base/py/vmware/update/extensions.py", line 103, in __call__
result = self.extension(*args)\
File "/usr/lib/applmgmt/base/py/vmware/update/extensions.py", line 120, in _func
return func(*args)
File "/storage/core/software-packages/scripts/update_script_day0_patching.py", line 245, in patch
raise InternalError("Unable to successfully execute post-install.sh")
InternalError: Unable to successfully execute post-install.sh

[52259]DEBUG:vmware.vherd.base.software_update:Failed to execute /storage/core/software-packages/scripts/update_script.py:PatchHook. Exception: Traceback (most recent call last):

File "/usr/lib/applmgmt/base/py/vmware/vherd/base/software_update.py", line 1091, in _runScriptHook
result = scriptExecutor.executeHook(updateScript, hook, specs)
File "/usr/lib/applmgmt/base/py/vmware/vherd/base/extensibility/script_executor_processor.py", line 71, in executeHook
raise ex
InternalError: Unable to successfully execute post-install.sh

  • In the messages log, the following is seen:

 photon-machine sendmail[57082]: My unqualified host name (photon-machine) unknown; sleeping for retry
 photon-machine sendmail[41255]: unable to qualify my own domain name (photon-machine) -- using short name
 photon-machine systemd[1]: sendmail.service: Start operation timed out. Terminating.
 photon-machine systemd[1]: Failed to start Sendmail Mail Transport Agent.
 photon-machine systemd[1]: sendmail.service: Unit entered failed state.
 photon-machine systemd[1]: sendmail.service: Failed with result 'timeout'.

 

Environment

VMware vCenter Server Appliance 6.5.x

Cause

This issue occurs when:

  • Post Install script during patching triggers the below function:

update sendmail.cf post patch
if [ $deploymentType == 'embedded' -o $deploymentType == 'management' ]
then
/usr/lib/vmware-vpx/config_sendmail.sh
fi

 

  • Sendmail is dependent on other binaries which is provided by same package and one of them (newaliases) requires FQDN configured hostname to succeed.
  • FQDN is missing in the /etc/hosts file.

Resolution

To resolve this issue, verify DNS and reboot the appliance to regenerate the /etc/hosts file.

Workaround:
To work around this issue, set the FQDN manually by editing the /etc/hosts file and retry the update.

Attachments

Failure Snippet.jpg get_app
Failure Snippet get_app