Setting up nodes gateway

457 views
Skip to first unread message

Carlos Familia

unread,
Mar 24, 2016, 6:28:55 AM3/24/16
to Warewulf
Hi guys,

I have my nodes after wwnodescan with the following:

#### n0000.cluster ############################################################
  n0000.cluster: ID               = 79
  n0000.cluster: NAME             = n0000,n0000.cluster
  n0000.cluster: NODENAME         = n0000
  n0000.cluster: CLUSTER          = UNDEF
  n0000.cluster: DOMAIN           = cluster
  n0000.cluster: GROUPS           = UNDEF
  n0000.cluster: ENABLED          = TRUE
  n0000.cluster: eth0.HWADDR      = 30:75:12:dc:ee:ae
  n0000.cluster: eth0.HWPREFIX    = UNDEF
  n0000.cluster: eth0.IPADDR      = 10.15.20.10
  n0000.cluster: eth0.NETMASK     = 255.255.255.0
  n0000.cluster: eth0.NETWORK     = UNDEF
  n0000.cluster: eth0.GATEWAY     = UNDEF
  n0000.cluster: eth0.MTU         = UNDEF
  n0000.cluster: eth0.FQDN        = UNDEF


However i would like to have the gateway and network assigned automatically on boot.

I know that i can change the /etc/warewulf/defaults/node.conf to setup the Network, but for the life in me i can't figure out how to do the same for the gateway.

I have tried to add a DEFAULT node with the proper gateway, but i apparently the configuration in the DEFAULT node are not used to boot new nodes. I think i misunderstood the DEFAULT thing...

Any ideas?

Jason Stover

unread,
Mar 24, 2016, 9:12:02 AM3/24/16
to ware...@lbl.gov
wwsh node set n0000 -D eth0 --gateway=10.15.1.1 --network=10.15.0.0

DEFAULT is used on a new node object creation.

-J
> --
> You received this message because you are subscribed to the Google Groups
> "Warewulf" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to warewulf+u...@lbl.gov.
> To post to this group, send email to ware...@lbl.gov.
> To view this discussion on the web visit
> https://groups.google.com/a/lbl.gov/d/msgid/warewulf/9f3369f8-8576-4584-a462-c99da4f210c5%40lbl.gov.
> For more options, visit https://groups.google.com/a/lbl.gov/d/optout.

Carlos Familia

unread,
Mar 24, 2016, 1:12:03 PM3/24/16
to ware...@lbl.gov
Hi,

Is there any way to set it up for new node object creation?
Apparently it ignores the gateway set in DEFAULT.

Thanks
> To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/warewulf/CAGfAqt-bcZjNgz2a_Zd_M%2BezNpRSD0G3492WcVg%3DjXVvoM4huw%40mail.gmail.com.

Jason Stover

unread,
Mar 24, 2016, 1:27:32 PM3/24/16
to ware...@lbl.gov
Using /etc/warewulf/default/node.conf should do it.

You'd set the netdev, and network values ... gateway seems to have
been skipped. I'll need to fix that. But you can find where it's set
in:

Warewulf/Event/DefaultNode.pm

You'll add in the following to the appropriate locations:

---- Start cut ----
my $gateway = $config->get("gateway");

( ... )
if ($netdev and $gateway) {
if (! $obj->gateway($netdev) ) {
$obj->gateway($netdev, $gateway);
}
}
---- End cut ----

You can then add:

gateway = 1.2.3.4

Into /etc/warewulf/default/node.conf ... This is ran on the node.new event.

I'll get it added into trunk here soon.

-J
> To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/warewulf/662FA5B5-6BA8-46D7-BED5-4176A7D18496%40gmail.com.

Carlos Familia

unread,
Mar 24, 2016, 1:45:14 PM3/24/16
to ware...@lbl.gov
Many thanks.

Jason Stover

unread,
Mar 24, 2016, 1:52:45 PM3/24/16
to ware...@lbl.gov
Also, rev 1968 has the changes in SVN.

http://warewulf.lbl.gov/trac/changeset/1968

-J
> --
> You received this message because you are subscribed to the Google Groups
> "Warewulf" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to warewulf+u...@lbl.gov.
> To post to this group, send email to ware...@lbl.gov.
> To view this discussion on the web visit
> https://groups.google.com/a/lbl.gov/d/msgid/warewulf/595FEA60-5E6A-4F8C-BDAB-22C4168D73AC%40gmail.com.
Reply all
Reply to author
Forward
0 new messages