Bug 1738607

Summary: [RHEL7] 99-datasource.cfg is malformed and failed to load in the RHEL7.7 AWS AMI.
Product: Red Hat Enterprise Linux 7 Reporter: Frank Liang <xiliang>
Component: relengAssignee: Jon Disnard <jdisnard>
Status: CLOSED ERRATA QA Contact: Frank Liang <xiliang>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.7CC: akatarki, aws-ec2-linux-blr-all, dtodorov, jdisnard, jstodola, leiwang, linl, ribarry, sacpatil, vkuznets, wshi
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 19:41:52 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:

Description Frank Liang 2019-08-07 14:44:14 UTC
Description of problem:
There is a new error in fixing bug 1467391. The file is malformed and is failed to load in the latest "RHEL-7.7_HVM_GA-20190716-x86_64-0-Hourly2-GP2" AMI.

The following is the error log:
2019-08-07 14:33:27,259 - handlers.py[DEBUG]: finish: init-local/search-Ec2Local: SUCCESS: found local data from DataSourceEc2Local
2019-08-07 14:33:27,259 - stages.py[INFO]: Loaded datasource DataSourceEc2Local - DataSourceEc2Local
2019-08-07 14:33:27,260 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2019-08-07 14:33:27,260 - util.py[DEBUG]: Read 1236 bytes from /etc/cloud/cloud.cfg
2019-08-07 14:33:27,260 - util.py[DEBUG]: Attempting to load yaml from string of length 1236 with allowed root types (<type 'dict'>,)
2019-08-07 14:33:27,269 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/99-datasource.cfg (quiet=False)
2019-08-07 14:33:27,269 - util.py[DEBUG]: Read 59 bytes from /etc/cloud/cloud.cfg.d/99-datasource.cfg
2019-08-07 14:33:27,269 - util.py[DEBUG]: Attempting to load yaml from string of length 59 with allowed root types (<type 'dict'>,)
2019-08-07 14:33:27,270 - util.py[WARNING]: Failed loading yaml blob. Invalid format at line 1 column 1: "while parsing a block mapping
  in "<string>", line 1, column 1:
    'datasource_list': [
    ^
expected <block end>, but found ','
  in "<string>", line 4, column 6:
        ],
         ^"
2019-08-07 14:33:27,270 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False)
2019-08-07 14:33:27,270 - util.py[DEBUG]: Read 1821 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg
2019-08-07 14:33:27,270 - util.py[DEBUG]: Attempting to load yaml from string of length 1821 with allowed root types (<type 'dict'>,)
2019-08-07 14:33:27,277 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False)
2019-08-07 14:33:27,277 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<type 'dict'>,)
2019-08-07 14:33:27,278 - util.py[DEBUG]: loaded blob returned None, returning default.
2019-08-07 14:33:27,279 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2019-08-07 14:33:27,280 - util.py[DEBUG]: Creating symbolic link from '/var/lib/cloud/instance

[root@ip-10-22-2-4 log]# rpm -qa|grep cloud-init
cloud-init-18.5-3.el7.x86_64

Version-Release number of selected component (if applicable):
kernel-3.10.0-1062.el7.x86_64

How reproducible:

Steps to Reproduce:
1. start a instance using RHEL7.7 GA AMI.
2. check "/var/log/cloud-init.log"

Actual results:
99-datasource.cfg is failed to load

Expected results:
No such error.

Additional info:
- N/A

Comment 3 Frank Liang 2019-08-12 09:06:39 UTC
Jan Stodola cloned the source bug to a new one, 1740071.

Comment 4 Jan Stodola 2019-08-12 09:17:30 UTC
*** Bug 1740071 has been marked as a duplicate of this bug. ***

Comment 5 Jon Disnard 2019-08-20 17:31:53 UTC
easy fix.

Comment 6 Jon Disnard 2019-08-20 17:41:49 UTC
I'm unable to set the devel ack flag, despite having the correct "devel" permissions according to https://bugzilla.redhat.com/userprefs.cgi?tab=permissions

Can you please set the devel ack dtodorov?

Comment 11 AWS-BLR 2020-01-13 09:46:16 UTC
Is there any workaround available to mitigate this issue?

Comment 14 errata-xmlrpc 2020-03-31 19:41:52 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, 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/RHBA-2020:1033