Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1024

Facter can't handle non-ascii ec2_userdata

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • FACT 2.2.0
    • FACT 2.4.7, FACT 2.5.0
    • None
    • None
    • 1
    • Client 2016-03-23
    • Bug Fix
    • Facter no longer produces a warning when ec2_userdata is not text, and hence unreadable. It instead produces a debug message.

    Description

      If we try to use Puppet 3.7.4/Facter 2.2.0 on Amazon Linux provisioned by Ops Works, we see the following error:

      Fact resolution fact='ec2_userdata', resolution='rest' resolved to an invalid value: String encoding ASCII-8BIT is not UTF-8 and could not be converted to UTF-8

      It appears to be the gzipped userdata causing the issue.

      ec2_userdata is an Advanced option when creating an EC2 instance. You can specify either text or a file. If the file is compressed - which is one way to get around the 16KB file limit for userdata - it will produce a warning. This is a common case that we can't handle generically (because the file can be any format), so it makes sense to ignore non-text and log a debug message.

      Attachments

        Issue Links

          Activity

            People

              qa qa
              internetstaff C Lang
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support