Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

peadm::add_compiler not working using PCP transport #355

Closed
jortencio opened this issue May 24, 2023 · 0 comments · Fixed by #356
Closed

peadm::add_compiler not working using PCP transport #355

jortencio opened this issue May 24, 2023 · 0 comments · Fixed by #356

Comments

@jortencio
Copy link
Contributor

Describe the Bug

Currently running peadm::add_compiler fails when run using PCP transport due to the peadm::add_compiler plan assuming the puppet agent isn’t installed on the node.

The error that comes up is as follows:
ERROR: Puppet agent is already installed. Re-install, re-configuration, or upgrade not supported. Please uninstall the agent before running this task.

Expected Behavior

Expect node to be configured/added as a compiler after running peadm::add_compiler over pcp transport

Steps to Reproduce

Assumption:

  • Node to be configured/added to be a compiler has the Puppet agent installed (for pcp transport)
  • Bolt is installed and run from the Puppet primary server
  • peadm module and dependencies are installed in code environment on Puppet Primary Server

Steps to reproduce the behavior:

  1. Create a bolt project with the current version of peadm [3.12.0] (and dependencies) on the Puppet primary server

  2. Update the inventory.yaml file such that the new node in the inventory configured to use the pcp transport while the Puppet primary server is configured to use localhost transport:
    e.g.:

---
version: 2
config:
  transport: pcp
  pcp:
    cacert: /etc/puppetlabs/puppet/ssl/certs/ca.pem
    service-url: https://ip-10-200-0-125.ap-southeast-2.compute.internal:8143
    task-environment: production
    token-file: /root/.puppetlabs/token
    job-poll-timeout: 28800
groups:
  - name: pe-targets
    targets:
      - name: "ip-10-200-0-125.ap-southeast-2.compute.internal" # Primary Server 
        config:
          transport: local
      - name: "ip-10-200-0-114.ap-southeast-2.compute.internal" # Compiler
      - name: "ip-10-200-0-168.ap-southeast-2.compute.internal" # Replica
  1. Create a parameter file (e.g. params-add-compiler.json) similar to the following:
{
  "avail_group_letter": "A",
  "compiler_host": "ip-10-200-0-114.ap-southeast-2.compute.internal",
  "primary_host": “ip-10-200-0-125.ap-southeast-2.compute.internal",
  "primary_postgresql_host": "ip-10-200-0-125.ap-southeast-2.compute.internal",
  "dns_alt_names": “ip-10-200-0-114.ap-southeast-2.compute.internal,pe-compilers.elb.ap-southeast-2.amazonaws.com,puppet"
}
  1. Run bolt

bolt plan run peadm::add_compiler --params @params-add-compiler.json

Environment

  • puppetlabs-peadm (3.12.0)
  • bolt (3.27.1)
  • PE version (2021.7.3)
  • Platform: RHEL 8.6

Additional Context

This issue is only for adding a compiler over pcp to a working PE environment already managed by peadm. It does not affect the peadm::install as compilers are added using different tasks/plans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants