shinesolutions / packer-aem

Adobe Experience Manager (AEM) machine images builder using Packer
Apache License 2.0
20 stars 20 forks source link

Baking AMIs fail when base AMI has puppet 5.5.22 alreadyinstalled #241

Closed ovlords closed 2 years ago

ovlords commented 3 years ago

Describe the bug Baking fails when using a base AMI which has puppet-agent 5.5.22 installed. The cause appears to be 'provisioners/bash/rhel7.sh': Line 26:

yum -y install "https://yum.puppetlabs.com/puppet${PUPPET_MAJOR_VERSION}/${OS_TYPE}/${OS_VERSION}/${ARCH_TYPE}/puppet-agent-${PUPPET_AGENT_VERSION}-1.${OS_TYPE}${OS_VERSION}.${ARCH_TYPE}.rpm"

The yum package is already installed in the base AMI and this line tries to install the same package again. Since it exists already, it 'fails'.

To Reproduce Steps to reproduce the behavior: Simply execute any AMI building. This error was encountered with the 'aws-java' target.

Expected behavior Image building should succeed

Screenshots Screen Shot 2020-12-10 at 2 55 30 pm

Environment (please complete the following information if relevant):

Additional context None

mbloch1986 commented 2 years ago

Has been fixed in version 5.1.0

mbloch1986 commented 2 years ago

Looks like the fix isn't working. I'm reopening.

ovlords commented 2 years ago

If you use the infra-catalog Base AMI as your "source" for packer-aem, this problem will arise.

As of the writing of this comment, the reason is that the base AMI installs puppet 7.9.0. packer-aem installs puppet 5.5.22. Hence, it appears to yum that you are installing a lower version 5.5.22 on top of the existing one 7.9.0, causing the error message.

Recommend upgrading puppet to 7.9.0 for packer-aem, but extensive testing required.

mbloch1986 commented 2 years ago

Upgraded to latest Puppet version. Seems like it fixed the previous issue we encountered.