We have two controllers as HA in our OpenStack environment.
There are watcher-applier and watcher-decision-engine in each
controller. So there are two same name in the services table.
In this case, the objects.Service.get_by_name(context, name)
will trigger exception of MultipleResultsFound.
We should use objects.Service.get(context, id) replace of
objects.Service.get_by_name(context, name).
Reviewed: https:/ /review. openstack. org/447354 /git.openstack. org/cgit/ openstack/ watcher/ commit/ ?id=38a3cbc84a5 9bca4516358a788 de50aca17f7cb5
Committed: https:/
Submitter: Jenkins
Branch: master
commit 38a3cbc84a59bca 4516358a788de50 aca17f7cb5
Author: licanwei <email address hidden>
Date: Mon Mar 20 12:17:34 2017 +0800
exception when running 'watcher service list'
We have two controllers as HA in our OpenStack environment. decision- engine in each Service. get_by_ name(context, name) Found. Service. get(context, id) replace of Service. get_by_ name(context, name).
There are watcher-applier and watcher-
controller. So there are two same name in the services table.
In this case, the objects.
will trigger exception of MultipleResults
We should use objects.
objects.
Change-Id: Ic3ce784590d6c2 a648cb3b2829974 4deed281332
Closes-Bug: #1674196