Bug 1118764 - katello-agent should be installed through provided Satellite 6 kickstart files
Summary: katello-agent should be installed through provided Satellite 6 kickstart files
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: Unspecified
Assignee: Stephen Benjamin
QA Contact: Og Maciel
URL: http://projects.theforeman.org/issues...
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-11 13:23 UTC by Maxim Burgerhout
Modified: 2016-04-22 14:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-09-11 12:19:16 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 6811 None None None 2016-04-22 14:57:55 UTC

Description Maxim Burgerhout 2014-07-11 13:23:00 UTC
Description of problem:
The provided kickstart files in Satellite 6 install Puppet, but not katello-agent. Katello-agent should be installed by default too, since it provides significant parts of the realtime management features of Satellite 6.

Version-Release number of selected component (if applicable):
Public beta, 6.0.3

How reproducible:

Steps to Reproduce:
1. install satellite 6 and sync server and rh-common repos
2. kickstart new vm

Actual results:
Only Puppet is installed

Expected results:
Puppet and katello-agent are installed; goferd is running

Additional info:

Comment 1 RHEL Product and Program Management 2014-07-11 13:34:22 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Stephen Benjamin 2014-07-29 08:17:05 UTC
Created redmine issue http://projects.theforeman.org/issues/6811 from this bug

Comment 4 Bryan Kearney 2014-07-30 00:03:57 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6811 has been closed
Applied in changeset commit:katello|a3c604381deb18ad63d4c189ce3471629201afe6.

Comment 6 Kedar Bidarkar 2014-08-13 07:35:04 UTC
Tested with:

a) Sat6-GA-snap4
b) Satellite Kickstart Default 

But on 

From snippet "subscription_manager_registration"

echo "Installing Katello Agent"
yum -t -y -e 0 install katello-agent
chkconfig goferd on
====NOT needed================
service goferd start

We have 2 issues here

1) running "yum install -y katello-agent" already starts up the goferd service.
2) Also we need to update the iptables to open the goferd port on the clients

I think the port number for goferd is 5671.

Comment 7 Kedar Bidarkar 2014-08-13 07:36:57 UTC
As seen from the below katello-agent installation, goferd is automatically started.

# yum install katello-agent
Loaded plugins: product-id, security, subscription-manager
This system is receiving updates from Red Hat Subscription Management.
Default_Organization_Sat6Tools_rhcommon                                                                                                                                | 2.1 kB     00:00     
rhel-6-server-rpms                                                                                                                                                     | 2.5 kB     00:00     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package katello-agent.noarch 0:1.5.3-4.el6sat will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                                 Arch                             Version                                     Repository                                                         Size
 katello-agent                           noarch                           1.5.3-4.el6sat                              Default_Organization_Sat6Tools_rhcommon                            20 k

Transaction Summary
Install       1 Package(s)

Total download size: 20 k
Installed size: 42 k
Is this ok [y/N]: y
Downloading Packages:
katello-agent-1.5.3-4.el6sat.noarch.rpm                                                                                                                                |  20 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : katello-agent-1.5.3-4.el6sat.noarch                                                                                                                                        1/1 
Stopping goferd[FAILED]
Starting goferd[  OK  ]
  Verifying  : katello-agent-1.5.3-4.el6sat.noarch                                                                                                                                        1/1 

  katello-agent.noarch 0:1.5.3-4.el6sat                                                                                                                                                       


Comment 8 Kedar Bidarkar 2014-08-13 07:45:39 UTC
goferd service fails to start due to firewall, need to open the port which goferd communicates on.

^M  Installing : katello-agent-1.5.3-4.el6sat.noarch                        13/13Non-fatal POSTIN scriptlet failure in rpm package katello-agent-1.5.3-4.el6sat.noarch

Stopping goferd[FAILED]^M
Starting goferdTraceback (most recent call last):
  File "/usr/bin/goferd", line 17, in <module>
    from gofer.agent.main import main
  File "/usr/lib/python2.6/site-packages/gofer/agent/main.py", line 26, in <module>
  File "/usr/lib/python2.6/site-packages/gofer/agent/logutil.py", line 44, in install
    handler = LogHandler(address='/dev/log', facility=SysLogHandler.LOG_DAEMON)
  File "/usr/lib64/python2.6/logging/handlers.py", line 721, in __init__
  File "/usr/lib64/python2.6/logging/handlers.py", line 737, in _connect_unixsocket
  File "<string>", line 1, in connect
socket.error: [Errno 111] Connection refused
warning: %post(katello-agent-1.5.3-4.el6sat.noarch) scriptlet failed, exit status 1

Comment 9 Maxim Burgerhout 2014-08-13 10:28:56 UTC
Comment #6 suggests the problem is with the snippet to have a 'service goferd start' in there, but otoh should katello-agent really start goferd? 

Afaik, we don't usually start daemons from scriptlets in RPM's, assuming we follow somthing similar to the Fedora Packaging Guidelines internally as well.

The rhnsd RPM doesn't start rhnsd either, for example.

Comment 10 Stephen Benjamin 2014-08-13 20:22:49 UTC
I'd say these should be 2 new bugs (you can never have too many bugs!):

1) katello-agent shouldn't start services to begin with, as %post should never be written such that it could fail like that

2) goferd connects outbound, so katello-installer will be the one to need to open the port on Satellite itself (if we want to manage firewalld/iptables)

Comment 11 Kedar Bidarkar 2014-08-14 10:54:49 UTC
I agree I have not seen packages starting a service, but I am not 100% sure about it.

1) answering the katello-agent issues

2) my bad, looks like goferd service start to fail for some reason with the above error only when trying to start it via the katello-agent %post phase. After finishing with the kickstart and the reboot. goferd service is up and running.

NOTE:- I agree as many customers would be using provisioning templates(kickstart files) for handling the clients, goferd service can be started via kickstart/template file and not via katello-agent package. but as requested in the bug https://bugzilla.redhat.com/show_bug.cgi?id=1103863, I thought it was required.

Comment 14 Mike McCune 2014-08-21 21:36:34 UTC
Moving this back to ASSIGNED as we are going to remove the service start and enabling from the templates and rely entirely on the operations in %post in katello-agent

Comment 15 Stephen Benjamin 2014-08-21 21:47:44 UTC
Upstream commit to remove the service start:

Comment 19 Og Maciel 2014-08-30 23:17:23 UTC

* Firefox 31.0 (MacOS)

* Satellite-6.0.4-RHEL-6-20140829.0

* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.23-1.el6_5.noarch
* candlepin-common-1.0.1-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.23-1.el6_5.noarch
* candlepin-tomcat6-0.9.23-1.el6_5.noarch
* elasticsearch-0.90.10-6.el6sat.noarch
* foreman-
* foreman-compute-
* foreman-gce-
* foreman-libvirt-
* foreman-ovirt-
* foreman-postgresql-
* foreman-proxy-
* foreman-selinux-
* foreman-vmware-
* katello-1.5.0-30.el6sat.noarch
* katello-ca-consumer-cloud-qe-10.idmqe.lab.eng.bos.redhat.com-1.0-1.noarch
* katello-certs-tools-1.5.6-1.el6sat.noarch
* katello-default-ca-1.0-1.noarch
* katello-installer-0.0.64-1.el6sat.noarch
* katello-server-ca-1.0-1.noarch
* openldap-2.4.23-32.el6_4.1.x86_64
* pulp-katello-0.3-4.el6sat.noarch
* pulp-nodes-common-2.4.1-0.5.rc1.el6sat.noarch
* pulp-nodes-parent-2.4.1-0.5.rc1.el6sat.noarch
* pulp-puppet-plugins-2.4.1-0.5.rc1.el6sat.noarch
* pulp-puppet-tools-2.4.1-0.5.rc1.el6sat.noarch
* pulp-rpm-plugins-2.4.1-0.6.beta.el6sat.noarch
* pulp-selinux-2.4.1-0.5.rc1.el6sat.noarch
* pulp-server-2.4.1-0.5.rc1.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch
* rubygem-hammer_cli-0.1.1-12.el6sat.noarch
* rubygem-hammer_cli_foreman-0.1.1-16.el6sat.noarch
* rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch
* rubygem-hammer_cli_import-0.10.2-1.2.el6sat.noarch
* rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch

Comment 20 Bryan Kearney 2014-09-11 12:19:16 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.

Note You need to log in before you can comment on or make changes to this bug.