Bug 1730200 - pulp_docker.plugins.migrations fails on No JSON object could be decoded
Summary: pulp_docker.plugins.migrations fails on No JSON object could be decoded
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Pulp
Version: 6.5.0
Hardware: x86_64
OS: Linux
unspecified
medium vote
Target Milestone: 6.6.0
Assignee: satellite6-bugs
QA Contact: Kersom
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-16 07:20 UTC by Kenny Tordeurs
Modified: 2019-10-22 07:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-26 20:47:02 UTC
Target Upstream Version:


Attachments (Terms of Use)
test_manifest_list.py (580 bytes, text/x-python)
2019-07-16 07:24 UTC, Kenny Tordeurs
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4288211 None None None 2019-07-17 07:31:49 UTC

Description Kenny Tordeurs 2019-07-16 07:20:27 UTC
Description of problem:
Upgrading Satellite from 6.4 to 6.5 fails with the following error:
~~~~
[root@Satellite]# su - apache -s /bin/bash -c pulp-manage-db
.
.

Applying pulp_docker.plugins.migrations version 500
*******************************************************************************
* Migrating Update manifest field on ManifestList content...
*******************************************************************************
Applying migration pulp_docker.plugins.migrations.0500_upstream_0006_add_arch_os_size_fields 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 239, in main
    return _auto_manage_db(options)
  File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 306, in _auto_manage_db
    migrate_database(options)
  File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 135, in migrate_database
    update_current_version=not options.test)
  File "/usr/lib/python2.7/site-packages/pulp/server/db/migrate/models.py", line 189, in apply_migration
    migration.migrate()
  File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/migrations/0500_upstream_0006_add_arch_os_size_fields.py", line 12, in migrate
    migrate_manifest_list()
  File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/migrations/0500_upstream_0006_add_arch_os_size_fields.py", line 31, in migrate_manifest_list
    manifest_list_json = json.load(fd)
  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 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
~~~~

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

How reproducible:
Not without customer data

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Kenny Tordeurs 2019-07-16 07:24:12 UTC
Created attachment 1590992 [details]
test_manifest_list.py

A script was created to find missing files on FS for the defined storage_path in the units_docker_manifest_list collection
1) Download the attached "test_manifest_list.py" file to the Satellite
2) cd to the directory where the "test_manifest_list.py" is located then run:
# python test_manifest_list.py

3) The script should print out the file path of the broken manifest list.


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