Browse Source

Collect NIC name given by BIOS

Proposing a spec to add a extra field 'biosdevname' to network interface
inventory collected by 'default' collector of ironic-python-agent.

Change-Id: If4efd3ba5ed7bb2816696b853b1fc39d0b2340ef
Partial-Bug: #1635351
Annie Lezil 2 years ago
parent
commit
54eb735659
1 changed files with 156 additions and 0 deletions
  1. 156
    0
      specs/Network-Interface-Resource-Info.rst

+ 156
- 0
specs/Network-Interface-Resource-Info.rst View File

@@ -0,0 +1,156 @@
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
+Network Interface Resource using Biosdevname
9
+============================================
10
+
11
+https://bugs.launchpad.net/ironic-python-agent/+bug/1635351
12
+https://bugs.launchpad.net/ironic-inspector/+bug/1635351
13
+
14
+Currently, the hardware inspection collects the MAC address, IP address and
15
+kernel given name of the network interface but does not collect the bios given
16
+name for the network interface. The deployer needs the bios given name of
17
+network interface to setup network configuration automation on multi NIC nodes.
18
+In this spec, we want to add an extra field 'biosdevname' to network interface
19
+inventory, collected by ``default`` collector of ironic-python-agent. The extra
20
+field is fetched using `biosdevname <https://linux.die.net/man/1/biosdevname>`_
21
+utility. Once the node inspection is successfuil, the collected hardware
22
+details from the ramdisk is stored in swift object as JSON encoded string.
23
+
24
+Problem description
25
+===================
26
+
27
+The classic naming scheme for network interfaces applied by the kernel is to
28
+simply assign names beginning with "eth0", "eth1", ... to all interfaces as
29
+they are probed by the drivers. Kernel name is not fixed, it changes on every
30
+boot. This can have serious security implications, for example, in firewall
31
+rules that are coded for certain naming schemes are sensitive to unpredictable
32
+name changes.
33
+
34
+To fix this problem we need a consistent and stable naming scheme for network
35
+interfaces. One solution is the utility named biosdevname. Biosdevname finds
36
+fixed slot topology information in certain firmware interfaces and uses them
37
+to assign fixed names to interfaces which incorporate their physical location
38
+on the motherboard. This will help to provide a consistent of mapping kernel
39
+name with system.
40
+
41
+The data collected from the collector would enable us to create config files
42
+to script provisioning of nodes. For example, as the system boots, it uses
43
+these files to determine what network interfaces to bring up and how to
44
+configure them. So when we have a multiple NIC we need unique names for
45
+network interfaces to configure and this can be obtained from the
46
+proposed spec.
47
+
48
+Proposed change
49
+===============
50
+
51
+The proposed change is to add an 'biosdevname' field to network interface
52
+inventory which is collected by ``default`` collector of ironic-python-agent
53
+inspector module, which will return a full list of inventory to ironic
54
+inspector.
55
+
56
+The requested change will be in the class NetworkInterface, HardwareManager,
57
+and GenericHardwareManager. The list will consist of dicts containing
58
+biosdevname field added to existing network interface details::
59
+
60
+    "inventory":
61
+    {
62
+        ...,
63
+        ...,
64
+        "interface":[
65
+        {
66
+            ...,
67
+            ...,
68
+            "name": "eth0",
69
+            "ip": "172.24.42.100",
70
+            "mac: "52:54:00:52:bc:2c",
71
+            "biosdevname": "em0",
72
+            ...,
73
+            ...,
74
+        }
75
+    ],
76
+    ...,
77
+    ...,
78
+    }
79
+
80
+Alternatives
81
+------------
82
+
83
+None
84
+
85
+Data model impact
86
+-----------------
87
+
88
+None
89
+
90
+HTTP API impact
91
+---------------
92
+
93
+None
94
+
95
+Client (CLI) impact
96
+-------------------
97
+
98
+None
99
+
100
+Ironic python agent impact
101
+--------------------------
102
+
103
+The changes proposed above will be implemented in IPA
104
+
105
+Performance and scalability impact
106
+----------------------------------
107
+
108
+None
109
+
110
+Security impact
111
+---------------
112
+
113
+None
114
+
115
+Deployer impact
116
+---------------
117
+
118
+None
119
+
120
+Developer impact
121
+----------------
122
+
123
+None
124
+
125
+Implementation
126
+==============
127
+
128
+Assignee(s)
129
+-----------
130
+
131
+Primary assignee:
132
+  Annie Lezil <annie-lezil>
133
+
134
+Work Items
135
+----------
136
+    * create a tooling module for biosdevname to collect bios given name.
137
+    * add an extra field to network interface inventory which is collected by
138
+      ``default`` collector of ironic-python-agent inspector module.
139
+    * document the new feature.
140
+
141
+Dependencies
142
+============
143
+
144
+None
145
+
146
+Testing
147
+=======
148
+
149
+Unit test cases will be added.
150
+
151
+References
152
+==========
153
+
154
+.. [1] https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
155
+.. [2] https://linux.die.net/man/1/biosdevname
156
+

Loading…
Cancel
Save