Skip to content

Commit

Permalink
Software netowrking: increase systemd-udevd(8) workaround timeout to …
Browse files Browse the repository at this point in the history
…1s (#58)

* Software netowrking: increase systemd-udevd(8) workaround timeout to 1s

* .golangci.yml: disable gosec's G115 rule

* Fix staticcheck linter warning by using crypto/rand
  • Loading branch information
edigaryev authored Aug 30, 2024
1 parent cdc6964 commit b05dddc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ linters-settings:
exhaustive:
default-signifies-exhaustive: true

gosec:
excludes:
- G115

linters:
enable:
- asciicheck
Expand Down
2 changes: 1 addition & 1 deletion internal/network/software/software.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func New(vmHardwareAddr net.HardwareAddr) (*Network, error) {
// shortly after we create it, which results in the removal of our static neighbor.
//
// [1]: https://github.com/systemd/systemd/issues/21185
time.Sleep(100 * time.Millisecond)
time.Sleep(1 * time.Second)

// Add a permanent neighbor so that "vetu ip" would work
if err := netlink.NeighAdd(&netlink.Neigh{
Expand Down
3 changes: 2 additions & 1 deletion internal/sparseio/sparseio_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package sparseio_test

import (
cryptorand "crypto/rand"
"github.com/cirruslabs/vetu/internal/sparseio"
"github.com/dustin/go-humanize"
"github.com/opencontainers/go-digest"
Expand Down Expand Up @@ -40,7 +41,7 @@ func TestCopyRandomized(t *testing.T) {

// Randomize the contents of some chunks
if rand.Intn(2) == 1 {
_, err = rand.Read(chunk)
_, err = cryptorand.Read(chunk)
require.NoError(t, err)
}

Expand Down

0 comments on commit b05dddc

Please sign in to comment.