Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1532254

Summary: Puppet Run via Remote execution fails with error "puppet: command not found"
Product: Red Hat Satellite Reporter: sbadhwar
Component: PuppetAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, ehelms, jhutar, mburgerh, mmccune, omaciel, psuriset, sbadhwar
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-16 14:36:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sbadhwar 2018-01-08 13:43:46 UTC
Description of problem:
While trying to do a puppet run via ReX using Satellite 6.3 Snap 30 running Puppet 4, the command execution fails with the following error:

/var/tmp/foreman-ssh-cmd-a9722007-ab3b-43bd-9992-bdb0eac2c0e9/script: line 1: puppet: command not found

On trying to echo the $PATH variable using ReX to see, what paths are used for loading the binaries, seems like, /opt/puppetlabs/puppet/bin(the path where the puppet binary lives in Puppet 4) is not present which might be the cause of the above error.
 
Version-Release number of selected component (if applicable):
Satellite 6.3 Snap 30
Puppet 4

How reproducible: Always


Steps to Reproduce:
1.
2.
3.

Actual results:
Puppet run fails with error puppet not found


Expected results:
Puppet run should work fine


Additional info:

Comment 2 Og Maciel 2018-01-09 16:38:17 UTC
# which puppet
/opt/puppetlabs/bin/puppet

# rpm -qa | grep puppet
puppet-agent-1.10.7-1.el7sat.x86_64

Did you add a enable-puppet4 = true parameter to your organization/host group/etc?

Comment 3 sbadhwar 2018-01-09 17:07:12 UTC
(In reply to Og Maciel from comment #2)
> # which puppet
> /opt/puppetlabs/bin/puppet
> 
> # rpm -qa | grep puppet
> puppet-agent-1.10.7-1.el7sat.x86_64
> 
> Did you add a enable-puppet4 = true parameter to your organization/host
> group/etc?

Hello,

I don't remember adding any such parameter. Please, is there some information on how to pass the above parameter to either organization or host group?

Also, to elaborate on the process followed for the Performance setup:
- Enable the Satellite Snap repos from https://ohsnap-satellite6.int.open.paas.redhat.com/releases/6.3.0/snaps/30.0/installation
- Enable the Puppet 4 repo on host system
- Install Satellite
- Did a check of puppet version (puppet agent --version) on satellite
Output: 4.10.7
Some more output using rpm -qa | grep puppet ran on Satellite host

[root@gprfc018 ~]# rpm -qa | grep puppet
gprfc018.sbu.lab.eng.bos.redhat.com-puppet-client-1.0-1.noarch
puppet-foreman_scap_client-0.3.16-1.el7sat.noarch
pulp-puppet-plugins-2.13.4-3.el7sat.noarch
redhat-access-insights-puppet-0.0.9-2.el7sat.noarch
python-pulp-puppet-common-2.13.4-3.el7sat.noarch
puppet-agent-oauth-0.5.1-2.el7sat.noarch
puppetserver-2.8.0-1.el7sat.noarch
pulp-puppet-tools-2.13.4-3.el7sat.noarch
puppet-agent-1.10.7-1.el7sat.x86_64
puppetlabs-stdlib-4.2.1-1.20140510git08b00d9.el7sat.noarch

- Sync Puppet 4 Repos to Satellite
- Add Puppet 4 repos to Content View
- Setup the Activation Key and HostGroup on Satellite with the Content View
- Used bootstrap.py(adapted version for puppet 4) on Content host
- Verify puppet version installed on content host (rpm -qa | grep puppet)
Output: puppet-agent-1.10.7-1.el7sat.x86_64
- Run remote job from Satellite 6.3 using Job category: Puppet and Job Template: Puppet Run Once

Is there something else which also needs to be done before executing the job?

Comment 5 Og Maciel 2018-01-09 18:19:51 UTC
Hi sbadhwar

You can do it by editing your organization and adding the puppet parameter. If you're using host groups to manage your provisioning, then you can also add the parameter to the host group.

Comment 7 sbadhwar 2018-01-09 18:46:10 UTC
(In reply to Og Maciel from comment #6)
> Furthermore, info about puppet 4 on satellite 6.3 beta
> https://access.redhat.com/documentation/en-us/red_hat_satellite/6.3-beta/
> html-single/upgrading_and_updating_red_hat_satellite/#upgrade_path

Tried with the option mentioned in the docs, seems to resolve the issue on the setup. :)

Comment 8 Eric Helms 2018-01-16 14:36:37 UTC

*** This bug has been marked as a duplicate of bug 1527627 ***