Empty JSON caused: Error during ComputeManager._run_image_cache_manager_pass: No JSON object could be decoded

Bug #1252659 reported by Alvaro Lopez
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Alvaro Lopez

Bug Description

Hi.

An empty file CONF.instances_path/compute_nodes is causing the following
error. This prevents the image cache manager to run (i do not know if it has
some other consequences):

    INFO nova.compute.resource_tracker [-] Compute_service record updated for XXX.ifca.es:XXX.ifca.es
    ERROR nova.openstack.common.periodic_task [-] Error during ComputeManager._run_image_cache_manager_pass: No JSON object could be decoded
    TRACE nova.openstack.common.periodic_task Traceback (most recent call last):
    TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.7/dist-packages/nova/openstack/common/periodic_task.py", line 180, in run_periodic_tasks
    TRACE nova.openstack.common.periodic_task task(self, context)
    TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 5040, in _run_image_cache_manager_pass
    TRACE nova.openstack.common.periodic_task storage_users.register_storage_use(CONF.instances_path, CONF.host)
    TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.7/dist-packages/nova/virt/storage_users.py", line 65, in register_storage_use
    TRACE nova.openstack.common.periodic_task return do_register_storage_use(storage_path, hostname)
    TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py", line 246, in inner
    TRACE nova.openstack.common.periodic_task return f(*args, **kwargs)
    TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.7/dist-packages/nova/virt/storage_users.py", line 58, in do_register_storage_use
    TRACE nova.openstack.common.periodic_task d = json.loads(f.read())
    TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.7/json/__init__.py", line 328, in loads
    TRACE nova.openstack.common.periodic_task return _default_decoder.decode(s)
    TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
    TRACE nova.openstack.common.periodic_task obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode
    TRACE nova.openstack.common.periodic_task raise ValueError("No JSON object could be decoded")
    TRACE nova.openstack.common.periodic_task ValueError: No JSON object could be decoded
    TRACE nova.openstack.common.periodic_task

Alvaro Lopez (aloga)
description: updated
Changed in nova:
assignee: nobody → Alvaro Lopez (aloga)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/57143

Revision history for this message
George Shuklin (george-shuklin) wrote :

I've checked patchset #9, it works perferctly on ubuntu-cloud-archive version of nova.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/57143
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=80b08a47440e2e0041eb394db4101f29d8e05749
Submitter: Jenkins
Branch: master

commit 80b08a47440e2e0041eb394db4101f29d8e05749
Author: Alvaro Lopez Garcia <email address hidden>
Date: Tue Nov 19 10:10:41 2013 +0100

    Capture exception for JSON load in virt.storage_users

    If CONF.instances_path/compute_nodes is empty when the storage_users
    tries to register the storage use (virt.storage_users.register_storage_use)
    the exception is uncaught and raised. As a consequence, the image cache
    manager won't run.

    Closes-Bug: #1252659

    Change-Id: If9ed5e75b0bc0b8f3a7c5fd7ec88f6399e4e59c6

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/73792

Changed in nova:
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.