This may simply be a feature request or feel to see if there's interest for
me to code this… Right now my infrastructure is such that every host has
at least 3 network interfaces / physically separate networks, and I'm
struggling with the best way to manage these through foreman. The
challenge also is that sometimes the PXE/DHCP interface used by foreman to
kickstart the host is different than the primary / public interface. For
the time being I've resorted to host parameters that basically define a
network to use for the kickstart that's different than the one assigned via
Foreman for PXE/DHCP. The issue I've run into is that I'd still like to
have the information in foreman as well as have those networks configured
during kickstart. I've also run into problems where the host never reports
as built because the kickstart IP and MAC differ from the one Foreman is
aware of. So far this is my solution…
Inform the build system that we are done.
echo "Informing Foreman that we are built"
<% if @host.params["ovirtmgmt_network"].nil? or @host.params["ovirtmgmt_network"] == 'false' -%>
wget -q -O /dev/null --no-check-certificate <%= foreman_url %>
<% else -%>
<%# Set "from" IP as the kickstart was done based on the
"ovirtmgmt_network" override -%>
wget -q -O /dev/null --no-check-certificate --header="HTTP_X_FORWARDED_FOR:
<%= @host.ip %>" <%= foreman_url %>
<% end -%>
That's likely not the most elegant solution, and I won't be able to test it
till tomorrow. The parameter used in this case looks something like this
I think the best solution in this case is to allow Foreman to be directly
aware of multiple network interfaces, rather than just the one. If this is
something that would be of use to other users or be something useful
upstream to Foreman I'd be happy to code it as I'm going to need this
capability very soon to fully utilize Foreman as my primary ENC. This
becomes even more practical when Foreman is managing all network interfaces
via DHCP through the foreman-proxy.
I had a similar issue related to DHCP, the development tree of smart-proxy has not a REST API for the facts that the smart-proxy knows about itself via facter, so by defining a "global fact" in the smart-proxy you avoid to having to do parameter at the individual host level.
Roberto.
···
On Aug 2, 2012, at 11:12 PM, treydock wrote:
This may simply be a feature request or feel to see if there’s interest for me to code this… Right now my infrastructure is such that every host has at least 3 network interfaces / physically separate networks, and I’m struggling with the best way to manage these through foreman. The challenge also is that sometimes the PXE/DHCP interface used by foreman to kickstart the host is different than the primary / public interface. For the time being I’ve resorted to host parameters that basically define a network to use for the kickstart that’s different than the one assigned via Foreman for PXE/DHCP. The issue I’ve run into is that I’d still like to have the information in foreman as well as have those networks configured during kickstart. I’ve also run into problems where the host never reports as built because the kickstart IP and MAC differ from the one Foreman is aware of. So far this is my solution…
Inform the build system that we are done.
echo “Informing Foreman that we are built”
<% if @host.params[“ovirtmgmt_network”].nil? or @host.params[“ovirtmgmt_network”] == ‘false’ -%>
wget -q -O /dev/null --no-check-certificate <%= foreman_url %>
<% else -%>
<%# Set “from” IP as the kickstart was done based on the “ovirtmgmt_network” override -%>
wget -q -O /dev/null --no-check-certificate --header=“HTTP_X_FORWARDED_FOR: <%= @host.ip %>” <%= foreman_url %>
<% end -%>
That’s likely not the most elegant solution, and I won’t be able to test it till tomorrow. The parameter used in this case looks something like this
I think the best solution in this case is to allow Foreman to be directly aware of multiple network interfaces, rather than just the one. If this is something that would be of use to other users or be something useful upstream to Foreman I’d be happy to code it as I’m going to need this capability very soon to fully utilize Foreman as my primary ENC. This becomes even more practical when Foreman is managing all network interfaces via DHCP through the foreman-proxy.
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I believe Ohad is already working on multi-NIC support, but it's not
> finished yet. I'm sure he can tell you more
>
I need to find time to work on this again, last I stopped afair it was we
wanted to get 1.0 out already.
I'll take a look at it too. Until something like this is ready to test,
what's a good way to tell Foreman a host is done if it's Kickstart sets the
IP to something other than what the IP is set to in Foreman. Right now on
my clustered hosts the private / mgmt NIC is assigned in Foreman to
facilitate DHCP / PXE but the public NIC is what's actually used during
kickstart. This is also the case where I specified multiple "network"
items in kickstart. How do I override the kickstart's IP sent to Foreman
upon completion of provisioning?
This line did not seem to work though it failed late Friday and I have not
had a chance to go back and debug what output was actually sent to
Foreman…
···
On Sunday, August 5, 2012 1:49:17 AM UTC-5, ohad wrote:
>
>
>
> On Fri, Aug 3, 2012 at 12:13 PM, Greg Sutcliffe wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I believe Ohad is already working on multi-NIC support, but it's not
>> finished yet. I'm sure he can tell you more :)
>>
>
> I need to find time to work on this again, last I stopped afair it was we
> wanted to get 1.0 out already.
>
> my wip code is at https://github.com/ohadlevy/foreman/tree/interfaces
>
> I'll try looking at this code this week again, as I'm working on
> refactoring some of this code anyway.
>
> Ohad
>
>>
>> Greg
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v2.0.19 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAlAblkAACgkQ8O7RN8oK65OU/QCgqvUyBt/KZWyW4EG+DYc6iwJ3
>> fq8AniXeBr2+ggLULy+FArXgFUx7olTQ
>> =nAmS
>> -----END PGP SIGNATURE-----
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Foreman users" group.
>> To post to this group, send email to foreman-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> foreman-users+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/foreman-users?hl=en.
>>
>>
>
> I'll take a look at it too. Until something like this is ready to test, what's a good way to tell Foreman a host is done if it's Kickstart sets the IP to something other than what the IP is set to in Foreman. Right now on my clustered hosts the private / mgmt NIC is assigned in Foreman to facilitate DHCP / PXE but the public NIC is what's actually used during kickstart. This is also the case where I specified multiple "network" items in kickstart. How do I override the kickstart's IP sent to Foreman upon completion of provisioning?
>
> This line did not seem to work though it failed late Friday and I have not had a chance to go back and debug what output was actually sent to Foreman…
>
> wget -q -O /dev/null --no-check-certificate --header="HTTP_X_FORWARDED_FOR: <%= @host.ip %>" <%= foreman_url %>
>
Assuming the real ip is available during kickstart. If you use curl there is an '–interface eth1' flag
where you can specify which ip address to send the request from.
···
On Aug 5, 2012, at 9:46 AM, treydock wrote:
Thanks
Trey
On Sunday, August 5, 2012 1:49:17 AM UTC-5, ohad wrote:
On Fri, Aug 3, 2012 at 12:13 PM, Greg Sutcliffe gsutcliffe@ibahn.com wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I believe Ohad is already working on multi-NIC support, but it’s not
finished yet. I’m sure he can tell you more
I need to find time to work on this again, last I stopped afair it was we wanted to get 1.0 out already.
> I'll take a look at it too. Until something like this is ready to test,
> what's a good way to tell Foreman a host is done if it's Kickstart sets the
> IP to something other than what the IP is set to in Foreman.
Best is to use Greg work on Tokens –> see
Ohad
···
On Sun, Aug 5, 2012 at 10:46 AM, treydock wrote:
Right now on my clustered hosts the private / mgmt NIC is assigned in
Foreman to facilitate DHCP / PXE but the public NIC is what’s actually used
during kickstart. This is also the case where I specified multiple
“network” items in kickstart. How do I override the kickstart’s IP sent to
Foreman upon completion of provisioning?
This line did not seem to work though it failed late Friday and I have not
had a chance to go back and debug what output was actually sent to
Foreman…