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

config_version setting in environment.conf uses relative pathing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.6.0
    • Fix Version/s: None
    • Component/s: DOCS
    • Labels:
      None
    • Template:

      Description

      If directory environments are configured, and you create an environment.conf in an environment, and you set the config_version parameter using a command that doesn't include the full path to the binary in question, such as:

      config_version = 'git --git-dir $confdir/environments/$environment/.git rev-parse HEAD'
      

      Puppet will attempt to look for the git binary in the relative environment path and produce the following error:

      Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Execution of config_version command `/etc/puppetlabs/puppet/environments/production/git --git-dir /etc/puppetlabs/puppet/environments/production/.git rev-parse HEAD` failed: Execution of '/etc/puppetlabs/puppet/environments/production/git --git-dir /etc/puppetlabs/puppet/environments/production/.git rev-parse HEAD' returned 1:  on node master.puppetlabs.vm
      

      I understand why relative pathing is important for modulepath, and I EVEN see why it's important if you wrap the command inside a script (so you can just drop the script inside the repository that's cloned to every environment), but using an inline command causes a problem. The benefit of using an inline command is that you can use $environment in the command (see above). If you use a script, you would need to pass the environment as an argument to the script to be able to use it (which is not too big of a problem).

      I thought I'd raise the issue here for comment in case anyone else might have hit it.

        Activity

        gary Gary Larizza created issue -
        joshua.partlow Joshua Partlow made changes -
        Field Original Value New Value
        Assignee Joshua Partlow [ joshua.partlow ]
        joshua.partlow Joshua Partlow made changes -
        Component/s DOCS [ 11226 ]
        joshua.partlow Joshua Partlow made changes -
        Fix Version/s 3.7.2 [ 11925 ]
        andy Andrew Parker made changes -
        Status Open [ 1 ] Ready for Engineering [ 10005 ]
        andy Andrew Parker made changes -
        Fix Version/s 3.7.2 [ 11925 ]
        andy Andrew Parker made changes -
        Status Ready for Engineering [ 10005 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        kenn Kenn Hussey made changes -
        Workflow Platform Workflow [ 124608 ] Old Platform Workflow [ 187803 ]
        kenn Kenn Hussey made changes -
        Workflow Old Platform Workflow [ 187803 ] Platform Workflow [ 216040 ]
        kenn Kenn Hussey made changes -
        Workflow Platform Workflow [ 216040 ] Old Platform Workflow [ 247283 ]
        kenn Kenn Hussey made changes -
        Workflow Old Platform Workflow [ 247283 ] Platform Workflow [ 259044 ]
        kenn Kenn Hussey made changes -
        Workflow Platform Workflow [ 259044 ] Old Platform Workflow [ 305321 ]
        kenn Kenn Hussey made changes -
        Workflow Old Platform Workflow [ 305321 ] Platform Workflow [ 325683 ]
        kenn Kenn Hussey made changes -
        Workflow Platform Workflow [ 325683 ] Scrum Team Workflow [ 343772 ]
        derek.austin Dee Austin made changes -
        Workflow Scrum Team Workflow [ 343772 ] Scrum Teams Workflow [ 470463 ]
        kenn Kenn Hussey made changes -
        Workflow Scrum Teams Workflow [ 470463 ] Scrum Team Workflow [ 562605 ]

          People

          • Assignee:
            joshua.partlow Joshua Partlow
            Reporter:
            gary Gary Larizza
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: