diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index a1acb35..3c9b03e 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -13,17 +13,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: args: -p bugs -p unused - - name: Set up Go 1.18 - uses: actions/setup-go@v2 + - name: Set up Go 1.21 + uses: actions/setup-go@v4 with: - go-version: '1.18.x' + go-version: '1.21.x' - name: Test run: | diff --git a/connect/connect.go b/connect/connect.go index a5b6625..07185bc 100644 --- a/connect/connect.go +++ b/connect/connect.go @@ -29,7 +29,7 @@ func InBand(log logger.Logger) (hal.InBand, error) { switch b.Vendor { case api.VendorLenovo: return lenovo.InBand(b, log) - case api.VendorSupermicro: + case api.VendorSupermicro, api.VendorNovarion: return supermicro.InBand(b, log) case api.VendorVagrant: return vagrant.InBand(b, log) @@ -56,7 +56,7 @@ func OutBand(ip string, ipmiPort int, user, password string, log logger.Logger) switch b.Vendor { case api.VendorLenovo: return lenovo.OutBand(r, b), nil - case api.VendorSupermicro: + case api.VendorSupermicro, api.VendorNovarion: return supermicro.OutBand(r, b, ip, ipmiPort, user, password, log) case api.VendorVagrant: return vagrant.OutBand(b, ip, ipmiPort, user, password), nil diff --git a/go.mod b/go.mod index 8c55e70..f4e51e9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/metal-stack/go-hal -go 1.18 +go 1.20 require ( github.com/avast/retry-go/v4 v4.3.2 diff --git a/internal/console/console.go b/internal/console/console.go index 6ca2b2d..435da2b 100644 --- a/internal/console/console.go +++ b/internal/console/console.go @@ -71,11 +71,12 @@ func Open(s ssh.Session, cmd *exec.Cmd) error { <-done if winSizeErr != nil { - err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), winSizeErr) + // FIXME why calling s.Exit(1) in the error message ? + err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), winSizeErr) // nolint:errorlint } else if stdinErr != nil { - err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdinErr) + err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdinErr) // nolint:errorlint } else if stdoutErr != nil { - err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdoutErr) + err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdoutErr) // nolint:errorlint } else { err2 := s.Exit(0) if err2 != nil { diff --git a/internal/ipmi/ipmitool.go b/internal/ipmi/ipmitool.go index fcd98d1..0234d84 100644 --- a/internal/ipmi/ipmitool.go +++ b/internal/ipmi/ipmitool.go @@ -593,7 +593,7 @@ func GetBootOrderQualifiers(bootTarget hal.BootTarget, vendor api.Vendor) (uefiQ case hal.BootTargetDisk: uefiQualifier = persistentUEFIQualifier switch vendor { - case api.VendorSupermicro: + case api.VendorSupermicro, api.VendorNovarion: bootDevQualifier = supermicroHDQualifier case api.VendorLenovo, api.VendorDell, api.VendorVagrant, api.VendorUnknown: fallthrough diff --git a/pkg/api/types.go b/pkg/api/types.go index c06a0ff..1e34122 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -178,6 +178,8 @@ const ( VendorUnknown Vendor = iota // VendorSupermicro identifies all Supermicro servers VendorSupermicro + // VendorNovarion identifies all Novarion servers + VendorNovarion // VendorLenovo identifies all Lenovo servers VendorLenovo // VendorDell identifies all Dell servers @@ -189,12 +191,13 @@ const ( var ( vendors = [...]string{ VendorSupermicro: "Supermicro", + VendorNovarion: "Novarion-Systems", VendorLenovo: "Lenovo", VendorDell: "Dell", VendorVagrant: "Vagrant", VendorUnknown: "UNKNOWN", } - allVendors = [...]Vendor{VendorSupermicro, VendorLenovo, VendorDell, VendorVagrant, VendorUnknown} + allVendors = [...]Vendor{VendorSupermicro, VendorNovarion, VendorLenovo, VendorDell, VendorVagrant, VendorUnknown} ) func (v Vendor) String() string { return vendors[v] }