hosts.ww inWW4.2

19 views
Skip to first unread message

Jeff Davis

unread,
May 23, 2022, 8:58:41 AM5/23/22
to Warewulf
Hello

I don't seem to be hitting the else block of {{- if $netdev.Default}}  and all my hosts have the basename only.  Any ideas?  

Thanks

John Hanks

unread,
May 23, 2022, 9:00:50 AM5/23/22
to Warewulf
Hi Jeff,

If you are using a recent build then Default has been renamed to Primary, try $netdev.Primary.

griznog

--
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 view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/warewulf/be906f18-cc71-4fb2-8f85-2a0a8f5a4fd1n%40lbl.gov.

Jeff Davis

unread,
May 23, 2022, 9:28:43 AM5/23/22
to Warewulf, gri...@gmail.com
No luck.  As a workaround in the meantime, I took away the condition and name them all with the device.

John Hanks

unread,
May 23, 2022, 9:48:12 AM5/23/22
to Jeff Davis, Warewulf
I checked my templates and found a few places I was still using Default, thanks for the nudge :) 

This is working for me in templates:

{{ if eq $netdev.Primary "true" -}}

Note, however, I explicitly set primary in nodes.conf:

  cpu-vm-001:
    ipmi:
      write: "false"
    profiles:
    - rocky8-x86_64
    network devices:
      enp1s0:
        onboot: "true"
        hwaddr: 52:54:00:b3:ea:34
        ipaddr: 100.64.0.242
        netmask: 255.255.240.0
        gateway: 100.64.15.254
        primary: "true"


Not sure if that gets populated in any sort of by-default way.

griznog

Jeff Davis

unread,
May 23, 2022, 2:26:48 PM5/23/22
to Warewulf, gri...@gmail.com, Warewulf, Jeff Davis
I'm using 4.2...  Anyway I don't see how to set this field in either case (default or primary).  It's an unknown flag. 
Reply all
Reply to author
Forward
0 new messages