Add taskmanager_manager option to common

Option `taskmanager_manager` does not have defaults and thus is required
to be set, otherwise trove-taskmanager will fail to start with
AttributeError. In the meanwhile this is not clear what value is expected
as option is not described anywhere.

This change moves option to the general list, which will make it
documented along with setting reasonable default.

Change-Id: I546ffe88b6e135c3f4c6f71b5aef03b92011bed8
This commit is contained in:
Dmitriy Rabotyagov 2021-04-07 17:44:16 +03:00 committed by Dmitriy Rabotyagov
parent dfca9b1943
commit 22b99fb05d
2 changed files with 5 additions and 6 deletions

View File

@ -12,15 +12,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg as openstack_cfg
from oslo_service import service as openstack_service
from trove.cmd.common import with_initialize
extra_opts = [openstack_cfg.StrOpt('taskmanager_manager')]
def startup(conf, topic):
from trove.common import notification
from trove.common.rpc import service as rpc_service
@ -43,11 +39,11 @@ def startup(conf, topic):
launcher.wait()
@with_initialize(extra_opts=extra_opts)
@with_initialize
def main(conf):
startup(conf, conf.taskmanager_queue)
@with_initialize(extra_opts=extra_opts)
@with_initialize
def mgmt_main(conf):
startup(conf, "mgmt-taskmanager")

View File

@ -112,6 +112,9 @@ common_opts = [
help='Service type to use when searching catalog.'),
cfg.StrOpt('glance_endpoint_type', default='publicURL',
help='Service endpoint type to use when searching catalog.'),
cfg.StrOpt('taskmanager_manager',
default='trove.taskmanager.manager.Manager',
help='Driver for taskmanager'),
cfg.StrOpt('trove_url', help='URL without the tenant segment.'),
cfg.StrOpt('trove_service_type', default='database',
help='Service type to use when searching catalog.'),