Merge pull request #733 from JasonYangShadow/issue/661
changing a profile always adds an empty default interface
This commit is contained in:
@@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Boolean attributes now correctly account for profile and default
|
||||
values. #630
|
||||
- Kernel version is shown correctly for symlink'd kernels #640
|
||||
- Changing a profile always adds an empty default interface. #661
|
||||
|
||||
## [4.4.0rc3] 2022-12-23
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import (
|
||||
|
||||
// NodeSet is the wwapiv1 implmentation for updating nodeinfo fields.
|
||||
func ProfileSet(set *wwapiv1.NodeSetParameter) (err error) {
|
||||
|
||||
if set == nil {
|
||||
return fmt.Errorf("NodeAddParameter is nil")
|
||||
}
|
||||
@@ -85,6 +84,10 @@ func ProfileSetParameterCheck(set *wwapiv1.NodeSetParameter, console bool) (node
|
||||
for _, p := range profiles {
|
||||
if util.InSlice(set.NodeNames, p.Id.Get()) {
|
||||
wwlog.Verbose("Evaluating profile: %s", p.Id.Get())
|
||||
// Fix issue: https://github.com/hpcng/warewulf/issues/661
|
||||
if p.Id.Get() == "default" && len(p.NetDevs) == 0 {
|
||||
set.NetdevDelete = p.Id.Get()
|
||||
}
|
||||
p.SetFrom(&pConf)
|
||||
if set.NetdevDelete != "" {
|
||||
if _, ok := p.NetDevs[set.NetdevDelete]; !ok {
|
||||
|
||||
Reference in New Issue
Block a user