> It looks like the reboot calls goes to the smart_proxy_discovery_image > plugin which is installed in the discovery image. > I created a hack that allows me to set a kernel command line "bootpxe=1" > (any value though should work) and it will set the bootdev to pxe before > the reboot. > In the image itself, i had to add the ipmitool to the sudoers file (so my > hack will work, i also enabled the ipmitool service, didn't test without it > though).
That looks nice. Frankly, our long-term plans is to support various things like changing BIOS settings, upgrading firmware and this would be first step towards it. Feel free to extend your work and create new API in the smart_proxy_discovery_image for managing IPMI. This can be generic IPMI API for various actions - setting bootdev can be the first and only supported operation. Mount the new API in http_config.ru perhaps under /ipmi path. This will require change in foreman_discovery plugin as well to add new actions to the discovered hosts list/show pages, but it should be pretty straightforward. You can also add some code that will trigger bootdev action after host is discovered automatically (this must be enabled via global setting tho). > -echo " * disabling some unused system services" > -systemctl disable ipmi.service > +echo "foreman-proxy ALL=NOPASSWD: /usr/bin/ipmitool" >> /etc/sudoers Go ahead and file PR for this change as well, this won't hurt. Nice work. -- Later, Lukas #lzap Zapletal -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.
