View Issue Details

IDProjectCategoryView StatusLast Update
0014231CentOS-7Cloud-Imagespublic2017-12-21 09:33
Status newResolutionopen 
Product Version7.4.1708 
Target VersionFixed in Version 
Summary0014231: AWS AMI: cloud-init-output.log is not in cloud-init settings

Since a few releases of your cloud images for AWS Marketplace, there are no cloud-init-output.log generated from cloud-init package. It comes in fact from the settings of cloud-init, the generation of this file is missing since at least August 2017.

It is a pity because I use cloud-init to monitor the deployment of my EC2 instances with Chef by doing a "tail -f /var/log/cloud-init-output.log" in the shell.

I have got in touch with AWS Support Team and they confirmed that the setting for that file is now missing in cloud-init conf.

Here is the response:

Hi Serkan,

Thank you for your response.

You are correct, per, CentOS 7 includes cloud-init in all CentOS AMIs.

As a test, I launched an instance from the official CentOS 7 x86_64 HVM image linked above and passed cloud-init directives to it with user data. I confirmed per the instance console output that the directives were executed. Connecting to the instance and looking inside /var/log, I found that cloud-init.log was created however cloud-init-output.log was not. I believe this aligns with the behaviour you are reporting.

After this, I did a check for mention around this in a bug/issue per CentOS issue tracker ( but did not find anything that appeared to be related.

Viewing the CentOS 7 release notes, per, I did find that the cloud-init package appears to have been modified by CentOS for use in their AMIs.

For this reason, I decided to compare the out-of-the-box cloud-init configuration of an official CentOS image against an official Amazon Linux image and found some interesting results. See below.

Amazon Linux AMI

$ egrep -R "cloud-init-output" /etc/cloud
/etc/cloud/cloud.cfg.d/05_logging.cfg:# 'tee -a /var/log/cloud-init-output.log' so the user can see output
/etc/cloud/cloud.cfg.d/05_logging.cfg:output: {all: '| tee -a /var/log/cloud-init-output.log'}

As you can see, /etc/cloud/cloud.cfg.d/05_logging.cfg is configured to create cloud-init-output.log.

CentOS 7

$egrep -R "cloud-init-output" /etc/cloud

This produced no results.

$ egrep -R "cloud-init.log" /etc/cloud
/etc/cloud/cloud.cfg.d/05_logging.cfg: args=('/var/log/cloud-init.log',)

It appears that by default, only cloud-init.log is configured to be created.

As a workaround, I was able to generate cloud-init-output.log by adding that line to my directives when passing the user data. For example:

repo_update: true
repo_upgrade: all



output : { all : '| tee -a /var/log/cloud-init-output.log' }

This sent the runcmd output to /var/log/cloud-init-output.log. After launch a ran ls on my CentOS 7 instance and the file was there and it contained the output:

# ls -la /var/log | grep cloud-init
-rw-------. 1 root root 121057 Dec 3 02:27 cloud-init.log
-rw-r--r--. 1 root root 2299 Dec 3 02:27 cloud-init-output.log

I hope this information helps! I understand that you are in touch with CentOS about this, but if we can provide further assistance just let us know.

Best regards,

Joel K.
Amazon Web Services

It would be nice to have it again in the next release..Because I now need to add the step pointed by the AWS' engineer to have it back.

Thank you :)
TagsNo tags attached.




2017-12-20 20:54

reporter   ~0030797

Looks like the output from cloud-init goes to /var/log/messages provided ami images, you can parse out the cloud-init bits as they are tagged cloud-init:.

I'm not sure reason behind the change to output this to messages. I know that the "standard practice" seems to be to send the cloud-init output to cloud-init-ouput.log and it would be nice if all ami images followed this practice, but maybe there is a compelling reason that the decision was made to put this in messages and I'm just unable to find it.


2017-12-21 09:33

reporter   ~0030805


indeed the logs are present in /var/log/messages :o

Issue History

Date Modified Username Field Change
2017-12-05 10:23 ssahinbefr New Issue
2017-12-20 20:54 mwd5650 Note Added: 0030797
2017-12-21 09:33 ssahinbefr Note Added: 0030805