From 182a6fcff57a95edba2123a7e9234c9951e2ae13 Mon Sep 17 00:00:00 2001 From: huth <428437106@qq.com> Date: Wed, 30 Dec 2020 15:26:14 +0800 Subject: [PATCH] Modify port group document for ironic Add a simple sample about configuring bonding via configdrive, and it can make user to use port group more easily. Story: 2008474 Task: 41514 Signed-off-by: huth <428437106@qq.com> Change-Id: Ic425ecb35bfa173adf72b0ee104d28c6b79cb4b1 --- doc/source/admin/portgroups.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/doc/source/admin/portgroups.rst b/doc/source/admin/portgroups.rst index d669171799..e43066f62b 100644 --- a/doc/source/admin/portgroups.rst +++ b/doc/source/admin/portgroups.rst @@ -72,6 +72,36 @@ CLI commands below specify it for completeness. cloud-init version 0.7.7 or later is required for bonding configuration to work. + The following is a simple sample for configuring bonding via configdrive: + + When booting an instance, it needs to add user-data file for configuring + bonding via ``--user-data`` option. For example: + + .. code-block:: json + + { + "networks": [ + { + "type": "physical", + "name": "eth0", + "mac_address": "fa:ab:25:48:fd:ba" + }, + { + "type": "physical", + "name": "eth1", + "mac_address": "fa:ab:25:48:fd:ab" + }, + { + "type": "bond", + "name": "bond0", + "bond_interfaces": [ + "eth0", "eth1" + ], + "mode": "active-backup" + } + ] + } + If the port group's address is not explicitly set in standalone mode, it will be set automatically by the process described in `kernel documentation on bonding`_.