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

I18N LANG setting not honored when running puppet on redhat 7.3 on power8

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: PUP 5.2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      Translations work on EL7 Power builds.

      Show
      Translations work on EL7 Power builds.
    • Team:
      Platform OS
    • Story Points:
      3
    • Sprint:
      Platform OS 2017-09-19
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Manual

      Description

      When running puppet using a different language setting, it fails to use the configured LANG
      language on redhat 7.3 on Power8 systems:

      [root@power8-rhel73-3 locale]# LANG=ja_JP.utf8 puppet crazy
      Error: Unknown Puppet subcommand 'crazy'
      See 'puppet help' for help on available puppet subcommands
      [root@power8-rhel73-3 locale]#
      

      On Intel based redhat systems puppet(1) would print out the above messages in Japanese, which is the expected behavior.

      The locale is listed as supported by the system:

      [root@power8-rhel73-3 locale]# locale -a | grep ja_JP
      ja_JP
      ja_JP.eucjp
      ja_JP.ujis
      ja_JP.utf8
      [root@power8-rhel73-3 locale]#
      

      And all the .po files exist on the system:

      root@power8-rhel73-3 locale]# pwd
      /opt/puppetlabs/puppet/share/locale
      [root@power8-rhel73-3 locale]# find . -type f -print
      ./config.yaml
      ./es/LC_MESSAGES/puppet.mo
      ./es/puppet.po
      ./fr/LC_MESSAGES/leatherman_locale.mo
      ./fr/LC_MESSAGES/leatherman_logging.mo
      ./fr/LC_MESSAGES/puppet.mo
      ./fr/puppet.po
      ./ja/LC_MESSAGES/puppet.mo
      ./ja/puppet.po
      ./puppet.pot
      ./out
      ./en_US/LC_MESSAGES/FACTER.mo
      ./ja_JP/LC_MESSAGES/FACTER.mo
      [root@power8-rhel73-3 locale]#
      

      If you set LANG wrong, we detect that and facter complains:

      [root@power8-rhel73-3 locale]# LANG=ja puppet crazy
      2017-08-15 17:37:21.973108 WARN  puppetlabs.facter - locale environment variables were bad; continuing with LANG=C LC_ALL=C
      Error: Unknown Puppet subcommand 'crazy'
      See 'puppet help' for help on available puppet subcommands
      [root@power8-rhel73-3 locale]# 
      

      As you can see this works correctly with date:

      [root@power8-rhel73-3 puppet]# LANG=ja_JP date
      2017ǯ  8�� 15�� ������ 17:42:18 EDT
      [root@power8-rhel73-3 puppet]#
      

      These same methods work on Intel based systems on Redhat versions.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                scott.garman Scott Garman
                Reporter:
                eric.delaney Eric Delaney
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support