Hi,
This might be even a bug (I hope not), but in principle, Foreman
should be able to have static-like IPs on secondary interfaces, at
least by looking at the configuration interface. I have my internal
network where I serve DHCP and boot nodes and all that, and some
servers have external interfaces.
They build successfully. The external domain and network are in the
system, and associated. If I go to "edit host" -> network -> add
interface.
I fill :
MAC Address : X
Name: myname.mydomain.com
Domain : mydomain.com # Now it already autocompletes the next field
with the proper network
Network : w.z.t.r/25
IP : w.z.t.k # Filled by hand with the static IP this machine used since ever
What I see that it tries to do in the resulting
/etc/sysconfig/network-scripts/ifcfg-eth1 is not really what I
expected :
DEVICE="eth1"
BOOTPROTO="dhcp" ## <==== ???
DHCP_HOSTNAME="myname.mydomain"
HWADDR="00:30:38:7D:F2:E7"
NM_CONTROLLED="yes"
ONBOOT="no"
TYPE="Ethernet"
UUID="234f5c72-37c1-4d7a-b77b-5c8a3f1ce50f"
Obviously, it does nothing because we don't have a DHCP (and no plans
to have) on the external network. It seems that even though I specify
what is the network/netmask/IP at some point, it is not really used.
Even if when I defined the network/domain I said "dhcp = none".
I would like to understand if there's a way to do what I am trying
without needing to hack anything. For now I'm just editing the file to
what I expect and maintaining it by other means, but I could also
follow up reporting the bug and working with the developers to get it
right if this is the case. I guess it might be a minor change in one
of the RedHat network conf modules.
Thanks,
Samir
I think this just needs an updated kickstart template to configure each
of the secondary interfaces. The default kickstart file we ship just
has a single network setting, which will cover the primary interface only.
You could probably iterate over @host.interfaces from within the
template and write new "network --device=ethX" lines.
This is probably related to:
http://projects.theforeman.org/issues/2409
···
On 18/04/13 16:50, Samir Cury wrote:
> Hi,
>
> This might be even a bug (I hope not), but in principle, Foreman
> should be able to have static-like IPs on secondary interfaces, at
> least by looking at the configuration interface. I have my internal
> network where I serve DHCP and boot nodes and all that, and some
> servers have external interfaces.
>
> They build successfully. The external domain and network are in the
> system, and associated. If I go to "edit host" -> network -> add
> interface.
>
> I fill :
>
> MAC Address : X
> Name: myname.mydomain.com
> Domain : mydomain.com # Now it already autocompletes the next field
> with the proper network
> Network : w.z.t.r/25
> IP : w.z.t.k # Filled by hand with the static IP this machine used since ever
>
> What I see that it tries to do in the resulting
> /etc/sysconfig/network-scripts/ifcfg-eth1 is not really what I
> expected :
>
> DEVICE="eth1"
> BOOTPROTO="dhcp" ## <==== ????
> DHCP_HOSTNAME="myname.mydomain"
> HWADDR="00:30:38:7D:F2:E7"
> NM_CONTROLLED="yes"
> ONBOOT="no"
> TYPE="Ethernet"
> UUID="234f5c72-37c1-4d7a-b77b-5c8a3f1ce50f"
>
> Obviously, it does nothing because we don't have a DHCP (and no plans
> to have) on the external network. It seems that even though I specify
> what is the network/netmask/IP at some point, it is not really used.
> Even if when I defined the network/domain I said "dhcp = none".
>
> I would like to understand if there's a way to do what I am trying
> without needing to hack anything. For now I'm just editing the file to
> what I expect and maintaining it by other means, but I could also
> follow up reporting the bug and working with the developers to get it
> right if this is the case. I guess it might be a minor change in one
> of the RedHat network conf modules.
–
Dominic Cleal
Red Hat Engineering