Skip to content

Inline comment breaks "disable_vmware_customization" check #763

@fluggelgleckheimlen

Description

@fluggelgleckheimlen

Describe the bug

The regex check for "disable_vmware_customization" is too strict and fails when there are inline comments after the flag. As a result, the cloud-init workflow doesn't start:
https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/libDeployPkg/linuxDeploymentUtilities.c#L205
You should relax the check from matching only whitespace (\s*$) to any characters (.*$), since YAML allows inline comments.

Reproduction steps

  1. Add the following line to /etc/cloud/cloud.cfg:
    disable_vmware_customization: false # UseCloudInitWorkflow
  2. Customize the VM, start it, and see an error during customization.
  3. Check the cloud-init status in the VM logs. It will return 4 instead of 0:
    grep UseCloudInitWorkflow /var/log/vmware-imc/toolsDeployPkg.log

Expected behavior

Customization succeedes with the cloud-init workflow.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions