theforeman/smart_proxy_dhcp_bluecat

Plugin Installation Foreman 1.21.3

wernermarcel1 opened this issue · 2 comments

Hi ,

Can this Plugin Create an Static IP + DNS Entry ?

I want to use the plugin in our ENV. But the proxy doesn't start after creating the bundle file.

/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/output.rb:13:in strict_err': Gem loading error: cannot load such file -- smart_proxy_dhcp_bluecat (RuntimeError) from /usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:46:in rescue in block in system_require'
from /usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:39:in block in system_require' from /usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in each'
from /usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in system_require' from /usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in block in system_require'
from /usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in each' from /usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in system_require'
from /usr/share/foreman-proxy/lib/bundler_helper.rb:22:in require_groups' from /usr/share/foreman-proxy/lib/smart_proxy_main.rb:33:in <top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in require' from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/share/foreman-proxy/bin/smart-proxy:5:in `

'

rg
marcel

m4c3 commented

Hello Marcel,
can you try to clone the repo and compile & install the gem via
gem build smart_proxy_dhcp_bluecat.gemspec && gem install smart_proxy_dhcp_bluecat-0.1.0.gem

currently the ips are assigned as dhcp reserved. this mitigates that two dhcp leases are handed out with pxe boot.
you can change the code to create static assignments, just comment out these lines in bluecat_api.rb

    # update the state of the ip from static to dhcp reserved
    rest_put('changeStateIP4Address', 'addressId=' + address_id +
                                      '&targetState=MAKE_DHCP_RESERVED' \
                                      '&macAddress=' + options['mac'])

stumble over some issues or need a feature please contact me
bye matthias

Hi Matthias,
after cloning and building local it worked, so can you put an hint to the documentation ?
So that a "DAU" like me can use it :-)

Also big thx for the secound hint i will try it when the access stuff is done :-)
rg
marcel