Comment 2 for bug 1709260

Revision history for this message
Rajesh Tailor (ratailor) wrote :

Hi Sylvain,

I have debugged the issue and found that IMO it has nothing to do with scheduler.

While adding host to host-aggregate, the below db query should not matched to existing db record.
Since mysql doesn't support case-sensitive column.

The problematic block of code is below:
https://github.com/openstack/nova/blob/master/nova/objects/host_mapping.py#L90-L93

    def _get_by_host_from_db(context, host):
        db_mapping = (context.session.query(api_models.HostMapping)
                      .options(joinedload('cell_mapping'))
                      .filter(api_models.HostMapping.host == host)).first()