File: share-network-operations.rst

package info (click to toggle)
manila 1%3A11.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 18,432 kB
  • sloc: python: 210,959; sh: 1,959; pascal: 817; makefile: 63
file content (314 lines) | stat: -rw-r--r-- 26,018 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
.. _share_network:

================================
Create and manage share networks
================================

.. contents:: :local:

A share network stores network information to create and manage shares. A share
network provides a way to designate a network to export shares upon. In the
most common use case, you can create a share network with a private OpenStack
(neutron) network that you own. If the share network is an isolated network,
manila can provide hard guarantees of network and data isolation for your
shared file systems in a multi-tenant cloud. In some clouds, however, shares
cannot be exported directly upon private project networks; and the cloud may
have provider networks that are designated for use with share networks.

In either case, as long as the underlying network is connected to the clients
(virtual machines, containers or bare metals), there will exist a direct path
to communicate with shares exported on the share networks.

.. important::

   In order to use share networks, the share type you choose must have the
   extra specification ``driver_handles_share_servers`` set to True.

Create share networks
~~~~~~~~~~~~~~~~~~~~~

#. Create a share network.

   .. code-block:: console

      $ manila share-network-create \
         --name sharenetwork1 \
         --description "Share Network created for demo purposes" \
         --neutron-net-id c297b020-025a-4f3e-8120-57ea90404afb \
         --neutron-subnet-id 29ecfbd5-a9be-467e-8b4a-3415d1f82888
      +-------------------+-----------------------------------------+
      | Property          | Value                                   |
      +-------------------+-----------------------------------------+
      | name              | sharenetwork1                           |
      | segmentation_id   | None                                    |
      | created_at        | 2019-07-02T11:14:06.228816              |
      | neutron_subnet_id | 29ecfbd5-a9be-467e-8b4a-3415d1f82888    |
      | updated_at        | None                                    |
      | network_type      | None                                    |
      | neutron_net_id    | c297b020-025a-4f3e-8120-57ea90404afb    |
      | ip_version        | None                                    |
      | cidr              | None                                    |
      | project_id        | 907004508ef4447397ce6741a8f037c1        |
      | id                | feed6a6c-f9e0-45ba-9a2b-0db76bde63e1    |
      | description       | Share Network created for demo purposes |
      +-------------------+-----------------------------------------+

#. Show the created share network.

   .. code-block:: console

      $ manila share-network-show sharenetwork1
      +-------------------+--------------------------------------+
      | Property          | Value                                |
      +-------------------+--------------------------------------+
      | id                | feed6a6c-f9e0-45ba-9a2b-0db76bde63e1 |
      | name              | sharenetwork1                        |
      | project_id        | 5b23075b4b504261a5987b18588f86cf     |
      | created_at        | 2019-10-09T04:19:31.000000           |
      | updated_at        | None                                 |
      | neutron_net_id    | c297b020-025a-4f3e-8120-57ea90404afb |
      | neutron_subnet_id | 29ecfbd5-a9be-467e-8b4a-3415d1f82888 |
      | network_type      | None                                 |
      | segmentation_id   | None                                 |
      | cidr              | None                                 |
      | ip_version        | None                                 |
      | description       | None                                 |
      | gateway           | None                                 |
      | mtu               | None                                 |
      +-------------------+--------------------------------------+

   .. note::
      Since API version 2.51, a share network is able to span multiple
      subnets in different availability zones and the network information
      will be stored on each subnet. To accommodate adding multiple subnets,
      the share network create command was updated to accept an availability
      zone as parameter. This parameter will be used in the share network
      creation process which also creates a new subnet. If you do not specify
      an availability zone, the created subnet will be considered default by
      the Shared File Systems service. A default subnet is expected to be
      available in all availability zones of the cloud. So when you are
      creating a share network, the output will be similar to:

   .. code-block:: console

      $ manila share-network-create \
         --name sharenetwork1 \
         --description "Share Network created for demo purposes" \
         --availability-zone manila-zone-0
      +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Property              | Value                                                                                                                                                                                                                                                                                                                    |
      +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | id                    | feed6a6c-f9e0-45ba-9a2b-0db76bde63e1                                                                                                                                                                                                                                                                                     |
      | name                  | sharenetwork1                                                                                                                                                                                                                                                                                                            |
      | project_id            | 8c2962a4832743469a336f7c179f7d34                                                                                                                                                                                                                                                                                         |
      | created_at            | 2019-10-09T04:19:31.000000                                                                                                                                                                                                                                                                                               |
      | updated_at            | None                                                                                                                                                                                                                                                                                                                     |
      | description           | Share Network created for demo purposes                                                                                                                                                                                                                                                                                  |
      | share_network_subnets | [{'id': '900d9ddc-7062-404e-8ef5-f63b84782d89', 'availability_zone': 'manila-zone-0', 'created_at': '2019-10-09T04:19:31.000000', 'updated_at': None, 'segmentation_id': None, 'neutron_subnet_id': None, 'neutron_net_id': None, 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}] |
      +-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

List share networks
~~~~~~~~~~~~~~~~~~~

#. List share networks.

   .. code-block:: console

      $ manila share-network-list
      +--------------------------------------+---------------+
      | id                                   | name          |
      +--------------------------------------+---------------+
      | feed6a6c-f9e0-45ba-9a2b-0db76bde63e1 | sharenetwork1 |
      +--------------------------------------+---------------+

Update share networks
~~~~~~~~~~~~~~~~~~~~~

#. Update the share network data.

   .. code-block:: console

      $ manila share-network-update sharenetwork1 \
         --neutron-net-id a27160ca-5595-4c62-bf54-a04fb7b14316 \
         --neutron-subnet-id f043f4b0-c05e-493f-bbe9-99689e2187d2
         +-------------------+--------------------------------------+
         | Property          | Value                                |
         +-------------------+--------------------------------------+
         | id                | feed6a6c-f9e0-45ba-9a2b-0db76bde63e1 |
         | name              | sharenetwork1                        |
         | project_id        | 5b23075b4b504261a5987b18588f86cf     |
         | created_at        | 2019-10-09T04:19:31.000000           |
         | updated_at        | 2019-10-10T17:14:08.970945           |
         | neutron_net_id    | a27160ca-5595-4c62-bf54-a04fb7b14316 |
         | neutron_subnet_id | f043f4b0-c05e-493f-bbe9-99689e2187d2 |
         | network_type      | None                                 |
         | segmentation_id   | None                                 |
         | cidr              | None                                 |
         | ip_version        | None                                 |
         | description       | None                                 |
         | gateway           | None                                 |
         | mtu               | None                                 |
         +-------------------+--------------------------------------+

#. Show details of the updated share network.

   .. code-block:: console

      $ manila share-network-show sharenetwork1
      +-------------------+--------------------------------------+
      | Property          | Value                                |
      +-------------------+--------------------------------------+
      | id                | feed6a6c-f9e0-45ba-9a2b-0db76bde63e1 |
      | name              | sharenetwork1                        |
      | project_id        | 5b23075b4b504261a5987b18588f86cf     |
      | created_at        | 2019-10-09T04:19:31.000000           |
      | updated_at        | 2019-10-10T17:14:09.000000           |
      | neutron_net_id    | a27160ca-5595-4c62-bf54-a04fb7b14316 |
      | neutron_subnet_id | f043f4b0-c05e-493f-bbe9-99689e2187d2 |
      | network_type      | None                                 |
      | segmentation_id   | None                                 |
      | cidr              | None                                 |
      | ip_version        | None                                 |
      | description       | None                                 |
      | gateway           | None                                 |
      | mtu               | None                                 |
      +-------------------+--------------------------------------+

   .. note::
      You cannot update the ``neutron_net_id`` and ``neutron_subnet_id`` of
      a share network that has shares exported onto it.

   .. note::
      From API version 2.51, updating the ``neutron_net_id`` and
      ``neutron_subnet_id`` is possible only for a default subnet. Non default
      subnets cannot be updated after they are created. You may delete the
      subnet in question, and re-create it. The output will look as shown
      below:

   .. code-block:: console

      $ manila share-network-update sharenetwork1 \
         --neutron-net-id a27160ca-5595-4c62-bf54-a04fb7b14316 \
         --neutron-subnet-id f043f4b0-c05e-493f-bbe9-99689e2187d2
      +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Property              | Value                                                                                                                                                                                                                                                                                                                                                                                                     |
      +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | id                    | feed6a6c-f9e0-45ba-9a2b-0db76bde63e1                                                                                                                                                                                                                                                                                                                                                                      |
      | name                  | sharenetwork1                                                                                                                                                                                                                                                                                                                                                                                             |
      | project_id            | 8c2962a4832743469a336f7c179f7d34                                                                                                                                                                                                                                                                                                                                                                          |
      | created_at            | 2019-10-09T04:19:31.000000                                                                                                                                                                                                                                                                                                                                                                                |
      | updated_at            | 2019-10-10T17:14:09.000000                                                                                                                                                                                                                                                                                                                                                                                |
      | description           | Share Network created for demo purposes                                                                                                                                                                                                                                                                                                                                                                   |
      | share_network_subnets | [{'id': '900d9ddc-7062-404e-8ef5-f63b84782d89', 'availability_zone': None, 'created_at': '2019-10-09T04:19:31.000000', 'updated_at': '2019-10-09T07:39:59.000000', 'segmentation_id': None, 'neutron_net_id': 'a27160ca-5595-4c62-bf54-a04fb7b14316', 'neutron_subnet_id': 'f043f4b0-c05e-493f-bbe9-99689e2187d2', 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}] |
      +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Share network show
~~~~~~~~~~~~~~~~~~

#. Show details of a share network.

   .. code-block:: console

      $ manila share-network-show sharenetwork1
      +-------------------+--------------------------------------+
      | Property          | Value                                |
      +-------------------+--------------------------------------+
      | id                | feed6a6c-f9e0-45ba-9a2b-0db76bde63e1 |
      | name              | sharenetwork1                        |
      | project_id        | 5b23075b4b504261a5987b18588f86cf     |
      | created_at        | 2019-10-09T04:19:31.000000           |
      | updated_at        | 2019-10-10T17:14:09.000000           |
      | neutron_net_id    | fake_updated_net_id                  |
      | neutron_subnet_id | fake_updated_subnet_id               |
      | network_type      | None                                 |
      | segmentation_id   | None                                 |
      | cidr              | None                                 |
      | ip_version        | None                                 |
      | description       | None                                 |
      | gateway           | None                                 |
      | mtu               | None                                 |
      +-------------------+--------------------------------------+

   .. note::
      Since API version 2.51, the ``share-network-show`` command also shows
      a list of subnets contained in the share network as show below.

   .. code-block:: console

      +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Property              | Value                                                                                                                                                                                                                                                                                                                                                                                                     |
      +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | id                    | feed6a6c-f9e0-45ba-9a2b-0db76bde63e1                                                                                                                                                                                                                                                                                                                                                                      |
      | name                  | sharenetwork1                                                                                                                                                                                                                                                                                                                                                                                             |
      | project_id            | 8c2962a4832743469a336f7c179f7d34                                                                                                                                                                                                                                                                                                                                                                          |
      | created_at            | 2019-10-09T04:19:31.000000                                                                                                                                                                                                                                                                                                                                                                                |
      | updated_at            | None                                                                                                                                                                                                                                                                                                                                                                                                      |
      | description           | Share Network created for demo purposes                                                                                                                                                                                                                                                                                                                                                                   |
      | share_network_subnets | [{'id': '900d9ddc-7062-404e-8ef5-f63b84782d89', 'availability_zone': None, 'created_at': '2019-10-09T04:19:31.000000', 'updated_at': '2019-10-09T07:39:59.000000', 'segmentation_id': None, 'neutron_net_id': 'fake_updated_net_id', 'neutron_subnet_id': 'fake_updated_subnet_id', 'ip_version': None, 'cidr': None, 'network_type': None, 'mtu': None, 'gateway': None}]                                |
      +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Add security service/s
~~~~~~~~~~~~~~~~~~~~~~

#. Add a pre existent security service in a given share network.

   .. code-block:: console

      $ manila share-network-security-service-add \
          sharenetwork1 \
          my_sec_service
      $ manila share-network-security-service-list sharenetwork1
      +--------------------------------------+----------------+--------+------+
      | id                                   | name           | status | type |
      +--------------------------------------+----------------+--------+------+
      | 50303c35-2c53-4d37-a0d9-61dfe3789569 | my_sec_service | new    | ldap |
      +--------------------------------------+----------------+--------+------+

List share network security services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. List all the security services existent in a share network.

   .. code-block:: console

      $ manila share-network-security-service-list sharenetwork1
      +--------------------------------------+----------------+--------+------+
      | id                                   | name           | status | type |
      +--------------------------------------+----------------+--------+------+
      | 50303c35-2c53-4d37-a0d9-61dfe3789569 | my_sec_service | new    | ldap |
      +--------------------------------------+----------------+--------+------+

Remove a security service from a share network
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. Remove a security service from a given share network.

   .. code-block:: console

      $ manila share-network-security-service-remove \
         sharenetwork1 \
         my_sec_service
      $ manila share-network-security-service-list sharenetwork1
      +----+------+--------+------+
      | id | name | status | type |
      +----+------+--------+------+
      +----+------+--------+------+

Delete share networks
~~~~~~~~~~~~~~~~~~~~~

#. Delete a share network.

   .. code-block:: console

      $ manila share-network-delete sharenetwork1

#. List all share networks

   .. code-block:: console

      $ manila share-network-list
      +--------------------------------------+---------------+
      | id                                   | name          |
      +--------------------------------------+---------------+
      +--------------------------------------+---------------+