Bug 1839662

Summary: [ESXi][RHEL8.3][cloud-init]ERROR log in cloud-init.log after clone VM on ESXi platform
Product: Red Hat Enterprise Linux 8 Reporter: ldu <ldu>
Component: cloud-initAssignee: Eduardo Otubo <eterrell>
Status: CLOSED ERRATA QA Contact: ldu <ldu>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.3CC: cavery, eterrell, huzhao, jgreguske, mrezanin, pvlasin, ribarry, vmware-gos-qa, xiachen, yacao
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: cloud-init-19.4-10.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1839619 Environment:
Last Closed: 2020-11-04 02:40:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1839619, 1855705    
Bug Blocks:    
Attachments:
Description Flags
cloud-init.log
none
cloudinitlog none

Comment 1 ldu 2020-05-25 08:26:11 UTC
After retest on RHEL8.3 compose with cloud-init-19.4-1.el8.1.noarch, after clone guest, the error log exist in cloud-init.log.
So clone this bug to RHEL8.3.

Comment 3 Rick Barry 2020-07-10 12:40:48 UTC
Setting ITR=8.3.0 and devel_ack+.

Comment 12 ldu 2020-08-18 13:17:03 UTC
Created attachment 1711721 [details]
cloud-init.log

Comment 14 ldu 2020-08-20 02:13:14 UTC
Hi Eduardo,
Retest build cloud-init-19.4-7.el8.eterrell202008191416.noarch on RHEL8.3 with kernel 4.18.0-232.el8.x86_64.
This build still not work as expected, the timezone, IP and DNS not configured right after clone VM.

There is still error and failed log in cloud-init.log.

2020-08-20 01:58:53,984 - util.py[DEBUG]: Running command ['vmware-toolbox-cmd', 'config', 'get', 'deployPkg', 'enable-custom-scripts'] with allowed return codes [0] (shell=False, capture=True)
2020-08-20 01:58:53,998 - DataSourceOVF.py[DEBUG]: Error parsing the customization Config File: name 'ProcessExecutionError' is not defined
2020-08-20 01:58:53,998 - guestcust_util.py[DEBUG]: Sending RPC command: deployPkg.update.state 4 100 /var/log/cloud-init.log
2020-08-20 01:58:53,998 - util.py[DEBUG]: Running command ['vmware-rpctool', 'deployPkg.update.state 4 100 /var/log/cloud-init.log'] with allowed return codes [0] (shell=False, capture=True)
2020-08-20 01:58:54,001 - util.py[DEBUG]: Recursively deleting /var/run/vmware-imc
2020-08-20 01:58:54,001 - handlers.py[DEBUG]: finish: init-local/search-OVF: FAIL: no local data found from DataSourceOVF
2020-08-20 01:58:54,001 - util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceOVF.DataSourceOVF'> failed
2020-08-20 01:58:54,001 - util.py[DEBUG]: Getting data from <class 'cloudinit.sources.DataSourceOVF.DataSourceOVF'> failed
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/vmware/imc/guestcust_util.py", line 139, in get_tools_config
    (outText, _) = util.subp(cmd)
  File "/usr/lib/python3.6/site-packages/cloudinit/util.py", line 2084, in subp
    cmd=args)
cloudinit.util.ProcessExecutionError: Unexpected error while running command.
Command: ['vmware-toolbox-cmd', 'config', 'get', 'deployPkg', 'enable-custom-scripts']
Exit code: 69
Reason: -
Stdout: [deployPkg] enable-custom-scripts UNSET
Stderr:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cloudinit/sources/__init__.py", line 760, in find_source
    if s.update_metadata([EventType.BOOT_NEW_INSTANCE]):
  File "/usr/lib/python3.6/site-packages/cloudinit/sources/__init__.py", line 649, in update_metadata
    result = self.get_data()
  File "/usr/lib/python3.6/site-packages/cloudinit/sources/__init__.py", line 273, in get_data
    return_value = self._get_data()
  File "/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceOVF.py", line 178, in _get_data
    vmwareImcConfigFilePath)
  File "/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceOVF.py", line 663, in _raise_error_status
    raise error
  File "/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceOVF.py", line 158, in _get_data
    "false")
  File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/vmware/imc/guestcust_util.py", line 140, in get_tools_config
    except ProcessExecutionError as e:
NameError: name 'ProcessExecutionError' is not defined

I attach the detail cloud-init.log in attachment, if need any other log, please contact me freely!

BRs,
Lili Du

Comment 15 ldu 2020-08-20 02:15:52 UTC
Created attachment 1711958 [details]
cloudinitlog

Comment 19 GOS QA 2020-08-21 07:35:34 UTC
Hi, 

The issue has already been fixed, it will be effected AFTER release version of cloud-init 20.2.
Commit c6d09af67626c2f2241c64c10c9e27e8752ba87b was merged into canonical:master

There is a workaround for the versions that does not fix the issue, run cmd like 
"vmware-toolbox-cmd config set deployPkg enable-custom-scripts false" to create /etc/vmware-tools/tools.conf



Best Regards,
Cheng Cheng

Comment 28 ldu 2020-09-01 09:55:38 UTC
Verified this bug on RHEL8.3 compose with cloud-init-19.4-10.el8.
After cloned the guest with cloud-init, check the cloud-init.log file, no error, fail log.
Also check the timezone, IP, all set as specification.
so change status to verified.

Comment 31 errata-xmlrpc 2020-11-04 02:40:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: cloud-init security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4650