Project

Profile

Help

Issue #1093

pulp-manage-db (first execution after installing) throws python exception if /etc/pulp/server/plugins.conf.d/yum_importer.json is populated

Added by greartes over 5 years ago. Updated over 1 year ago.

Status:
CLOSED - WONTFIX
Priority:
High
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.6.2 Beta
Platform Release:
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Hello,

I encountered an issue (see workaround below) with pulp-server:

If one installs pulp-server and populates /etc/pulp/server/plugins.conf.d/yum_importer.json before the first pulp-manage-db execution, a python exception will happen.

Example /etc/pulp/server/plugins.conf.d/yum_importer.json:
{
"num_threads" : 4,
"proxy_host" : "http://192.168.207.1",
"proxy_port" : 3128,
"proxy_username": null,
"proxy_password": null
}

  1. sudo -u apache pulp-manage-db
    Mongo database for connection is version 2.6.9
    Loading content types.
    Loading type descriptors [iso_support.json, rpm_support.json, puppet.json]
    Parsing type descriptors
    Validating type descriptor syntactic integrity
    Validating type descriptor semantic integrity
    Updating the database with types [iso, distribution, drpm, erratum, package_group, package_category, package_environment, rpm, srpm, yum_repo_metadata_file, puppet_module]
    Content types loaded.
    Ensuring the admin role and user are in place.
    Admin role and user are in place.
    Beginning database migrations.
    Migration package pulp.server.db.migrations is up to date at version 12
    Migration package pulp_puppet.plugins.migrations is up to date at version 2
    Applying pulp_rpm.plugins.migrations version 16
    Loaded plugin yum_distributor for types: rpm,srpm,drpm,erratum,package_group,package_category,distribution,yum_repo_metadata_file
    Loaded plugin export_distributor for types: rpm,srpm,drpm,erratum,distribution,package_category,package_group
    Loaded plugin iso_distributor for types: iso
    Loaded plugin puppet_distributor for types: puppet_module
    Loaded plugin puppet_file_distributor for types: puppet_module
    Loaded plugin puppet_install_distributor for types: puppet_module
    Loaded plugin group_export_distributor for types: rpm,srpm,drpm,erratum,distribution,package_category,package_group
    Applying migration pulp_rpm.plugins.migrations.0016_new_yum_distributor failed.

Halting migrations due to a migration failure.
No JSON object could be decoded
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 125, in main
return auto_manage_db(options)
File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 185, in _auto_manage_db
migrate_database(options)
File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 98, in migrate_database
update_current_version=not options.test)
File "/usr/lib/python2.7/site-packages/pulp/server/db/migrate/models.py", line 161, in apply_migration
migration.migrate()
File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/migrations/0016_new_yum_distributor.py", line 41, in migrate
api.initialize()
File "/usr/lib/python2.7/site-packages/pulp/plugins/loader/api.py", line 74, in initialize
loading.load_plugins_from_entry_point(*entry_point)
File "/usr/lib/python2.7/site-packages/pulp/plugins/loader/loading.py", line 60, in load_plugins_from_entry_point
cls, cfg = entry_point.load()()
File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/importer.py", line 26, in entry_point
plugin_config = read_json_config(CONF_FILENAME)
File "/usr/lib/python2.7/site-packages/pulp/common/config.py", line 672, in read_json_config
config = json.load(f)
File "/usr/lib64/python2.7/json/
_init__.py", line 290, in load
**kw)
File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Workaround:

Do not setup /etc/pulp/server/plugins.conf.d/yum_importer.json before the first pulp-manage-db execution.

  1. rm /etc/pulp/server/plugins.conf.d/yum_importer.json
  1. sudo -u apache pulp-manage-db
    Mongo database for connection is version 2.6.9
    Loading content types.
    Loading type descriptors [iso_support.json, rpm_support.json, puppet.json]
    Parsing type descriptors
    Validating type descriptor syntactic integrity
    Validating type descriptor semantic integrity
    Updating the database with types [iso, distribution, drpm, erratum, package_group, package_category, package_environment, rpm, srpm, yum_repo_metadata_file, puppet_module]
    Content types loaded.
    Ensuring the admin role and user are in place.
    Admin role and user are in place.
    Beginning database migrations.
    Migration package pulp.server.db.migrations is up to date at version 12
    Migration package pulp_puppet.plugins.migrations is up to date at version 2
    Applying pulp_rpm.plugins.migrations version 16
    Loaded plugin yum_distributor for types: rpm,srpm,drpm,erratum,package_group,package_category,distribution,yum_repo_metadata_file
    Loaded plugin export_distributor for types: rpm,srpm,drpm,erratum,distribution,package_category,package_group
    Loaded plugin iso_distributor for types: iso
    Loaded plugin puppet_distributor for types: puppet_module
    Loaded plugin puppet_file_distributor for types: puppet_module
    Loaded plugin puppet_install_distributor for types: puppet_module
    Loaded plugin group_export_distributor for types: rpm,srpm,drpm,erratum,distribution,package_category,package_group
    Loaded plugin yum_importer for types: distribution,drpm,erratum,package_group,package_category,rpm,srpm,yum_repo_metadata_file,package_environment
    Loaded plugin iso_importer for types: iso
    Loaded plugin puppet_importer for types: puppet_module
    Loaded plugin yum_profiler for types: rpm,erratum
    Loaded plugin puppet_whole_repo_profiler for types: puppet_module
    Loaded plugin yum for types: rpm
    Loaded plugin rhui for types: rpm
    Migration to pulp_rpm.plugins.migrations version 16 complete.
    Applying pulp_rpm.plugins.migrations version 17
    Migration to pulp_rpm.plugins.migrations version 17 complete.
    Applying pulp_rpm.plugins.migrations version 18
    Migration to pulp_rpm.plugins.migrations version 18 complete.
    Applying pulp_rpm.plugins.migrations version 19
    Migration to pulp_rpm.plugins.migrations version 19 complete.
    Applying pulp_rpm.plugins.migrations version 20
    Migration to pulp_rpm.plugins.migrations version 20 complete.
    Applying pulp_rpm.plugins.migrations version 21
    Migration to pulp_rpm.plugins.migrations version 21 complete.
    Database migrations complete.

And then populate the file /etc/pulp/server/plugins.conf.d/yum_importer.json

  1. systemctl restart pulp_workers
  1. sudo -u apache pulp-manage-db
    Mongo database for connection is version 2.6.9
    Loading content types.
    Loading type descriptors [iso_support.json, rpm_support.json, puppet.json]
    Parsing type descriptors
    Validating type descriptor syntactic integrity
    Validating type descriptor semantic integrity
    Updating the database with types [iso, distribution, drpm, erratum, package_group, package_category, package_environment, rpm, srpm, yum_repo_metadata_file, puppet_module]
    Content types loaded.
    Ensuring the admin role and user are in place.
    Admin role and user are in place.
    Beginning database migrations.
    Migration package pulp.server.db.migrations is up to date at version 12
    Migration package pulp_puppet.plugins.migrations is up to date at version 2
    Migration package pulp_rpm.plugins.migrations is up to date at version 21
    Database migrations complete.
  1. rpm -qi pulp-server
    Name : pulp-server
    Version : 2.6.2
    Release : 1.el7
    Architecture: noarch
    Install Date: vie 26 jun 2015 12:43:21 ART
    Group : Development/Languages
    Size : 2944352
    License : GPLv2
    Signature : RSA/SHA1, mar 02 jun 2015 17:08:15 ART, Key ID 1af3d5972c7e5d9a
    Source RPM : pulp-2.6.2-1.el7.src.rpm
    Build Date : mar 02 jun 2015 16:20:17 ART
    Build Host : ip-10-88-183-59.ec2.internal
    Relocations : (not relocatable)
    Packager : Koji
    Vendor : Koji
    URL : https://fedorahosted.org/pulp/
    Summary : The pulp platform server
    Description :
    Pulp provides replication, access, and accounting for software repositories.

Cheers.

History

#1 Updated by mhrivnak over 5 years ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes

#2 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - WONTFIX

#3 Updated by bmbouter over 1 year ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

#4 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF