resolve ResourceProviderSyncFailed issue in python3

Bug #1893864 reported by Yingji Sun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Yingji Sun
Ussuri
Fix Released
Undecided
Balazs Gibizer

Bug Description

Description
===========
In recent code of Train, the VMs booted runs into ERROR state The synchronize the placement service with resource provider information supplied by the compute host fails

This is caused by the "/" operation difference between python 2.x and python 3.x

In python 2.x "/" int / int returns int while
in python 3.x int / int return the real result.

Environment
===========
vmware setup

Logs & Configs
==============

^[[01;31mERROR nova.scheduler.client.report [^[[01;36mNone req-030a4d73-5bf1-4080-8b39-d637270055e0 ^[[00;36madmin admin^[[01;31m] ^[[01;35m^[[01;31m[req-b1da7c1f-6f45-412c-9740-0f27495b1f23] Failed to update inventory to [{'VCPU': {'total': 12, 'reserved': 0, 'min_unit': 1, 'max_unit': 4, 'step_size': 1, 'allocation_ratio': 100.0}, 'MEMORY_MB': {'total': 49149, 'reserved': 512, 'min_unit': 1, 'max_unit': 16383, 'step_size': 1, 'allocation_ratio': 1.5}, 'DISK_GB': {'total': 3025, 'reserved': 0, 'min_unit': 1, 'max_unit': 0, 'step_size': 1, 'allocation_ratio': 1.0}}] for resource provider with UUID 33c124a0-1ebc-4a36-a1fd-b6cd9d104c49. Got 400: {"errors": [{"status": 400, "title": "Bad Request", "detail": "The server could not comply with the request since it is either malformed or otherwise incorrect.\n\n JSON does not validate: 0 is less than the minimum of 1 Failed validating 'minimum' in schema['properties']['inventories']['patternProperties']['^[A-Z0-9_]+$']['properties']['max_unit']: {'maximum': 2147483647, 'minimum': 1, 'type': 'integer'} On instance['inventories']['DISK_GB']['max_unit']: 0 ", "code": "placement.undefined_code", "request_id": "req-b1da7c1f-6f45-412c-9740-0f27495b1f23"}]}^[[00m^[[00m
^[[00;32mDEBUG oslo_concurrency.lockutils [^[[01;36mNone req-030a4d73-5bf1-4080-8b39-d637270055e0 ^[[00;36madmin admin^[[00;32m] ^[[01;35m^[[00;32mLock "compute_resources" released by "nova.compute.resource_tracker.ResourceTracker.instance_claim" :: held 1.016s^[[00m ^[[00;33m{{(pid=6347) inner /usr/local/lib/python3.6/dist-packages/oslo_concurrency/lockutils.py:339}}^[[00m^[[00m
^[[01;31mERROR nova.compute.manager [^[[01;36mNone req-030a4d73-5bf1-4080-8b39-d637270055e0 ^[[00;36madmin admin^[[01;31m] ^[[01;35m[instance: e5083b01-f490-4031-b25c-edd6d86dd62f] ^[[01;31mFailed to build and run instance^[[00m: nova.exception.ResourceProviderSyncFailed: Failed to synchronize the placement service with resource provider information supplied by the compute host.

Yingji Sun (yingjisun)
tags: added: ussuri-backport-potential
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :
no longer affects: nova/trunk
no longer affects: nova/victoria
Changed in nova:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Yingji Sun (yingjisun)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/749668

tags: added: vmware
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/ussuri)

Reviewed: https://review.opendev.org/749668
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f5f184ea1b14180d5e45b929eaa93992c1bd845c
Submitter: Zuul
Branch: stable/ussuri

commit f5f184ea1b14180d5e45b929eaa93992c1bd845c
Author: yingjisun <email address hidden>
Date: Wed Jul 22 19:12:31 2020 +0800

    resolve ResourceProviderSyncFailed issue

    This is caused by the "/" operation difference between python 2.x and python 3.x

    In python 2.x "/" int / int returns int while
    in python 3.x int / int return the real result.

    Closes-Bug: #1893864

    Change-Id: I1aa96bdc2fdb2ca856b73b91e3120c75ec104537
    (cherry picked from commit 73aad31a3496519311295d041235380cdaa719e3)

Changed in nova:
status: Fix Committed → Fix Released
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.