<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 12, 2018 at 6:52 PM, Stig Telfer <span dir="ltr"><<a href="mailto:stig.openstack@telfer.org" target="_blank">stig.openstack@telfer.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Moshe -<br>
<br>
It seems a bit risky to automatically apply firmware updates. For example, given a node will probably be rebooted for firmware updates to take effect, if other vendors also did this then perhaps the node could reboot unexpectedly in the middle of your update. In theory.<br></blockquote><div><br></div><div>This depends on how one implements automatic firmware updates. We did something like this when I was at Rackspace via a number of hardware managers. Essentially, we created a hardware manager class for each type of hardware that we wanted to be able to update. We shipped the firmware in the agent ramdisk, and hardcoded the firmware version in code (as we would need to ship a new ramdisk to ship a new firmware anyway). Each hardware manager had a clean step that would check if the firmware needed an update, and do the update if required, rebooting afterwards.</div><div><br></div><div>As clean steps run serially, there isn't much risk of them stepping on each other. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The approach we’ve taken on handling firmware updates[1] has been to create a hardware manager for verifying firmware values during node cleaning and raising an exception if they do not match. The consequence is, nodes will drop into maintenance mode for manual inspection / intervention. We’ve then booted the node into a custom image to perform the update.<br>
<br>
Hope this helps,<br>
Stig<br>
<br>
[1] <a href="https://github.com/stackhpc/stackhpc-ipa-hardware-managers" rel="noreferrer" target="_blank">https://github.com/stackhpc/<wbr>stackhpc-ipa-hardware-managers</a><br>
<div><div class="gmail-h5"><br>
> On 8 Feb 2018, at 07:43, Moshe Levi <<a href="mailto:moshele@mellanox.com">moshele@mellanox.com</a>> wrote:<br>
><br>
> Hi all,<br>
><br>
> I saw that ironic-python-agent support custom hardware manager.<br>
> I would like to support firmware updates (In my case Mellanox nic) and I was wandering how custom hardware manager can be used in such case?<br></div></div></blockquote><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">There are a few examples of hardware managers out there that might be helpful[0][1]. These add clean steps that update firmware when the node goes through cleaning (which is after enrollment, and after an instance is deleted).</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5">> How it is integrated with ironic-python agent and also is there an integration to tripleO as well.<br></div></div></blockquote><div><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I've never done much with tripleo, so I'm not sure if they have a built-in way to include a hardware manager or if you'd need to build your own ramdisk and tell tripleo to use that.</span></div><div><br></div><div>As far as integrating it with ironic-python-agent, just make your hardware manager something that can be installed by pip, and add entrypoints similar to the example[2]. Then, just install it alongside the agent when building the image, and it will be included.</div><div><br></div><div>// jim</div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255)">[0] <a href="https://github.com/openstack/proliantutils/blob/master/proliantutils/ipa_hw_manager/hardware_manager.py">https://github.com/openstack/proliantutils/blob/master/proliantutils/ipa_hw_manager/hardware_manager.py</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255)">[1] <a href="https://github.com/openstack/ipa-example-hardware-managers/blob/master/example_hardware_managers/example_device.py">https://github.com/openstack/ipa-example-hardware-managers/blob/master/example_hardware_managers/example_device.py</a></div></div><div>[2] <a href="https://github.com/openstack/ipa-example-hardware-managers/blob/master/setup.cfg#L19">https://github.com/openstack/ipa-example-hardware-managers/blob/master/setup.cfg#L19</a></div></div></div></div>