Uploaded image for project: 'Puppet Enterprise'
  1. Puppet Enterprise
  2. ENTERPRISE-1199

Change newline output on exported reports

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Won't Fix
    • None
    • None
    • Console
    • None
    • Reviewed
    • Needs Assessment

    Description

      A Customer frequently exports data from the console so they can get the hostname list and do something with it on the MoM (revoke certs or purge nodes).

      However, when they export data from a report or events or overview page in the console, the CSV has CRLF line endings.

      The MoM freaks out if there are unexpected line endings — especially ^M — with the error: `Error: A Request-Line must not contain CR or LF`.

       The customer ends up having to use dos2unix to remove these line endings.

      They would like it if Puppet would output data in a format that it was also okay reading.

      When doing the above the customer is scp'ing the file to a Linux box and using Bash.

      Customer has updated us with how they're using the csv:

      So, I download the csv (let's call it list.csv), then run stuff like this: 
      ``` 
      local $ cat list.csv | awk -F"," '{ print $7 }' > fqdn.list # I think it's field 7, not checking for this example 
      local $ scp list.csv puppet-master:/tmp 
      local $ ssh puppet-master 

      1. elevate to root 
        MoM $ for i in `cat fqdn.list`; do puppet node purge $i; done 
      2. This is where it freaks out about the ^M character 
      3. Or, to clear certs: 
        MoM $ for i in `cat fqdn.list`; do puppet cert clean $i; done

      Attachments

        Activity

          People

            Unassigned Unassigned
            patrick.grant Patrick Grant
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support