Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-1191

Puppet should not reset locale when executing child processes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Needs Information
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: PUP 5.y
    • Component/s: None
    • Labels:
    • Template:
    • Epic Link:
    • Team:
      Coremunity

      Description

      Puppet resets various locale related ENV variables to the posix default of 'C' immediately before invoked Kernel.exec to launch an executable (occurs when running a Single_exec in a recipe)

      http://github.com/reductivelabs/puppet/blob/master/lib/puppet/util.rb#L295

      The problem is, the python interpreter will attempt to parse these variables to determine the default locale, and if it is set to 'C' (or not set at all as it will default to 'C'), 'None' will be returned, ignoring the true default locale.

      Thus any python script launched via Single_exec from a puppet recipe will not be able to get the default locale by invoking locale.getdefaultlocale(). This functionality is part of the standard python library and is relied upon by many various Python scripts.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              redmine.exporter redmine.exporter
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support