Enabling Async Patch tool Fails at - FAILED_VCF_PERMISSIONS_ON_SDDC_OUTPUT_DIRECTORY
search cancel

Enabling Async Patch tool Fails at - FAILED_VCF_PERMISSIONS_ON_SDDC_OUTPUT_DIRECTORY

book

Article ID: 380592

calendar_today

Updated On:

Products

VMware SDDC Manager

Issue/Introduction

Enabling Async patch tool fails with the ERROR -  FAILED_VCF_PERMISSIONS_ON_SDDC_OUTPUT_DIRECTORY

When enabling the Async Patch Tool  as a vcf user  the ERROR is as shown below 

Enter SDDC Manager Root User's Password:
2024-10-24 09:47:33.164 [INFO ] Performing chmod 755 permissions to Output Directory /nfs/vmware/vcf/nfs-mount/apToolBundles
2024-10-24 09:47:40.367 [ERROR] Performing 755 permissions to Output Directory /nfs/vmware/vcf/nfs-mount/apToolBundles failed with error.
2024-10-24 09:47:40.390 [ERROR] Error while initiating required functionality: ENABLE_ASYNC_PATCH
2024-10-24 09:47:40.402 [ERROR] FAILED_VCF_PERMISSIONS_ON_SDDC_OUTPUT_DIRECTORY
-- Error Message: Failed executing vcf 755 permissions on SDDC Output directory.
-- Remedy: Please ensure that output directory have permissions as a VCF user.
Exception in thread "main" com.vmware.evo.sddc.lcm.model.error.LcmException: Failed executing vcf 755 permissions on SDDC Output directory.
        at com.vmware.evo.sddc.lcm.tools.asyncpatch.RootAccessUtil.setVCFReadExecutePermissionsOnOutputDirectory(RootAccessUtil.java:96)
        at com.vmware.evo.sddc.lcm.tools.asyncpatch.RootAccessUtil.generateRootSpec(RootAccessUtil.java:182)
        at com.vmware.evo.sddc.lcm.tools.asyncpatch.AsyncPatchToolMain.process(AsyncPatchToolMain.java:230)
        at com.vmware.evo.sddc.lcm.tools.asyncpatch.AsyncPatchToolConfig.main(AsyncPatchToolConfig.java:232)
Caused by: com.vmware.evo.sddc.lcm.model.error.LcmException: Running the following command(s) as su user has failed : chown -R vcf:vcf /nfs/vmware/vcf/nfs-mount/apToolBundles && chmod -R 755 /nfs/vmware/vcf/nfs-mount/apToolBundles
        at com.vmware.evo.sddc.lcm.tools.common.CommandRunnerUtil.runLocalCommandWithSu(CommandRunnerUtil.java:117)
        at com.vmware.evo.sddc.lcm.tools.asyncpatch.RootAccessUtil.setVCFReadExecutePermissionsOnOutputDirectory(RootAccessUtil.java:87)
        ... 3 more
Caused by: java.lang.RuntimeException: Received non-empty output for command that expect empty output
        at com.vmware.evo.sddc.lcm.tools.common.FileUtils.runCommandAsRoot(FileUtils.java:143)
        at com.vmware.evo.sddc.lcm.tools.common.FileUtils.runCommandAsRoot(FileUtils.java:97)
        at com.vmware.evo.sddc.lcm.tools.common.CommandRunnerUtil.runLocalCommandWithSu(CommandRunnerUtil.java:114)
        ... 4 more

Environment

VMware Cloud Foundation

Cause

Setting the following permission Running the following command(s) as su user has failed : chown -R vcf:vcf /nfs/vmware/vcf/nfs-mount/apToolBundles && chmod -R 755 /nfs/vmware/vcf/nfs-mount/apToolBundles as a root user has failed . The output has to be empty but provides a value as mentioned - Received non-empty output for command that expect empty output

Resolution

 

    • Take a snapshot of SDDC manager
    • Take an SSH to SDDC manager as vcf user and followed by root user.
    • Run the following commands to change the root password to something new
    • To remove any lockouts for user root
      • VCF 4.x lockouts -pam_tally2 -u root -r
      • VCF 5.x /usr/sbin/faillock --user root --reset
    • To change the password to a new one - passwd root

If there is a need to change the password back to old one, Follow the steps below  

    • To clear the old password traces
      • vi /etc/security/opasswd
      • Clear the opasswd file
    • Once the file is saved change the password of root back to old one  - passwd root
    • Now as a vcf user run the async patch tool enable command.