Browse Source

Volume connection information for Ironic nodes

This spec defines data model and REST APIs for boot from volume
support in Ironic.

Co-Authored-By: Ramakrishnan G <rameshg87@gmail.com>
Change-Id: Ibf50be735905f868e0d523ab16353a6b5cc300af
Partial-Bug: 1526231
changes/96/200496/41
Satoru Moriya 4 years ago
parent
commit
b5b3a42b26

+ 872
- 0
specs/approved/volume-connection-information.rst View File

@@ -0,0 +1,872 @@
1
+..
2
+ This work is licensed under a Creative Commons Attribution 3.0 Unported
3
+ License.
4
+
5
+ http://creativecommons.org/licenses/by/3.0/legalcode
6
+
7
+==================================================
8
+Add volume connection information for Ironic nodes
9
+==================================================
10
+
11
+https://bugs.launchpad.net/ironic/+bug/1526231
12
+
13
+This RFE introduces the changes in Ironic to support connecting
14
+and booting instances from remote volumes.
15
+
16
+Problem description
17
+===================
18
+
19
+When user starts bare metal instance with Cinder volume, Nova orchestrates
20
+the communication with Cinder and Ironic. The work flow of the boot process is
21
+as follows:
22
+
23
+#. (Preparation) Administrator registers a node with initiator information.
24
+
25
+#. User asks Cinder to create a boot volume.
26
+
27
+#. User asks Nova to boot a node from the Cinder volume.
28
+
29
+#. Nova calls Ironic to collect iSCSI/FC initiator information. Ironic
30
+   collects initiator information and returns it to Nova.
31
+
32
+#. Nova calls Cinder to attach the volume to the node. Cinder attaches the
33
+   volume to the node and returns connection information which includes
34
+   target information.
35
+
36
+#. Nova passes the target information for the node to Ironic
37
+
38
+#. Nova calls Ironic to spawn the instance. Ironic prepares the bare metal
39
+   node to boot from the remote volume which is identified by target
40
+   information and powers on the bare metal node.
41
+
42
+In the work flow above, Nova calls Ironic to get/set initiator/target
43
+information (4 and 6) and also administrator calls Ironic to set initiator
44
+information (1) but currently Ironic has neither those information
45
+nor APIs for them.
46
+
47
+Proposed change
48
+===============
49
+
50
+* Add a new table named ``volume_connectors`` with the below fields:
51
+
52
+  + id
53
+
54
+    - Integer
55
+    - PrimaryKeyConstraint
56
+
57
+  + uuid
58
+
59
+    - String(length=36)
60
+    - UniqueConstraint
61
+
62
+  + node_id
63
+
64
+    - Integer
65
+    - ForeignKeyConstraint('nodes.id')
66
+
67
+  + created_at
68
+
69
+    - DateTime
70
+
71
+  + updated_at
72
+
73
+    - DateTime
74
+
75
+  + type (can have values "iqn", "ip", "mac", "wwnn", "wwpn", "net-id")
76
+
77
+    - String(Length=32)
78
+    - UniqueConstraint(type, connector_id)
79
+
80
+  + connector_id
81
+
82
+    - String(length=255)
83
+    - UniqueConstraint(type, connector_id)
84
+
85
+  + extra
86
+
87
+    - Text
88
+
89
+  .. note::
90
+    Ironic should allow users to set IP and/or MAC address hardcorded into
91
+    `connector_id` field because we can't put any assumptions on the storage
92
+    network. It might be a Neutron network, or it might be a network that the
93
+    OpenStack part of the deployment doesn't know about at all. It depends on
94
+    deployment.
95
+
96
+  .. note::
97
+     `extra` field is text in the database but a dictionary (JSON-encoded
98
+     dict) in the object
99
+
100
+* Add a new table named ``volume_targets`` with the below fields:
101
+
102
+  + id
103
+
104
+    - Integer
105
+    - PrimaryKeyConstraint
106
+
107
+  + uuid
108
+
109
+    - String(length=36)
110
+    - UniqueConstraint
111
+
112
+  + node_id
113
+
114
+    - Integer
115
+    - ForeignKeyConstraint('nodes.id')
116
+
117
+  + created_at
118
+
119
+    - DateTime
120
+
121
+  + updated_at
122
+
123
+    - DateTime
124
+
125
+  + volume_type
126
+
127
+    - String(length=64)
128
+
129
+  + properties
130
+
131
+    - Text
132
+
133
+  + boot_index
134
+
135
+    - Integer
136
+    - UniqueConstraint(node_id, boot_index)
137
+    - This is used for Ironic to distinguish the root volume. Similar to Nova,
138
+      Ironic assumes volumes with boot index 0 are root device.
139
+      (Nova associates a boot index with each block device and assumes volumes
140
+      with boot index 0 are root volumes.)
141
+
142
+  + volume_id
143
+
144
+    - String(length=36)
145
+
146
+  + extra
147
+
148
+    - Text
149
+
150
+  .. note::
151
+     Ironic should clear the connected target information on node tear_down,
152
+     just like it does for instance_info.
153
+
154
+  .. note::
155
+     `properties` and `extra` are text in the database but a dictionary
156
+     (JSON-encoded dict) in the object
157
+
158
+  .. note::
159
+     The contents of the `properties` field depend on volume type. Reference
160
+     information should be added in Bare Metal API document[1]:
161
+
162
+     For iSCSI example::
163
+
164
+       {"auth_method": "CHAP",
165
+        "auth_username": "XXX",
166
+        "auth_password": "XXX",
167
+        "target_iqn": "iqn.2010-10.com.example:vol-X",
168
+        "target_portal": "192.168.0.123:3260",
169
+        "volume_id": "12345678-...",
170
+        "target_lun": 0,
171
+        "access_mode": "rw",
172
+        "target_discovered": false,
173
+        "encrypted": false,
174
+        "qos_specs": null}
175
+
176
+     For iSCSI multipath example::
177
+
178
+       {"auth_method": "CHAP",
179
+        "auth_username": "XXX",
180
+        "auth_password": "XXX",
181
+        "target_iqns": ["iqn.2010-10.com.example:vol-X",
182
+        "iqn.2010-10.com.example:vol-Y"],
183
+        "target_portals": ["192.168.0.123:3260",
184
+        "192.168.0.124:3260"],
185
+        "volume_id": "12345678-...",
186
+        "target_luns": [0, 1],
187
+        "access_mode": "rw",
188
+        "target_discovered": false,
189
+        "encrypted": false,
190
+        "qos_specs": null}
191
+
192
+     For fibre channel example::
193
+
194
+       {"device_path": "/dev/disk/by-path/pci-XXXX",
195
+        "encrypted": false,
196
+        "qos_specs": null,
197
+        "target_lun": 1,
198
+        "access_mode": "rw",
199
+        "target_wwn": ["XXXX"]}
200
+
201
+     REST API masks credential information such as `auth_username` and
202
+     `auth_password` in iSCSI and iSCSI multipath examples in order to avoid
203
+     security risk.
204
+
205
+* Add REST APIs end points to get/set values on them. For details see REST API
206
+  Impact section.
207
+
208
+  + /v1/volume/connectors
209
+  + /v1/volume/targets
210
+  + /v1/nodes/<node_uuid or name>/volume/connectors
211
+  + /v1/nodes/<node_uuid or name>/volume/targets
212
+
213
+* Add new capability flags in ``node.properties['capabilities']``. These flags
214
+  show whether or not the node can boot from volume with each backend. If it
215
+  can boot from volume, we should set the flag to true.
216
+
217
+  + iscsi_boot
218
+  + fibre_channel_boot
219
+
220
+  .. note::
221
+    This should be set to true if the bare metal node supports booting from
222
+    that specific volume.  It might be populated manually by operator or by
223
+    inspection, but that is not in the scope of this spec.
224
+
225
+  .. note::
226
+     In the future, Ironic will provide driver capabilities information[3].
227
+     Nova can use that information to choose appropriate node.
228
+
229
+* If a list of targets are specified, it's up to the driver handling the deploy
230
+  to take care of this.  For multi-pathing, Ironic driver, bare metal hardware
231
+  and the operating system should support it.  If Ironic driver and bare metal
232
+  hardware supports it, but instance operating system doesn't understand it,
233
+  then it might lead to failure in booting the instance or corrupting the
234
+  information in the Cinder volume.
235
+
236
+* Information which is stored in volume_connector and volume_target tables
237
+  are used in drivers in order to boot the node from volume. Changes for
238
+  reference driver, driver interfaces are described in the spec[4].
239
+
240
+
241
+Alternatives
242
+------------
243
+
244
+* Saving connector information in a new node attribute like
245
+  volume_initiator_info. This change has less impact on current code and API
246
+  but proposed one has more benefits such as better integrity check, faster
247
+  query from db and easier to store information related to a particular
248
+  connector.
249
+
250
+* Saving target information in a new node attribute like volume_target_info.
251
+  This change has less impact on current code and API but proposed one has
252
+  more benefits such as better integrity check, faster query from db and
253
+  easier to store information related to a particular target.
254
+
255
+* Saving target information in instance_info along with other instance related
256
+  information. This seems to be straightforward because basically target
257
+  volume information is related to the instance. In this case,
258
+  ``node.instance_info`` is nested to store target information. This makes it
259
+  difficult for users to manipulate target information, and for a driver to
260
+  validate it. On the other hand, current approach can avoid nesting
261
+  instance_info and so it's easier to use those information. Note, ironic
262
+  clears the target connection information on the node tear_down.
263
+
264
+* Not implement storage of target and initiator information, which ultimately
265
+  would not improve user experience and require manual post-deployment
266
+  configuration for out-of-band control. For in-band use, Nova ironic driver
267
+  can manage initiator information and it is proposed by jroll[2].
268
+
269
+Data model impact
270
+-----------------
271
+
272
+* Add new type of object ``VolumeConnector`` in objects/volume_connector.py. It
273
+  inherits IronicObject class. The new object will have the following fields:
274
+
275
+  + ``id``
276
+  + ``uuid``
277
+  + ``node_id``
278
+  + ``type``
279
+  + ``connector_id``
280
+  + ``extra``
281
+  + ``created_at`` (defined in IronicObject class)
282
+  + ``updated_at`` (defined in IronicObject class)
283
+
284
+* Add new type of object ``VolumeTarget`` in objects/volume_target.py. It
285
+  inherits IronicObject class. The new object will have the following fields:
286
+
287
+  + ``id``
288
+  + ``uuid``
289
+  + ``node_id``
290
+  + ``volume_type``
291
+  + ``properties``
292
+  + ``boot_index``
293
+  + ``volume_id``
294
+  + ``extra``
295
+  + ``created_at`` (defined in IronicObject class)
296
+  + ``updated_at`` (defined in IronicObject class)
297
+
298
+
299
+State Machine Impact
300
+--------------------
301
+
302
+None.
303
+
304
+REST API impact
305
+---------------
306
+
307
+Six new REST API endpoints will be introduced with this change.
308
+
309
+- ``/v1/volume/connectors``
310
+
311
+  + To set the volume connector (initiator) information::
312
+
313
+      POST /v1/volume/connectors
314
+
315
+    with the body containing the JSON description of the volume connector.
316
+    It will return 201 on success, 400 if some required attributes are missing
317
+    or having invalid value OR 409 if an entry already exists for the same
318
+    volume connector.
319
+
320
+  + To get information about all volume connectors::
321
+
322
+      GET /v1/volume/connectors
323
+
324
+    This operation will return a list of dictionaries. It contains information
325
+    about all volume connectors::
326
+
327
+      {
328
+          "volume_connectors":[
329
+              {
330
+                  "connector_id": "<wwpn>",
331
+                  "links": [ ... ],
332
+                  "type": "wwpn",
333
+                  "uuid": "<uuid>",
334
+              },
335
+              {
336
+                  "connector_id": "<wwpn>",
337
+                  "links": [ ... ],
338
+                  ...
339
+              },
340
+              ...
341
+          ]
342
+      }
343
+
344
+    This will return 200 on success
345
+
346
+    This operation can take parameters like ``type``, ``container_id``,
347
+    ``limit``, ``marker``, ``sort_dir``, and ``fields``.
348
+
349
+  + To get detail information about all volume connectors::
350
+
351
+      GET /v1/volume/connectors/detail
352
+
353
+    The operation will return a list of dictionaries. It contains detailed
354
+    information about all volume connectors::
355
+
356
+      {
357
+          "volume_connectors":[
358
+              {
359
+                  "connector_id": "<wwpn>",
360
+                  "created_at": "<created_date>",
361
+                  "extra": {},
362
+                  "links": [ ... ],
363
+                  "node_uuid": "<node_uuid>",
364
+                  "type": "wwpn",
365
+                  "updated_at": "<updated_date>",
366
+                  "uuid": "<uuid>",
367
+              },
368
+              {
369
+                  "connector_id": "<wwpn>",
370
+                  "created_at": "<created_date>",
371
+                  ...
372
+              },
373
+              ...
374
+          ]
375
+      }
376
+
377
+    It will return 200 on success.
378
+
379
+    This operation can take parameters like ``type``, ``container_id``,
380
+    ``limit``, ``marker``, and ``sort_dir``.
381
+
382
+  + It should be possible to pass ``node`` as a parameter which can be a node
383
+    name or a node UUID to get all volume connectors for that particular node::
384
+
385
+      GET /v1/volume/connectors?node=<node_uuid or name>
386
+      GET /v1/volume/connectors/detail?node=<node_uuid or name>
387
+
388
+    It will return 200 on success or 404 if the node is not found.
389
+
390
+- ``/v1/volume/connectors/<volume_connector_uuid>``
391
+
392
+  + To get detail information about a particular volume connector::
393
+
394
+      GET /v1/volume/connectors/<volume_connector_uuid>
395
+
396
+    This will return 200 on success or 404 if volume connector is not found.
397
+
398
+  + To update a particular volume connector::
399
+
400
+      PATCH /v1/volume/connectors/<volume_connector_uuid>
401
+
402
+    This will return 200 and the representation of the updated resource on
403
+    success and 404 if volume connector is not found.
404
+
405
+  .. note::
406
+    Updating connector information when the node is in POWER_ON or REBOOT
407
+    state is blocked. It means that users need to make sure the node is in
408
+    POWER_OFF state before updating connector information. When connector
409
+    information is updated, driver should update node configuration.
410
+
411
+  + To delete volume connector::
412
+
413
+      DELETE /v1/volume/connectors/<volume_connector_uuid>
414
+
415
+    It will return 204 on success or 404 if volume connector is not found or
416
+    405 if the node is not in POWER_OFF state.
417
+
418
+- ``/v1/nodes/<node_uuid or name>/volume/connectors``
419
+
420
+  + To get all the volume connectors information for a node::
421
+
422
+      GET ``/v1/nodes/<node_uuid or name>/volume/connectors``
423
+
424
+- ``/v1/volume/targets``
425
+
426
+  + To set the volume target information::
427
+
428
+      POST /v1/volume/targets
429
+
430
+    with the body containing the JSON description of the volume target.
431
+    It will return 201 on success, 400 if some required attributes are missing
432
+    or having invalid value OR 409 if an entry already exists for the same
433
+    volume target.
434
+
435
+  + To get information about all volume targets::
436
+
437
+      GET /v1/volume/targets
438
+
439
+    This operation will return a list of dictionaries. It contains information
440
+    about all volume targets::
441
+
442
+      {
443
+          "volume_targets":[
444
+              {
445
+                  "boot_index", "<boot_index>",
446
+                  "links": [ ... ],
447
+                  "uuid": "<uuid>",
448
+                  "volume_id": "<volume_id>"
449
+                  "volume_type": "<volume_target_type>",
450
+              },
451
+              {
452
+                  "boot_index", "<boot_index>",
453
+                  "links": [ ... ],
454
+                  ...
455
+              },
456
+              ...
457
+          ]
458
+      }
459
+
460
+    This will return 200 on success.
461
+
462
+    This operation can take parameters like ``boot_index``, ``volume_id``,
463
+    ``volume_type``, ``limit``, ``marker``, ``sort_dir``, and ``fields``.
464
+
465
+  + To get details information about all volume targets::
466
+
467
+      GET /v1/volume/targets/detail
468
+
469
+    The operation will return a list of dictionaries. It contains detailed
470
+    information about all volume targets::
471
+
472
+      {
473
+          "volume_targets":[
474
+              {
475
+                  "boot_index": "<boot_index>",
476
+                  "created_at": "<created_date>",
477
+                  "extra": {},
478
+                  "links": [ ... ],
479
+                  "node_uuid": "<node_uuid>",
480
+                  "properties" : { "<target_information>" },
481
+                  "updated_at": "<updated_date>",
482
+                  "uuid": "<uuid>",
483
+                  "volume_id": "<volume_id>",
484
+                  "volume_type": "<volume_target_type>",
485
+              },
486
+              {
487
+                  "boot_index": "<boot_index>",
488
+                  "created_at": "<created_date>",
489
+                  ...
490
+              },
491
+              ...
492
+          ]
493
+      }
494
+
495
+    It will return 200 on success.
496
+
497
+    This operation can take parameters like ``boot_index``, ``volume_id``,
498
+    ``volume_type``, ``limit``, ``marker``, and ``sort_dir``.
499
+
500
+    .. Note::
501
+       `properties` may include credential information. This API will
502
+       mask it to avoid security risk.
503
+
504
+  + It should be possible to pass ``node`` as a parameter which can be a node
505
+    name or a node UUID to get all volume targets for that particular node::
506
+
507
+      GET /v1/volume/targets?node=<node_uuid or name>
508
+      GET /v1/volume/targets/detail?node=<node_uuid or name>
509
+
510
+    It will return 200 on success or 404 if the node is not found.
511
+
512
+- ``/v1/volume/targets/<volume_target_uuid>``
513
+
514
+  + To get detailed information about a particular volume target::
515
+
516
+      GET /v1/volume/targets/<volume_target_uuid>
517
+
518
+    This will return 200 on success or 404 if volume target is not found.
519
+
520
+  + To update a particular volume target::
521
+
522
+      PATCH /v1/volume/targets/<volume_target_uuid>
523
+
524
+    This will return 200 and the representation of the updated resource on
525
+    success, 404 if volume target is not found or 405 if the node is not
526
+    POWER_OFF state.
527
+
528
+  .. note::
529
+     Updating target information when the node is in POWER_ON or REBOOT state
530
+     is blocked. It means that users need to make sure the node is in
531
+     POWER_OFF state before updating target information. When target
532
+     information is updated, driver should update node configuration.
533
+
534
+  + To delete volume target::
535
+
536
+      DELETE /v1/volume/targets/<volume_target_uuid>
537
+
538
+    It will return 204 on success, 404 if volume target is not found or
539
+    405 if the node is not in POWER_OFF state.
540
+
541
+- ``/v1/nodes/<node_uuid or name>/volume/targets``
542
+
543
+  + To get all the volume targets information for a node::
544
+
545
+      GET ``/v1/nodes/<node_uuid or name>/volume/targets``
546
+
547
+- ``/v1/nodes/<node_uuid or name>/volume/targets``
548
+
549
+  + To get all the volume targets information for a node::
550
+
551
+      GET ``/v1/nodes/<node_uuid or name>/volume/targets``
552
+
553
+The endpoint ``GET /v1/nodes/detail`` will provide the volume connectors and
554
+targets information for the node with links to them. Also, the endpoint
555
+``GET /v1/nodes/<node_uuid or name>`` will provide the volume connectors and
556
+targets information for the specified node.
557
+
558
+For the above REST API changes, micro version will be bumped and 406 will be
559
+raised if newer endpoints are accessed with a lesser micro version.
560
+
561
+Client (CLI) impact
562
+-------------------
563
+
564
+* A new ``VolumeConnectorManager`` will be added to ``ironicclient`` to get/set
565
+  connector information for the node.  Also the CLI will be modified as
566
+  follows::
567
+
568
+    ironic volume-connector-create --node <node> --type <type>
569
+                                   --connector_id <connector_id>
570
+                                   [-e <key=value>] [-u <uuid>]
571
+    ironic volume-connector-delete <uuid> [<uuid>]
572
+    ironic volume-connector-list [--detail] [--type <type>]
573
+                                 [--connector_id <connector_id>]
574
+                                 [--limit <limit>] [--marker <uuid>]
575
+                                 [--sort-key <field>] [--sort-dir <direction>]
576
+                                 [--fields <field> [<field> ...]]
577
+    ironic volume-connector-show [--fields <field> [<field> ...]] <uuid>
578
+    ironic volume-connector-update <uuid> <op> <path=value> [<path=value> ...]
579
+
580
+    ironic node-volume-connector-list [--detail] [--limit <limit>]
581
+                                      [--marker <uuid>] [--sort-key <field>]
582
+                                      [--sort-dir <direction>]
583
+                                      [--fields <field> [<field> ...]]
584
+                                      <node>
585
+
586
+* A new ``VolumeTargetManager`` will be added to ``ironicclient`` to get/set
587
+  target information for the node.  Also the CLI will be modified as
588
+  follows::
589
+
590
+    ironic volume-target-create --node <node> --volume_type <volume_type>
591
+                                --volume_id <volume_id>
592
+                                [--properties <key=value>]
593
+                                [--boot_index <boot_index>]
594
+                                [-e <key=value>] [-u <uuid>]
595
+    ironic volume-target-delete <uuid> [<uuid>]
596
+    ironic volume-target-list [--detail] [--volume_type <volume_type>]
597
+                              [--volume_id <volume_id>]
598
+                              [--boot_index <boot_index>] [--limit <limit>]
599
+                              [--marker <uuid>] [--sort-key <field>]
600
+                              [--sort-dir <direction>]
601
+                              [--fields <field> [<field> ...]]
602
+    ironic volume-target-show [--fields <field> [<field> ...]] <uuid>
603
+    ironic volume-target-update <uuid> <op> <path=value> [<path=value> ...]
604
+
605
+    ironic node-volume-target-list [--detail] [--limit <limit>]
606
+                                   [--marker <uuid>] [--sort-key <field>]
607
+                                   [--sort-dir <direction>]
608
+                                   <node>
609
+
610
+* New objects, ``CreateBaremetalVolumeConnector``,
611
+  ``DeleteBaremetalVolumeConnector``, ``ListBaremetalVolumeConnector``,
612
+  ``SetBaremetalVolumeConnector``, ``ShowBaremetalVolumeConnector``,
613
+  and ``UnsetBaremetalVolumeConnector`` will be added to ``openstackclient``
614
+  plugin to get/set connector information for the node. Also the CLI will be
615
+  modified as follows::
616
+
617
+    openstack baremetal volume connector create [-h]
618
+                                                [-f {json,shell,table,value,yaml}]
619
+                                                [-c COLUMN]
620
+                                                [--max-width <integer>]
621
+                                                [--noindent] [--prefix PREFIX]
622
+                                                --node <node_uuid> --type <type>
623
+                                                --connector_id <connector_id>
624
+                                                [--extra <key=value>]
625
+                                                [--uuid <uuid>]
626
+    openstack baremetal volume connector delete [-h] <connector> [<connector>]
627
+    openstack baremetal volume connector list [-h]
628
+                                              [-f {json,shell,table,value,yaml}]
629
+                                              [-c COLUMN]
630
+                                              [--max-width <integer>]
631
+                                              [--noindent]
632
+                                              [--quote {all,minimal,none,nonnumeric}]
633
+                                              [--limit <limit>]
634
+                                              [--marker <uuid>]
635
+                                              [--sort <key>[:<direction>]]
636
+                                              [--long | fields <field [field] ...>]
637
+    openstack baremetal volume connector set [-h] [--node <node>]
638
+                                             [--type <type>]
639
+                                             [--connector_id <connector_id>]
640
+                                             [--extra <key=value>] <connector>
641
+    openstack baremetal volume connector show [-h]
642
+                                              [-f {json,shell,table,value,yaml}]
643
+                                              [-c COLUMN]
644
+                                              [--max-width <integer>]
645
+                                              [--noindent] [--prefix PREFIX]
646
+                                              [--fields <field> [<field> ...]]
647
+                                              <connector>
648
+    openstack baremetal volume connector unset [-h] [--extra <key>] <connector>
649
+
650
+* New objects, ``CreateBaremetalVolumeTarget``,
651
+  ``DeleteBaremetalVolumeTarget``, ``ListBaremetalVolumeTarget``,
652
+  ``SetBaremetalVolumeTarget``, ``ShowBaremetalVolumeTarget``, and
653
+  ``UnsetBaremetalVolumeTarget`` will be added to ``openstackclient`` plugin
654
+  to get/set target information for the node. Also the CLI will be modified
655
+  as follows::
656
+
657
+
658
+    openstack baremetal volume target create [-h]
659
+                                             [-f {json,shell,table,value,yaml}]
660
+                                             [-c COLUMN] [--max-width <integer>]
661
+                                             [--noindent] [--prefix PREFIX]
662
+                                             --node <node_uuid> --type <type>
663
+                                             --volume_id <volume_id>
664
+                                             [--properties <key=value>]
665
+                                             [--boot_index <boot_index>]
666
+                                             [--extra <key=value>]
667
+                                             [--uuid <uuid>]
668
+    openstack baremetal volume target delete [-h] <target> [<target>]
669
+    openstack baremetal volume target list [-h]
670
+                                           [-f {json,shell,table,value,yaml}]
671
+                                           [-c COLUMN] [--max-width <integer>]
672
+                                           [--noindent]
673
+                                           [--quote {all,minimal,none,nonnumeric}]
674
+                                           [--limit <limit>] [--marker <uuid>]
675
+                                           [--sort <key>[:<direction>]]
676
+                                           [--long | fields <field [field] ...>]
677
+    openstack baremetal volume target set [-h] [--node <node>] [--type <type>]
678
+                                          [--volume_id <volume_id>]
679
+                                          [--properties <key=value>]
680
+                                          [--boot_index <boot_index>]
681
+                                          [--extra <key=value>] <target>
682
+    openstack baremetal volume target show [-h]
683
+                                           [-f {json,shell,table,value,yaml}]
684
+                                           [-c COLUMN] [--max-width <integer>]
685
+                                           [--noindent] [--prefix PREFIX]
686
+                                           [--fields <field> [<field> ...]]
687
+                                           <target>
688
+    openstack baremetal volume target unset [-h]
689
+                                            [--properties <key>]
690
+                                            [--boot_index] [--extra <key>]
691
+                                            <target>
692
+
693
+RPC API impact
694
+--------------
695
+
696
+Four new rpcapi method ``update_volume_connector``,
697
+``destroy_volume_connector``, ``update_volume_target``, and
698
+``destroy_volume_target`` will be added.
699
+
700
+* ``update_volume_connector``
701
+
702
+  This method takes context and volume connector object as input and returns
703
+  updated volume connector object.
704
+
705
+* ``destroy_volume_connector``
706
+
707
+  This method takes context and volume connector object as input.
708
+
709
+* ``update_volume_target``
710
+
711
+  This method takes context and volume target object as input and returns
712
+  updated volume target object.
713
+
714
+* ``destroy_volume_target``
715
+
716
+  This method takes context and volume target object as input.
717
+
718
+Driver API impact
719
+-----------------
720
+
721
+None.
722
+
723
+Nova driver impact
724
+------------------
725
+
726
+When spawning a new instance, Nova Ironic virt driver queries Ironic
727
+(through API) to find out the volume connector information. It passes the
728
+volume connector information to Cinder which returns the target information.
729
+This is then passed down to Ironic. Detailed information about Nova Ironic
730
+driver can be found in the spec [5].
731
+
732
+Security impact
733
+---------------
734
+
735
+None.
736
+
737
+.. note::
738
+   As for FC zoning, Cinder takes care of it[6].
739
+
740
+
741
+Other end user impact
742
+---------------------
743
+
744
+None.
745
+
746
+Scalability impact
747
+------------------
748
+
749
+None.
750
+
751
+Performance Impact
752
+------------------
753
+
754
+This may extend the time required for nova boot/delete, but it's not a big
755
+impact and it's important for enterprise users.
756
+
757
+Other deployer impact
758
+---------------------
759
+
760
+* If administrators want to provide boot from volume feature, they need to
761
+  fill out following initiator information before activating the node.
762
+
763
+  + iSCSI:
764
+
765
+    - ip
766
+    - iqn
767
+    - mac
768
+
769
+      .. note::
770
+       ip may be omitted when Neutron is used to manage the storage network.
771
+
772
+
773
+  + FC:
774
+
775
+    - wwnn
776
+    - wwpn
777
+
778
+  Administrators need to set the node.properties['capabilities']
779
+  (iscsi_boot and/or fibre_channel_boot) true.
780
+
781
+  It's better if inspection automatically collects and registers them.
782
+  For example, in the case of a node with FC-HBA, inspection(in-band) can
783
+  get wwnn and wwpn from sysfs like following::
784
+
785
+    # cat /sys/class/scsi_host/host*/device/fc_host/host*/node_name
786
+    # cat /sys/class/scsi_host/host*/device/fc_host/host*/port_name
787
+
788
+* If users want to boot a node from volume in Ironic standalone mode, they
789
+  need additional tooling to leverage this functionality. For example, that
790
+  tool needs to do something like:
791
+
792
+  - Get initiator information from Ironic
793
+  - Call the storage management tool with initiator information to create a
794
+    new volume (maybe from template) and attach it to the initiator
795
+  - Get target information from storage management tool
796
+  - Put target information into Ironic
797
+
798
+Developer impact
799
+----------------
800
+
801
+Driver developers can consume the information mentioned above to write
802
+boot from volume support in their driver. The details about reference driver
803
+and driver interface specs are described in [4].
804
+
805
+Implementation
806
+==============
807
+
808
+Assignee(s)
809
+-----------
810
+
811
+Primary assignee:
812
+  satoru-moriya-br
813
+
814
+Other contributors:
815
+  rameshg87
816
+
817
+Work Items
818
+----------
819
+
820
+* Create new table named volume_connectors and volume_targets
821
+* Create new DB API methods
822
+* Create new Object named VolumeConnector and VolumeTarget
823
+* Create new RPC API methods
824
+* Create new REST API endpoints
825
+* Document the changes
826
+* Enhance inspector to register connector information if available
827
+* Enhance Client(CLI) to get/set connector and target information
828
+* Enhance Nova-Ironic driver to support boot from volume with these APIs
829
+
830
+Dependencies
831
+============
832
+
833
+None
834
+
835
+Testing
836
+=======
837
+
838
+* Unit tests will be added/updated to cover the changes.
839
+
840
+* Tempest tests will be added to Ironic to ensure that the following newly
841
+  added API endpoints work correctly.
842
+
843
+Upgrades and Backwards Compatibility
844
+====================================
845
+
846
+Add a migration script for database.
847
+
848
+Documentation Impact
849
+====================
850
+
851
+Documentations such as Installation guide and api-ref will be updated to
852
+explain the newly added fields and end points.
853
+
854
+* Installation guide:
855
+
856
+  http://docs.openstack.org/developer/ironic/deploy/install-guide.html
857
+
858
+* api-ref documentation:
859
+
860
+  http://developer.openstack.org/api-ref/baremetal/index.html
861
+
862
+References
863
+==========
864
+
865
+.. [1] http://developer.openstack.org/api-ref/baremetal/index.html
866
+.. [2] https://review.openstack.org/#/c/184652/
867
+.. [3] http://specs.openstack.org/openstack/ironic-specs/specs/backlog/driver-capabilities.html
868
+.. [4] https://review.openstack.org/#/c/294995
869
+.. [5] https://review.openstack.org/#/c/211101/
870
+.. [6] http://docs.openstack.org/mitaka/config-reference/block-storage/fc-zoning.html
871
+.. [7] https://blueprints.launchpad.net/ironic/+spec/cinder-integration
872
+.. [8] https://wiki.openstack.org/wiki/Ironic/blueprints/cinder-integration

+ 1
- 0
specs/not-implemented/volume-connection-information.rst View File

@@ -0,0 +1 @@
1
+../approved/volume-connection-information.rst

Loading…
Cancel
Save