updated WW_INTERNAL to 45 for 4.5.x release

Internal version update is necessary as new structures were added,
most obviously the disk, partitions and file system structures.
Old configurations will work as expected.

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2023-12-11 14:22:05 +01:00
committed by Jonathon Anderson
parent 3792883906
commit 1fca0057d3
19 changed files with 74 additions and 73 deletions

View File

@@ -27,7 +27,7 @@ func Test_List(t *testing.T) {
name: "container list test",
args: []string{},
stdout: `test 1 kernel`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
nodes:

View File

@@ -24,7 +24,7 @@ func Test_Add(t *testing.T) {
args: []string{"n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -35,7 +35,7 @@ nodes:
args: []string{"--profile=foo", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -46,7 +46,7 @@ nodes:
args: []string{"--discoverable=true", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -58,7 +58,7 @@ nodes:
args: []string{"--discoverable=yes", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -71,7 +71,7 @@ nodes:
wantErr: true,
stdout: "",
chkout: false,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes: {}
`},
@@ -79,7 +79,7 @@ nodes: {}
args: []string{"--discoverable=false", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -91,7 +91,7 @@ nodes:
args: []string{"--kernelargs=foo", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -104,7 +104,7 @@ nodes:
args: []string{"n01", "n02"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -118,7 +118,7 @@ nodes:
args: []string{"--ipaddr6=fdaa::1", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -132,7 +132,7 @@ nodes:
args: []string{"--ipaddr=10.0.0.1", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -147,7 +147,7 @@ nodes:
wantErr: true,
stdout: "",
chkout: false,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes: {}
`},
@@ -155,7 +155,7 @@ nodes: {}
args: []string{"--ipaddr=10.10.0.1", "n[01-02,03]"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -181,7 +181,7 @@ nodes:
args: []string{"--ipaddr=10.10.0.1", "--netname=foo", "n[01-03]"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -207,7 +207,7 @@ nodes:
args: []string{"--ipaddr=10.10.0.1", "--netname=foo", "--ipmiaddr=10.20.0.1", "n[01-03]"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -239,7 +239,7 @@ nodes:
args: []string{"--fsname=/dev/vda1", "--fspath=/var", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -253,7 +253,7 @@ nodes:
args: []string{"--fsname=dev/vda1", "--fspath=/var", "n01"},
wantErr: true,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes: {}
`},
@@ -261,7 +261,7 @@ nodes: {}
args: []string{"--fsname=var", "--fspath=/var", "--partname=var", "--diskname=/dev/vda", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -279,7 +279,7 @@ nodes:
args: []string{"--fsname=var", "--fspath=/var", "--fsformat=btrfs", "--partname=var", "--diskname=/dev/vda", "n01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles: {}
nodes:
n01:
@@ -304,7 +304,7 @@ nodes:
assert.NoError(t, tempWarewulfConf.Sync())
assert.NoError(t, warewulfconf.New().Read(tempWarewulfConf.Name()))
nodes_yml := `WW_INTERNAL: 43`
nodes_yml := `WW_INTERNAL: 45`
tempNodeConf, nodesConfErr := os.CreateTemp("", "nodes.conf-")
assert.NoError(t, nodesConfErr)
defer os.Remove(tempNodeConf.Name())

View File

@@ -28,7 +28,7 @@ func Test_List(t *testing.T) {
stdout: ` NODE NAME PROFILES NETWORK
n01 default
`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
nodes:
@@ -45,7 +45,7 @@ nodes:
n01 default
n02 default
`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
nodes:
@@ -65,7 +65,7 @@ nodes:
n01 default
n02 default
`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
nodes:
@@ -85,7 +85,7 @@ nodes:
n01 default
n03 default
`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
nodes:
@@ -113,7 +113,7 @@ nodes:
stdout: ` NODE NAME PROFILES NETWORK
n01 default
`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
nodes:

View File

@@ -55,7 +55,7 @@ func Test_Single_Node_Change_Profile(t *testing.T) {
args: []string{"--profile=foo", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -63,7 +63,7 @@ nodes:
n01:
profiles:
- default`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -81,7 +81,7 @@ func Test_Multiple_Add_Tests(t *testing.T) {
args: []string{"--profile=foo", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -89,7 +89,7 @@ nodes:
n01:
profiles:
- default`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -102,7 +102,7 @@ nodes:
args: []string{"--profile=foo", "n0[1-2]"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -113,7 +113,7 @@ nodes:
n02:
profiles:
- default`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -129,7 +129,7 @@ nodes:
args: []string{"--ipmitagadd", "foo=baar", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -137,7 +137,7 @@ nodes:
n01:
profiles:
- default`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -153,7 +153,7 @@ nodes:
args: []string{"--tagdel", "tag1", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -164,7 +164,7 @@ nodes:
tags:
tag1: value1
tag2: value2`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -179,7 +179,7 @@ nodes:
args: []string{"--fsname=var", "--fspath=/var", "--fsformat=btrfs", "--partname=var", "--diskname=/dev/vda", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -188,7 +188,7 @@ nodes:
profiles:
- default
`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -209,7 +209,7 @@ nodes:
args: []string{"--fsdel=var", "n01"},
wantErr: true,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -227,7 +227,7 @@ nodes:
format: btrfs
path: /var
`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -248,7 +248,7 @@ nodes:
args: []string{"--fsdel=/dev/disk/by-partlabel/var", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -266,7 +266,7 @@ nodes:
format: btrfs
path: /var
`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -283,7 +283,7 @@ nodes:
args: []string{"--partdel=var", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -301,7 +301,7 @@ nodes:
format: btrfs
path: /var
`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -320,7 +320,7 @@ nodes:
args: []string{"--diskdel=/dev/vda", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -338,7 +338,7 @@ nodes:
format: btrfs
path: /var
`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -355,7 +355,7 @@ nodes:
args: []string{"--mtu", "1234", "--netname=mynet", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -363,7 +363,7 @@ nodes:
n01:
profiles:
- default`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
default:
comment: testit
@@ -379,7 +379,7 @@ nodes:
args: []string{"--tagadd", "nodetag1=nodevalue1", "n01"},
wantErr: false,
stdout: "",
inDB: `WW_INTERNAL: 43
inDB: `WW_INTERNAL: 45
nodeprofiles:
p1:
comment: testit 1
@@ -394,7 +394,7 @@ nodes:
profiles:
- p1
- p2`,
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
p1:
comment: testit 1

View File

@@ -45,7 +45,7 @@ func Test_List(t *testing.T) {
t.FailNow()
}
inDb := `WW_INTERNAL: 43
inDb := `WW_INTERNAL: 45
nodeprofiles:
default: {}
nodes: {}

View File

@@ -21,7 +21,7 @@ var (
func Test_Overlay_List(t *testing.T) {
env := testenv.New(t)
env.WriteFile(t, "etc/warewulf/nodes.conf",
`WW_INTERNAL: 43
`WW_INTERNAL: 45
nodeprofiles:
default:
tags:

View File

@@ -24,7 +24,7 @@ func Test_Add(t *testing.T) {
args: []string{"--yes", "p01"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
p01: {}
nodes: {}
@@ -35,7 +35,7 @@ nodes: {}
args: []string{"--yes", "--netname", "primary", "--netdev", "eno3", "p02"},
wantErr: false,
stdout: "",
outDb: `WW_INTERNAL: 43
outDb: `WW_INTERNAL: 45
nodeprofiles:
p02:
network devices:
@@ -55,7 +55,7 @@ nodes: {}
assert.NoError(t, tempWarewulfConf.Sync())
warewulfconf.ConfigFile = tempWarewulfConf.Name()
nodes_yml := `WW_INTERNAL: 43`
nodes_yml := `WW_INTERNAL: 45`
tempNodeConf, nodesConfErr := os.CreateTemp("", "nodes.conf-")
assert.NoError(t, nodesConfErr)
defer os.Remove(tempNodeConf.Name())

View File

@@ -25,7 +25,7 @@ func Test_List(t *testing.T) {
args: []string{},
stdout: `PROFILE NAME COMMENT/DESCRIPTION
default --`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
nodes:
@@ -40,7 +40,7 @@ nodes:
stdout: `PROFILE NAME COMMENT/DESCRIPTION
default --
test --`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
test: {}
@@ -55,7 +55,7 @@ nodes:
args: []string{"test,"},
stdout: `PROFILE NAME COMMENT/DESCRIPTION
test --`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
test: {}
@@ -71,7 +71,7 @@ nodes:
stdout: `PROFILE NAME COMMENT/DESCRIPTION
default --
test --`,
inDb: `WW_INTERNAL: 43
inDb: `WW_INTERNAL: 45
nodeprofiles:
default: {}
test: {}