Merge pull request #1524 from anderbubble/refactor-node-and-upgrade
Support cross-version upgrades
This commit is contained in:
@@ -32,8 +32,7 @@ NODE NAME PROFILES NETWORK
|
||||
--------- -------- -------
|
||||
n01 [default] --
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default: {}
|
||||
nodes:
|
||||
n01:
|
||||
@@ -51,8 +50,7 @@ NODE NAME PROFILES NETWORK
|
||||
n01 [default] --
|
||||
n02 [default] --
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default: {}
|
||||
nodes:
|
||||
n01:
|
||||
@@ -73,8 +71,7 @@ NODE NAME PROFILES NETWORK
|
||||
n01 [default] --
|
||||
n02 [default] --
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default: {}
|
||||
nodes:
|
||||
n01:
|
||||
@@ -95,8 +92,7 @@ NODE NAME PROFILES NETWORK
|
||||
n01 [default] --
|
||||
n03 [default] --
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default: {}
|
||||
nodes:
|
||||
n01:
|
||||
@@ -125,8 +121,7 @@ NODE NAME PROFILES NETWORK
|
||||
--------- -------- -------
|
||||
n01 [default] --
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default: {}
|
||||
nodes:
|
||||
n01:
|
||||
@@ -146,8 +141,7 @@ NODE NAME PROFILES NETWORK
|
||||
--------- -------- -------
|
||||
n01 [default] default
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default:
|
||||
network devices:
|
||||
default:
|
||||
@@ -168,8 +162,7 @@ NODE FIELD PROFILE VALUE
|
||||
n01 Comment default profilecomment
|
||||
n01 Profiles -- default
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default:
|
||||
comment: profilecomment
|
||||
nodes:
|
||||
@@ -188,8 +181,7 @@ NODE FIELD PROFILE VALUE
|
||||
n01 Comment SUPERSEDED nodecomment
|
||||
n01 Profiles -- default
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default:
|
||||
comment: profilecomment
|
||||
nodes:
|
||||
@@ -208,8 +200,7 @@ NODE IPMI IPADDR IPMI PORT IPMI USERNAME IPMI INTERFACE
|
||||
---- ----------- --------- ------------- --------------
|
||||
n01 <nil> -- admin --
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default:
|
||||
ipmi:
|
||||
username: admin
|
||||
@@ -228,8 +219,7 @@ NODE IPMI IPADDR IPMI PORT IPMI USERNAME IPMI INTERFACE
|
||||
---- ----------- --------- ------------- --------------
|
||||
n01 <nil> -- user --
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
default:
|
||||
ipmi:
|
||||
username: admin
|
||||
@@ -250,8 +240,7 @@ NODE NAME PROFILES NETWORK
|
||||
--------- -------- -------
|
||||
n01 [p1 p2] --
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
p1: {}
|
||||
p2: {}
|
||||
nodes:
|
||||
@@ -270,8 +259,7 @@ NODE FIELD PROFILE VALUE
|
||||
---- ----- ------- -----
|
||||
n01 Profiles -- p1,p2
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
p1: {}
|
||||
p2: {}
|
||||
nodes:
|
||||
@@ -290,8 +278,7 @@ NODE NAME KERNEL OVERRIDE CONTAINER OVERLAYS (S/R)
|
||||
--------- --------------- --------- --------------
|
||||
n01 -- -- /rop1,rop2
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
p1:
|
||||
runtime overlay:
|
||||
- rop1
|
||||
@@ -311,8 +298,7 @@ NODE NAME KERNEL OVERRIDE CONTAINER OVERLAYS (S/R)
|
||||
--------- --------------- --------- --------------
|
||||
n01 -- -- sop1/nop1,~rop1,rop1,rop2
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
p1:
|
||||
system overlay:
|
||||
- sop1
|
||||
@@ -339,8 +325,7 @@ n01 Profiles -- p1
|
||||
n01 RuntimeOverlay p1+ nop1,~rop1,rop1,rop2
|
||||
n01 SystemOverlay p1 sop1
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
p1:
|
||||
system overlay:
|
||||
- sop1
|
||||
@@ -366,8 +351,7 @@ NODE FIELD PROFILE VALUE
|
||||
n01 Profiles -- p1
|
||||
n01 RuntimeOverlay p1+ nop1,rop1,rop2
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodeprofiles:
|
||||
inDb: `nodeprofiles:
|
||||
p1:
|
||||
runtime overlay:
|
||||
- rop1
|
||||
@@ -389,8 +373,7 @@ NODE FIELD PROFILE VALUE
|
||||
---- ----- ------- -----
|
||||
n1 NetDevs[default].OnBoot -- true
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 45
|
||||
nodes:
|
||||
inDb: `nodes:
|
||||
n1:
|
||||
network devices:
|
||||
default:
|
||||
@@ -405,8 +388,7 @@ nodes:
|
||||
NODE FIELD PROFILE VALUE
|
||||
---- ----- ------- -----
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 46
|
||||
nodes:
|
||||
inDb: `nodes:
|
||||
wwnode1:
|
||||
network devices:
|
||||
default: {}
|
||||
@@ -414,7 +396,7 @@ nodes:
|
||||
},
|
||||
}
|
||||
|
||||
conf_yml := `WW_INTERNAL: 0`
|
||||
conf_yml := ``
|
||||
tempWarewulfConf, warewulfConfErr := os.CreateTemp("", "warewulf.conf-")
|
||||
assert.NoError(t, warewulfConfErr)
|
||||
defer os.Remove(tempWarewulfConf.Name())
|
||||
@@ -470,7 +452,7 @@ func TestListMultipleFormats(t *testing.T) {
|
||||
kernel: {}
|
||||
ipmi: {}
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 43
|
||||
inDb: `
|
||||
nodeprofiles:
|
||||
default: {}
|
||||
nodes:
|
||||
@@ -520,7 +502,7 @@ nodes:
|
||||
}
|
||||
]
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 43
|
||||
inDb: `
|
||||
nodeprofiles:
|
||||
default: {}
|
||||
nodes:
|
||||
@@ -604,7 +586,7 @@ nodes:
|
||||
}
|
||||
]
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 43
|
||||
inDb: `
|
||||
nodeprofiles:
|
||||
default: {}
|
||||
nodes:
|
||||
@@ -629,7 +611,7 @@ nodes:
|
||||
kernel: {}
|
||||
ipmi: {}
|
||||
`,
|
||||
inDb: `WW_INTERNAL: 43
|
||||
inDb: `
|
||||
nodeprofiles:
|
||||
default: {}
|
||||
nodes:
|
||||
|
||||
Reference in New Issue
Block a user