-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
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