跳转到: 导航, 搜索

Manila/specs/split-storage-actions-computing-and-networking

拆分存储、计算和网络操作

此页面描述了共享配置概念的变更、接口变更和所需的实现。

简介

目前,Manila 具有不同的共享驱动,它们在一个模块中实现存储活动、计算和网络,在某些情况下仅使用 neutron 网络插件。

我们应该将其拆分为逻辑部分

1) share driver (storage activities)
2) compute helper (share server supply)
3) networking helper (network related logic)

作为应该实现的接口。

详情

(1) share driver will implement all main interfaces:
- create/delete share f/wo snapshot
- create/delete snapshot
- allow/deny access

为了获取共享服务器,它将使用提供的“计算助手”之一。

(2) compute helper will implement interfaces of share server creation and deletion. It will use "networking helper"

可能的实现

- Nova and VMs
- Ironic and hardware hosts
- storage-based (vservers in NetApp cDOT, etc...)
(3) networking helper will handle all network-related stuff, like:
- no network creation, no share server creation, usage of predefined share server (analog of so called single-tenancy)
- no network creation, share server creation with address from predefined network (combination of single and multi tenancy)
- creation of network (using either neutron or no-network), creation of share server (analog of so called multi-tenancy)

请参阅共享驱动程序 - 计算助手协作图:https://docs.google.com/drawings/d/1qUCBzIBnxDSJElWHydLlMIQAZznJttrYjr0thP1O-N4/edit?usp=sharing

建议的变更

共享管理器

并行创建“ShareManagerV2”和“ShareManager”,然后删除“ShareManager”的使用,然后完全删除“ShareManager”并将“ShareManagerV2”重命名为“ShareManager”。

共享驱动

接口:将保持相同,除了以下几点:“setup_server”和“teardown_server”将被更改为使用计算助手

计算助手

接口

a) get_share_server(self, context, share_network_id)
-- share server either will be created or reused existed one based on share network.
-- security services will be taken from DB using "share_network_id" if some exist
-- should return id of share server either explicitly or as exception object attribute
b) delete_share_server(self, context, share_server)
-- delete share server and release all allocated resources

共享服务器将由共享管理器和共享驱动程序使用。

网络助手

共享网络模型应扩展以下新选项

1) --nova-network-id
will be used for getting all required info from nova-network. It is mutually exclusive with following options and existing neutron options.
2) --flat-network-ip-pool
it will expect CIDR , list of CIDRs , list of IPS, list of CIDRs and IPs as values to be used for IP provisioning. It is mutually exclusive with following and above options and existing neutron options.
3) --dhcp-endpoint
it wil be used to get IP address from. It is mutually exclusive with above options and existing neutron options.

网络助手将为每种模式定义三个插件,以下是它如何决定使用哪个插件的描述

flat_network: --dhcp-endpoint --flat-network-ip-pool

nova-network: --nova-network-id

neutron_network: --neutron-net-id --neutron-subnet-id

不应允许为共享网络设置相互矛盾的选项。

接口

a) allocate_network(self, context, share_server, share_network, amount_of_ports, **kwargs) 
will get network data from share network, then will allocate required net resources for share server.
b) deallocate_network(self, context, share_server) 
will read all allocated network data for share server and release it.

模块

模块将存储如下

共享驱动

接口

- manila/share/driver.py

实现

- manila/share/drivers/generic.py
- manila/share/drivers/netapp/cluster_mode.py
- manila/share/drivers/emc/driver.py
- manila/share/drivers/ibm/gpfs.py
- manila/share/drivers/glusterfs.py

计算助手

接口

- manila/share/compute_helper.py

实现

- manila/share/compute_helpers/nova.py
- manila/share/compute_helpers/ironic.py
- manila/share/compute_helpers/netapp.py
- manila/share/compute_helpers/emc.py

网络助手

接口

- manila/share/network_helper.py

实现

- manila/share/network_helpers/flat_network.py
- manila/share/network_helpers/nova_network.py
- manila/share/network_helpers/neutron.py