diff --git a/Dockerfile b/Dockerfile index 9c9447fd..7669427e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM metalstack/builder:latest as builder -FROM registry.fi-ts.io/metal/supermicro:2.4.0 as sum +FROM registry.fi-ts.io/metal/supermicro:2.5.0 as sum -FROM golang:1.13-buster as initrd-builder -ENV UROOT_GIT_SHA_OR_TAG=v6.0.0 +FROM golang:1.14-buster as initrd-builder +ENV UROOT_GIT_SHA_OR_TAG=v7.0.0 RUN apt-get update \ && apt-get install -y --no-install-recommends \ curl \ diff --git a/Makefile b/Makefile index 175b9c5a..26a95f79 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ clean:: ${INITRD_COMPRESSED}: rm -f ${INITRD_COMPRESSED} - docker-make --no-push --Lint --no-cache + docker-make --no-push --Lint .PHONY: initrd initrd: ${INITRD_COMPRESSED} diff --git a/cmd/bios.go b/cmd/bios.go index 3dec4cc0..27f27011 100644 --- a/cmd/bios.go +++ b/cmd/bios.go @@ -1,9 +1,10 @@ package cmd import ( + "time" + "github.com/metal-stack/metal-hammer/cmd/event" "github.com/metal-stack/metal-hammer/pkg/kernel" - "time" log "github.com/inconshreveable/log15" ) diff --git a/cmd/firmware/firmware.go b/cmd/firmware/firmware.go index 70d6c9e7..fadaf87c 100644 --- a/cmd/firmware/firmware.go +++ b/cmd/firmware/firmware.go @@ -1,9 +1,10 @@ package firmware import ( + "os/exec" + log "github.com/inconshreveable/log15" "github.com/pkg/errors" - "os/exec" ) // updater check if a firmware update is required and updates diff --git a/cmd/image/image.go b/cmd/image/image.go index 972b4879..6bdf5035 100644 --- a/cmd/image/image.go +++ b/cmd/image/image.go @@ -2,19 +2,21 @@ package image import ( "fmt" + log "github.com/inconshreveable/log15" "github.com/mholt/archiver" lz4 "github.com/pierrec/lz4" pb "gopkg.in/cheggaaa/pb.v1" "crypto/md5" - "github.com/pkg/errors" "io" "io/ioutil" "net/http" "os" "strings" "time" + + "github.com/pkg/errors" ) // Pull a image from s3 diff --git a/cmd/network/ntpdate.go b/cmd/network/ntpdate.go index 7fea9061..f316ddc7 100644 --- a/cmd/network/ntpdate.go +++ b/cmd/network/ntpdate.go @@ -2,10 +2,11 @@ package network import ( "fmt" - log "github.com/inconshreveable/log15" "syscall" "time" + log "github.com/inconshreveable/log15" + "github.com/beevik/ntp" ) diff --git a/cmd/reinstall.go b/cmd/reinstall.go index 2f1be20a..55211b23 100644 --- a/cmd/reinstall.go +++ b/cmd/reinstall.go @@ -2,6 +2,9 @@ package cmd import ( "fmt" + "strings" + "time" + log "github.com/inconshreveable/log15" "github.com/jaypipes/ghw" "github.com/metal-stack/metal-hammer/cmd/event" @@ -10,8 +13,6 @@ import ( "github.com/metal-stack/metal-hammer/metal-core/models" "github.com/metal-stack/metal-hammer/pkg/kernel" "github.com/pkg/errors" - "strings" - "time" ) // fetchMachine requests the machine data of given machine ID diff --git a/cmd/storage/mount.go b/cmd/storage/mount.go index 548e753f..df4ea377 100644 --- a/cmd/storage/mount.go +++ b/cmd/storage/mount.go @@ -1,11 +1,12 @@ package storage import ( - "github.com/pkg/errors" "os" "path/filepath" "syscall" + "github.com/pkg/errors" + log "github.com/inconshreveable/log15" ) diff --git a/go.mod b/go.mod index fae4224c..a5d86b46 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/metal-stack/metal-hammer +go 1.15 + require ( github.com/beevik/ntp v0.3.0 github.com/dsnet/compress v0.0.1 // indirect @@ -28,7 +30,7 @@ require ( github.com/pierrec/lz4 v2.5.2+incompatible github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.6.1 - github.com/u-root/u-root v6.0.0+incompatible + github.com/u-root/u-root v7.0.0+incompatible github.com/vishvananda/netlink v1.1.0 github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae // indirect golang.org/x/sys v0.0.0-20201117222635-ba5294a509c7 @@ -38,5 +40,3 @@ require ( ) replace github.com/mholt/archiver => github.com/mholt/archiver v2.1.0+incompatible - -go 1.15 diff --git a/go.sum b/go.sum index 0f968920..91c36e7d 100644 --- a/go.sum +++ b/go.sum @@ -666,6 +666,8 @@ github.com/tidwall/pretty v1.0.1/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhV github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/u-root/u-root v6.0.0+incompatible h1:YqPGmRoRyYmeg17KIWFRSyVq6LX5T6GSzawyA6wG6EE= github.com/u-root/u-root v6.0.0+incompatible/go.mod h1:RYkpo8pTHrNjW08opNd/U6p/RJE7K0D8fXO0d47+3YY= +github.com/u-root/u-root v7.0.0+incompatible h1:u+KSS04pSxJGI5E7WE4Bs9+Zd75QjFv+REkjy/aoAc8= +github.com/u-root/u-root v7.0.0+incompatible/go.mod h1:RYkpo8pTHrNjW08opNd/U6p/RJE7K0D8fXO0d47+3YY= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= diff --git a/pkg/kernel/kernel.go b/pkg/kernel/kernel.go index 238836c2..02676318 100644 --- a/pkg/kernel/kernel.go +++ b/pkg/kernel/kernel.go @@ -1,15 +1,16 @@ package kernel import ( - "github.com/pkg/errors" "io/ioutil" "os" "strings" "time" "unsafe" + "github.com/pkg/errors" + log "github.com/inconshreveable/log15" - "github.com/u-root/u-root/pkg/kexec" + "github.com/u-root/u-root/pkg/boot/kexec" "golang.org/x/sys/unix" "gopkg.in/yaml.v2" ) diff --git a/pkg/lldp/client.go b/pkg/lldp/client.go index 458ef837..f8f72e0a 100644 --- a/pkg/lldp/client.go +++ b/pkg/lldp/client.go @@ -2,13 +2,14 @@ package lldp import ( "fmt" + "net" + "time" + "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.com/google/gopacket/pcap" log "github.com/inconshreveable/log15" "github.com/pkg/errors" - "net" - "time" ) // LinkType can be Interface or Mac