Skip to content

puppet-r10k with openvox 8.x webservice-go seems to have a hard-coded path to r10k #691

@jhowe-uw

Description

@jhowe-uw

Running Debian 12.x, I boot-strapped a new openvox server with puppet-r10k.

When I was trying to access configured r10k endpoint for gitea, I was getting 5xx errors from the webhook-go service.

$ dpkg -l | grep openvox
ii  openvox-agent                               8.23.1-1+debian12                       amd64        The OpenVox Agent package contains all of the elements needed to run the agent, including ruby and openfact.
ii  openvox-server                              8.11.0-1+debian12                       all          Vox Pupuli puppetserver
ii  openvox8-release                            1-1debian12                             all          Release packages for the OpenVox 8 repository
ii  openvoxdb                                   8.11.0-1+debian12                       all          Vox Pupuli puppetdb
ii  openvoxdb-termini                           8.11.0-1+debian12                       all          Termini for puppetdb

Ultimately, it appears to me that the webhook-go.service has a hard-code path to r10k that doesn't exist with the default openvox packages installed. This missing path to r10k error shows up when running systemctl status webhook-go.service IIRC.

Puppetfile

...
mod   'puppet-r10k',                '14.3.0'
...

/etc/puppetlabs/r10k/r10k.yaml

---
pool_size: 4
deploy:
  generate_types: true
  exclude_spec: true
cachedir: "/opt/puppetlabs/puppet/cache/r10k"
sources:
  puppet:
    basedir: "/etc/puppetlabs/code/environments"
    remote: [email protected]:PROJ/openvox8.git

/etc/voxpupuli/webhook.yml

---
server:
  protected: false
  port: 4444
chatops:
  enabled: false
  service:
  channel:
  user:
  auth_token:
  server_uri:
r10k:
  default_branch: production

puppet_server.pp

#
class profile::puppet_server {
...
  include r10k

  class { 'r10k::webhook':
    ensure => true,
    r10k   => {
      default_branch => 'production',
    },
    server => {
      protected => false,
      port      => 4444,
    },
    tls    => {
      enabled => false,
    },
  }
}

My fix in puppet_server.pp

# 
class profile::puppet_server {
...
  # The webservice is looking for the r10k binary in a non-existing location

  $r10k_fix_dir = '/opt/puppetlabs/puppetserver/bin'

  exec { $r10k_fix_dir:
    command => "/usr/bin/mkdir -p ${r10k_fix_dir}",
    unless  => "/usr/bin/test  -d ${r10k_fix_dir}",
  }

  file { "${r10k_fix_dir}/r10k":
    ensure => 'link',
    target => '/opt/puppetlabs/puppet/bin/r10k',
  }

  # End r10k hard-coded path fix
...
}

I'm just seeing the command_path option. It does appear that puppet-r10k points to /opt/puppetlabs/puppet/bin/r10k in manifests/webhook.pp

If I am reading the code correctly, puppet-r10k configures the default path to r10k as /opt/puppetlabs/puppet/bin/r10k via R10k::Webhook::Config::R10k. Though in practice, that doesn't seem to be working. At least for me.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions