Creating MongoDB cluster failed with multiple tenant networks

Bug #1715834 reported by tianhui
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Medium
zhanggang

Bug Description

when there multiple networks in create a cluster, the mongos and configsvr instance can not be built

2017-09-08 10:38:24.138 29992 ERROR trove.taskmanager.models [-] Failed to create server for instance 2202f36d-106f-4a84-bc40-e1bace815c80
Multiple possible networks found, use a Network ID to be more specific. (HTTP 409) (Request-ID: req-ebdf65f1-093c-4edf-821a-58254865e85b)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trove/taskmanager/models.py", line 793, in _create_server_volume_individually
    availability_zone, nics, files)
  File "/usr/lib/python2.7/site-packages/trove/taskmanager/models.py", line 918, in _create_server
    config_drive=config_drive, meta=metadata)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line 1233, in create
    **boot_kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line 667, in _boot
    return_raw=return_raw, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 345, in _create
    resp, body = self.api.client.post(url, body=body)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 455, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 430, in _cs_request
    resp, body = self._time_request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 403, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 397, in request
    raise exceptions.from_response(resp, body, url, method)
Conflict: Multiple possible networks found, use a Network ID to be more specific. (HTTP 409) (Request-ID: req-ebdf65f1-093c-4edf-821a-58254865e85b)

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

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

Changed in trove:
assignee: nobody → tianhui (tianhui)
status: New → In Progress
Changed in trove:
importance: Undecided → Medium
tianhui (tianhui)
description: updated
Zhao Chao (zhaochao1984)
summary: - when there are multifle networks in create a mongodb cluster
+ Creating MongoDB cluster failed with multiple tenant networks
zhanggang (gangzh)
Changed in trove:
assignee: tianhui (tianhui) → zhanggang (gangzh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/502375
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=172b6e08b4fe3d36c0258d414bec5f437dfdf2a2
Submitter: Zuul
Branch: master

commit 172b6e08b4fe3d36c0258d414bec5f437dfdf2a2
Author: zhanggang <email address hidden>
Date: Wed Mar 7 14:08:14 2018 +0800

    Fix create mongodb cluster error in multi-network env

    Currently, the code pass "nics=None" when create mongos and config-server
    during creating mongodb cluster. If we didn't specify the parameter
    `default_neutron_networks` in trove config file, the value "None"
    will pass in nova.server.create() eventually, and in a multi network
    openstack environments, this could raise a “Multiple possible networks
    found, use a Network ID to be more specific" conflict.
    This patch fix the bug by specify the value of nics, besides, since the
    method `validate_instance_nics` has been added[1], we can safely use the
    first value of instances just like "volume_size".

    [1] https://review.openstack.org/#/c/522553/

    Change-Id: Idf2faf2d619afe132c19d8c9b3c76b1c2c24ec8e
    Closes-bug: #1715834

Changed in trove:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Zhao Chao (<email address hidden>) on branch: master
Review: https://review.openstack.org/550397
Reason: Abandon this as https://review.openstack.org/#/c/502375/ has been merged.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/trove 10.0.0.0b1

This issue was fixed in the openstack/trove 10.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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