driver uses router when connect_share_server_to_tenant_network config option is enabled

Bug #1410246 reported by Rodrigo Barbieri
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
Valeriy Ponomaryov

Bug Description

The option "connect_share_server_to_tenant_network", found in service_instance.py, is related to being able to create the share server VM in the private network directly instead of in Manila Service Network when set to True.

According to that description, the following scenario should work, but is currently failing.

1) Clean devstack environment
2) Add "connect_share_server_to_tenant_network = True" to /etc/manila/manila.conf, under [generic1]
3) Restart m-shr in screen
4) Remove private network interface from router1
5) Create Share Network (share_net_1) on private network
6) Create Share (share_1) on share_net_1.

The correct behavior should be to create the SVM only in the private network, with an IP address such as 10.0.0.2. But instead, it fails with an error saying the private network is not connected to any router (see trace below). If step (4) is skipped, it will create the SVM with 2 network interfaces: one in Manila Service Network, and one in tenant network, while the prior is not intended when the setting "connect_share_server_to_tenant_network" is enabled.

2015-01-12 15:57:09.306 ERROR manila.share.manager [req-b02c7479-75c4-42bf-92ad-c4c23a4bf382 b3324d3fdcea41bb8e56e737032839eb fe12ff75372b491ea54cf8fb41f0401a] Failed t
o get share server for share creation.
2015-01-12 15:57:09.340 ERROR oslo.messaging.rpc.dispatcher [req-b02c7479-75c4-42bf-92ad-c4c23a4bf382 b3324d3fdcea41bb8e56e737032839eb fe12ff75372b491ea54cf8fb41f0401a]
 Exception during message handling: Subnet gateway is not attached the router.
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 137, in _dispatch_and
_reply
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 180, in _dispatch
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 126, in _do_dispatch
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 236, in create_share
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher {'status': 'error'})
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 82, in __exit__
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 230, in create_share
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher context, share_network_id, share_id)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 181, in _provide_share_server_for_share
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher return _provide_share_server_for_share()
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 431, in inner
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 173, in _provide_share_server_for_share
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher share_server = self._setup_server(context, share_server)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 482, in _setup_server
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher self.driver.deallocate_network(context, share_server['id'])
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 82, in __exit__
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/manager.py", line 455, in _setup_server
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher metadata=metadata)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/generic.py", line 607, in setup_server
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher network_info['neutron_subnet_id'],
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/service_instance.py", line 297, in set_up_service_instance
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher neutron_subnet_id)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/service_instance.py", line 392, in _create_service_instance
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher neutron_subnet_id)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 431, in inner
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/service_instance.py", line 503, in _setup_network_for_instance
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher neutron_net_id, neutron_subnet_id)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 431, in inner
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/manila/manila/share/drivers/service_instance.py", line 550, in _get_private_router
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher _('Subnet gateway is not attached the router.'))
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher ServiceInstanceException: Subnet gateway is not attached the router.
2015-01-12 15:57:09.340 TRACE oslo.messaging.rpc.dispatcher

summary: - driver should not use router when connect_share_server_to_tenant_network
- config option is enabled
+ driver uses router when connect_share_server_to_tenant_network config
+ option is enabled
Changed in manila:
importance: Undecided → High
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
milestone: none → kilo-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/148230
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=efb4f1cdf5c62d90d54450e26971e6e596efe631
Submitter: Jenkins
Branch: master

commit efb4f1cdf5c62d90d54450e26971e6e596efe631
Author: Valeriy Ponomaryov <email address hidden>
Date: Mon Jan 19 13:04:10 2015 +0200

    Do not use router for service instance with direct connect

    For Nova VMs we have two possible approaches for network access:
    1) using router
    2) using direct connection and two net interfaces.

    Now code of "service_instance" module requires tenant network to be attached
    to public router in both cases, but should do it only in first case.

    Remove dependency on router when config option
    'connect_share_server_to_tenant_network' is set to True.

    Change-Id: Ib515c0b64b500712c5682c03fa69377eed8e038d
    Closes-Bug: #1410246

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: kilo-2 → 2015.1.0
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.