Bug 1031001 - Invalid pulp yum_importer.json can be written with missing --proxy-* arguments
Invalid pulp yum_importer.json can be written with missing --proxy-* arguments
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Eric Helms
Elyézer Rezende
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-11-15 08:07 EST by Dominic Cleal
Modified: 2017-02-23 16:18 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-08-12 01:07:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dominic Cleal 2013-11-15 08:07:28 EST
Description of problem:
Missing out --proxy-* arguments can result in a yum_importer.json pulp plugin config file that isn't valid JSON, preventing pulp from starting up.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. run katello-configure with --proxy-url, --proxy-port, --proxy-pass but NOT --proxy-user
2. check pulp status
3. check /var/log/pulp/pulp.log

Actual results:
2013-11-15 14:27:55,725 pulp.server.webservices.application:CRITICAL: The Pulp server failed to start due to the following reasons:
2013-11-15 14:27:55,726 pulp.server.webservices.application:ERROR:   One or more plugins failed to initialize. If a new type has been added, run pulp-manage-db to load the type into the database and restart the application. Error message: Expecting , delimiter: line 4 column 22 (char 98)
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 180, in wsgi_application
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 118, in _initialize_pulp
  File "/usr/lib/python2.6/site-packages/pulp/plugins/loader/api.py", line 80, in initialize
  File "/usr/lib/python2.6/site-packages/pulp/plugins/loader/loading.py", line 108, in load_plugins_from_entry_point
    cls, cfg = entry_point.load()()
  File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/importer.py", line 41, in entry_point
    plugin_config = read_json_config(CONF_FILENAME)
  File "/usr/lib/python2.6/site-packages/pulp/common/config.py", line 670, in read_json_config
    config = json.load(f)
  File "/usr/lib64/python2.6/json/__init__.py", line 267, in load
    parse_constant=parse_constant, **kw)
  File "/usr/lib64/python2.6/json/__init__.py", line 307, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.6/json/decoder.py", line 336, in raw_decode
    obj, end = self._scanner.iterscan(s, **kw).next()
  File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib64/python2.6/json/decoder.py", line 193, in JSONObject
    raise ValueError(errmsg("Expecting , delimiter", s, end - 1))

Expected results:
pulp is running

Additional info:
The installer template doesn't check whether all of the --proxy-* parameters are present, so it will write invalid JSON:


Just quoting the values might be enough.
Comment 2 Eric Helms 2014-11-04 16:02:48 EST
This issue has been addressed upstream here -https://bugzilla.redhat.com/show_bug.cgi?id=1127397
Comment 5 Elyézer Rezende 2015-02-13 12:20:02 EST
Verified on Satellite-6.1.0-RHEL-6-20150210.0

Verification steps:

[root@amd-dinar-01 ~]# katello-installer --katello-proxy-url="http://proxy.example.com" --katello-proxy-port=8888 --katello-proxy-password=proxypass
Installing             Done                                               [100%] [.................................]
  * Katello is running at https://amd-dinar-01.example.com
      Initial credentials are admin / changeme
  * Capsule is running at https://amd-dinar-01.example.com:9090
  * To install additional capsule on separate machine continue by running:"

      capsule-certs-generate --capsule-fqdn "$CAPSULE" --certs-tar "~/$CAPSULE-certs.tar"

  The full log is at /var/log/katello-installer/katello-installer.log

[root@amd-dinar-01 ~]# katello-service status
tomcat6 (pid 16004) is running...[  OK  ]
mongod (pid  5654) is running...
listening on
connection test successful
elasticsearch (pid  4934) is running...
celery init v10.0.
Using config script: /etc/default/pulp_resource_manager
node resource_manager (pid 923) is running...
celery init v10.0.
Using config script: /etc/default/pulp_workers
node reserved_resource_worker-0 (pid 1598) is running...
node reserved_resource_worker-1 (pid 1474) is running...
node reserved_resource_worker-2 (pid 1358) is running...
node reserved_resource_worker-3 (pid 1744) is running...
node reserved_resource_worker-4 (pid 1789) is running...
node reserved_resource_worker-5 (pid 1241) is running...
node reserved_resource_worker-6 (pid 1531) is running...
node reserved_resource_worker-7 (pid 1427) is running...
node reserved_resource_worker-8 (pid 1194) is running...
node reserved_resource_worker-9 (pid 1216) is running...
node reserved_resource_worker-10 (pid 1892) is running...
node reserved_resource_worker-11 (pid 1668) is running...
node reserved_resource_worker-12 (pid 1381) is running...
node reserved_resource_worker-13 (pid 1767) is running...
node reserved_resource_worker-14 (pid 1146) is running...
node reserved_resource_worker-15 (pid 1287) is running...
node reserved_resource_worker-16 (pid 1450) is running...
node reserved_resource_worker-17 (pid 1500) is running...
node reserved_resource_worker-18 (pid 1404) is running...
node reserved_resource_worker-19 (pid 1310) is running...
node reserved_resource_worker-20 (pid 1573) is running...
node reserved_resource_worker-21 (pid 1724) is running...
node reserved_resource_worker-22 (pid 1694) is running...
node reserved_resource_worker-23 (pid 1644) is running...
node reserved_resource_worker-24 (pid 1170) is running...
node reserved_resource_worker-25 (pid 1838) is running...
node reserved_resource_worker-26 (pid 1869) is running...
node reserved_resource_worker-27 (pid 1263) is running...
node reserved_resource_worker-28 (pid 1621) is running...
node reserved_resource_worker-29 (pid 1551) is running...
node reserved_resource_worker-30 (pid 1820) is running...
node reserved_resource_worker-31 (pid 1333) is running...
celery init v10.0.
Using configuration: /etc/default/pulp_workers, /etc/default/pulp_celerybeat
pulp_celerybeat (pid 799) is running.
httpd (pid  2026) is running...
dynflow_executor is running.
dynflow_executor_monitor is running.

[root@amd-dinar-01 ~]# cat /var/log/messages | grep pulp
# omitted some messages
Feb 13 12:00:50 amd-dinar-01 pulp: pulp.server.webservices.application:INFO: *************************************************************
Feb 13 12:00:50 amd-dinar-01 pulp: pulp.server.webservices.application:INFO: The Pulp server has been successfully initialized
Feb 13 12:00:50 amd-dinar-01 pulp: pulp.server.webservices.application:INFO: *************************************************************
Feb 13 12:00:50 amd-dinar-01 pulp: gofer.transport.qpid.broker:INFO: {amd-dinar-01.example.com:5671} connected to AMQP
Comment 6 Bryan Kearney 2015-08-11 09:25:57 EDT
This bug is slated to be released with Satellite 6.1.
Comment 7 errata-xmlrpc 2015-08-12 01:07:52 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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