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

Using a prefix of a setting on the CLI doesn't work nor fail

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.4.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1

      Description

      I tried this out on 3.4.3, but I'm pretty certain that it goes back much further.

      The problem is that on the command line you can specify a prefix of a setting (such as order instead of ordering), but if that is done the setting does not get set. It also does not raise an error (follow tests done on a development branch).

      Setting taking effect

      > be puppet apply -e 'notice($::settings::certname)' --certname foo
      Warning: Could not retrieve fact fqdn
      Notice: Scope(Class[main]): foo
      Notice: Compiled catalog for foo in environment production in 0.43 seconds
      Notice: Finished catalog run in 0.04 seconds
      

      Setting prefix used. Does not take effect also does not error

      > be puppet apply -e 'notice($::settings::certname)' --certna foo
      Warning: Could not retrieve fact fqdn
      Notice: Scope(Class[main]): aparker
      Notice: Compiled catalog for aparker in environment production in 0.41 seconds
      Notice: Finished catalog run in 0.04 seconds
      

      Rejects unknown setting

      > be puppet apply -e 'notice($::settings::certname)' --certnax foo
      Error: Could not parse application options: invalid option: --certnax
      

      I would expect either --certna to work just like --certname or to produce an error like --certnax

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andy Andrew Parker
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support