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

[Puppet 7] Puppet Agents behaviour disparity between Agent 1 and Agent 2 #9530

Closed
Miranlfk opened this issue Dec 10, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@Miranlfk
Copy link

Miranlfk commented Dec 10, 2024

Context

I'm running a setup using AWS cloudformation which spins up a Puppet Server with my application pack and accompanied puppet modules to deploy said application creating an instance from a saved AMI (Amazon Machine Image). 2 agent nodes/instances are spun up for the application to be deployed on. Both agent nodes use the same configuration with the only difference where each node is defined as node 1 and node 2, both use the puppet modules in the Puppet Server to deploy the defined application.

Describe the Bug

When deploying the application on both agent 1 and agent 2, where deploying refers to extracting the zipped artifact, Agent 1 fails, where as Agent 2 is able to deploy the application. The puppet manifest script used for the extraction is as follows:

file { "binary":
    path    => "${product_dir}/${package}",
    owner   => $user,
    group   => $user_group,
    mode    => '0644',
    source  => "puppet:///modules/installers/${package}",
    require => File["${target}", "${target}/${product_name}", "${product_dir}"],
  }

  # Unzip the binary and create setup
  exec { "unzip-pack":
    command => "unzip -o ${package} -d ${product_dir}",
    path    => "/usr/bin/",
    user    => $user,
    group   => $user_group,
    cwd     => "${product_dir}",
    onlyif  => "/usr/bin/test ! -d ${product_dir}/${product_name}-${version}",
    require => File["binary"],
  }

The behaviour we see is that node 1 is unable to unzip the application pack, but node 2 is able to and node 2 carries on with the application deployment however node 1 fails.

Disclaimer:

This deployment has been working for several years and I've not seen such an issue until now. Both nodes were able to unzip and deploy the application until recently.

Expected Behavior

Both Agent Node 1 and 2 are able to unzip the application pack and deploy the application.

Environment

  • Puppet - 7.34.0 (not PE)
  • Platform - Ubuntu 22.04
@Miranlfk Miranlfk added the bug Something isn't working label Dec 10, 2024
@joshcooper
Copy link
Contributor

@Miranlfk I think you'll have better luck getting this resolved by asking in the puppet community slack channel. https://puppetcommunity.slack.com/ Since puppet is behaving correctly on one agent but not another, it sounds like there's some environmental difference between the two. Folks on slack can help you resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants