diff --git a/cmd/installer/pkg/install/install.go b/cmd/installer/pkg/install/install.go index 106245277bb..6131c3199d0 100644 --- a/cmd/installer/pkg/install/install.go +++ b/cmd/installer/pkg/install/install.go @@ -50,7 +50,7 @@ func Install(p runtime.Platform, seq runtime.Sequence, opts *Options) (err error // first defaults, then extra kernel args to allow extra kernel args to override defaults cmdline.AppendDefaults() - if err = cmdline.AppendAll(opts.ExtraKernelArgs); err != nil { + if err = cmdline.AppendAll(opts.ExtraKernelArgs, procfs.WithOverwriteArgs("console")); err != nil { return err } diff --git a/go.mod b/go.mod index a8f749690b4..06737736943 100644 --- a/go.mod +++ b/go.mod @@ -61,7 +61,7 @@ require ( github.com/talos-systems/crypto v0.2.1-0.20201203131813-e0dd56ac4745 github.com/talos-systems/go-blockdevice v0.1.1-0.20201218174450-f2728a581972 github.com/talos-systems/go-loadbalancer v0.1.0 - github.com/talos-systems/go-procfs v0.0.0-20201223150035-a82654edcec1 + github.com/talos-systems/go-procfs v0.0.0-20210108152626-8cbc42d3dc24 github.com/talos-systems/go-retry v0.1.1-0.20201113203059-8c63d290a688 github.com/talos-systems/go-smbios v0.0.0-20200807005123-80196199691e github.com/talos-systems/grpc-proxy v0.2.0 diff --git a/go.sum b/go.sum index 4727edfe5ac..1f6f6647736 100644 --- a/go.sum +++ b/go.sum @@ -933,10 +933,8 @@ github.com/talos-systems/go-blockdevice v0.1.1-0.20201218174450-f2728a581972 h1: github.com/talos-systems/go-blockdevice v0.1.1-0.20201218174450-f2728a581972/go.mod h1:efEE9wjtgxiovqsZAV39xlOd/AOI/0sLuZqb5jEgeqo= github.com/talos-systems/go-loadbalancer v0.1.0 h1:MQFONvSjoleU8RrKq1O1Z8CyTCJGd4SLqdAHDlR6o9s= github.com/talos-systems/go-loadbalancer v0.1.0/go.mod h1:D5Qjfz+29WVjONWECZvOkmaLsBb3f5YeWME0u/5HmIc= -github.com/talos-systems/go-procfs v0.0.0-20201210152942-5a9a4a75d559 h1:wHuwJhQa20pD0Re+Ucpr0ec+om/b0GgPcpvTwRHSR3o= -github.com/talos-systems/go-procfs v0.0.0-20201210152942-5a9a4a75d559/go.mod h1:ATyUGFQIW8OnbnmvqefZWVPgL9g+CAmXHfkgny21xX8= -github.com/talos-systems/go-procfs v0.0.0-20201223150035-a82654edcec1 h1:n6q6VlyJp5yyCAzUyds+CFDLW6iDvTDSDXoI3NoXpcs= -github.com/talos-systems/go-procfs v0.0.0-20201223150035-a82654edcec1/go.mod h1:ATyUGFQIW8OnbnmvqefZWVPgL9g+CAmXHfkgny21xX8= +github.com/talos-systems/go-procfs v0.0.0-20210108152626-8cbc42d3dc24 h1:fN8vYvlB9XBQ5aImb1vLgR0ZaDwvfZfBMptqkpi3aEg= +github.com/talos-systems/go-procfs v0.0.0-20210108152626-8cbc42d3dc24/go.mod h1:ATyUGFQIW8OnbnmvqefZWVPgL9g+CAmXHfkgny21xX8= github.com/talos-systems/go-retry v0.1.0/go.mod h1:HiXQqyVStZ35uSY/MTLWVvQVmC3lIW2MS5VdDaMtoKM= github.com/talos-systems/go-retry v0.1.1-0.20201113203059-8c63d290a688 h1:U5wFGj5LXt/r+qfy1nGftQxJvEbg/lVJuasHKtk3K7s= github.com/talos-systems/go-retry v0.1.1-0.20201113203059-8c63d290a688/go.mod h1:HiXQqyVStZ35uSY/MTLWVvQVmC3lIW2MS5VdDaMtoKM= diff --git a/internal/app/machined/pkg/runtime/v1alpha1/platform/packet/packet.go b/internal/app/machined/pkg/runtime/v1alpha1/platform/packet/packet.go index 10921f2a04b..bdc4aa03de0 100644 --- a/internal/app/machined/pkg/runtime/v1alpha1/platform/packet/packet.go +++ b/internal/app/machined/pkg/runtime/v1alpha1/platform/packet/packet.go @@ -152,9 +152,6 @@ func (p *Packet) Configuration(ctx context.Context) ([]byte, error) { } bondName = iface.Bond - - // nb: currently only one interface is supported, as adding one more interface breaks networking - break } // create multiple bond devices and add them to device list. @@ -168,6 +165,10 @@ func (p *Packet) Configuration(ctx context.Context) ([]byte, error) { DeviceCIDR: fmt.Sprintf("%s/%d", addr.Address, addr.CIDR), DeviceBond: &v1alpha1.Bond{ BondMode: bondMode.String(), + BondDownDelay: 200, + BondMIIMon: 100, + BondUpDelay: 200, + BondHashPolicy: "layer3+4", BondInterfaces: devicesInBond, }, } diff --git a/internal/app/networkd/pkg/networkd/networkd.go b/internal/app/networkd/pkg/networkd/networkd.go index 7b41b2527e3..e4dc334f373 100644 --- a/internal/app/networkd/pkg/networkd/networkd.go +++ b/internal/app/networkd/pkg/networkd/networkd.go @@ -140,6 +140,13 @@ func New(config config.Provider) (*Networkd, error) { } } + // add local interfaces which were filtered out with Ignore + for _, device := range localInterfaces { + if _, ok := netconf[device.Name]; !ok { + netconf[device.Name] = []nic.Option{nic.WithName(device.Name), nic.WithIgnore()} + } + } + interfaces := make(map[string]*nic.NetworkInterface) // Create nic.NetworkInterface representation of the interface @@ -303,6 +310,7 @@ func (n *Networkd) decideHostname() (hostname, domainname string, address net.IP // Loop through address responses and use the first hostname // and address response. +outer: for _, intName := range interfaceNames { iface := n.Interfaces[intName] @@ -322,7 +330,7 @@ func (n *Networkd) decideHostname() (hostname, domainname string, address net.IP address = method.Address().IP - break + break outer } } } @@ -400,7 +408,9 @@ func (n *Networkd) configureLinks(bonded bool) error { count++ go func(netif *nic.NetworkInterface) { - log.Printf("setting up %s", netif.Name) + if !netif.IsIgnored() { + log.Printf("setting up %s", netif.Name) + } errCh <- func() error { // Ensure link exists diff --git a/internal/app/networkd/pkg/networkd/networkd_test.go b/internal/app/networkd/pkg/networkd/networkd_test.go index c51ca6ef3d1..119300e6626 100644 --- a/internal/app/networkd/pkg/networkd/networkd_test.go +++ b/internal/app/networkd/pkg/networkd/networkd_test.go @@ -199,6 +199,11 @@ func dhcpConfigFile() config.Provider { { DeviceInterface: "eth0", }, + { + DeviceInterface: "eth1", + DeviceCIDR: "192.168.0.10/24", + DeviceMTU: 9100, + }, }, }, },