<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">Auto discovery is a topic which has been discussed a few times in the past for</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">Ironic, and its interesting to solve because its a bit of a chicken and egg</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">problem. The ironic inspector allows us to inspect nodes that we don't know</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">the mac addresses for yet, to do this we run a global
<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
DHCP</span> <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
PXE</span> rule that will</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">respond to all mac addresses and
<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
PXE</span> boot any machine that requests it,</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">this means its possible for machines that we haven't been asked to</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">inspect to boot into the inspector
<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
ramdisk</span> and send their information to</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">inspector's <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
API</span>. To prevent this data from being processed further by</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">inspector if its a machine we shouldn't care about, we do a node lookup. If the data</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">fails this node lookup we used to drop this data and continue no further, in</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">release 2.0.0 we added a hook point to intercept this state called the Node Not </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">Found hook point which allows us to run some python code at this point in</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">processing before failing and dropping the inspection data. Something we've</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">discussed as a use for this hook point is, enrolling a node that fails the </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">lookup into Ironic, and then having inspector continue to process the </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">inspection data as we would for any other node that had inspection requested</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">for it, this allows us to auto-discover unknown nodes into Ironic.</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">If this auto discovery hook was enabled this would be the flow when inspector</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">receives inspection data from the inspector
<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
ramdisk</span>:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">- Run pre-process on the inspection data to sanitise the data and ready it for </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">  the rest of the process</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">- Node lookup using fields from the inspection data:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">  - If in inspector node cache return node info</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">  - If not in inspector node cache and but is in ironic node database, fail</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">    inspection because its a known node and inspection hasn't been requested</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">    for it. </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">  - If not in inspector node cache or ironic node database, enroll the node in</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">    ironic and return node info</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">- Process inspection data</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">The remaining question for this idea is how to handle the driver settings for </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">each node that we discover, we've currently discussed 3 different options:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">1. Enroll the node in ironic using the fake driver, and leave it to the operator</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   to set the driver type and driver info before they move the node from enroll</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   to manageable.</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">2. Allow for the default driver and driver info information to be set in the </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   ironic inspector configuration file, this will be set on every node that is</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   auto discovered. Possible
<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
config</span> file example:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   [<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">autodiscovery</span>]</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   driver = <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
pxe</span>_<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">ipmitool</span></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   address_field = <<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">ipmi</span>_address></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
username</span>_field = <<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">ipmi</span>_<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">username</span>></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   password_field = <<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">ipmi</span>_password></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">3. A possibly vendor specific option that was suggested at the summit was to</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">   provide an ability to look up out of band credentials from an external
<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
CMDB</span>.</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">The first option is technically possible using the second option, by setting</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">the driver to fake and leaving the driver info blank.</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">With <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
IPMI</span> based drivers most <span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
IPMI</span> related information can be retrieved from the </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">node by the inspector
<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
ramdisk</span>, however for non-<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">ipmi</span> based drivers such as the </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">cimc</span>/<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">ucs</span> drivers
 this information isn't accessible from an in-band OS command.</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">A problem with option 2 is that it can not account for a mixed driver</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">environment.</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">We have also discussed for
<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">
IPMI</span> based drivers inspector could set a new </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">randomly generated password on to the freshly discovered node, with the idea</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">being fresh hardware often comes with a default password, and if you used</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">inspector to discover it then it could set a unique password on it and </p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">automatically make ironic aware of that.</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">We're throwing this idea out onto the mailer because we'd like to get feedback</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">from the community to see if this would be useful for people using inspector,</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">and to see if people have any opinions on what the right way to handle the node</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">driver settings is.</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"></p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">Sam (<span style="font-variant-ligatures: no-common-ligatures; background-color: #ffd7d7">sambetts</span>)</p>
</div>
<br>
</body>
</html>