Skip to content

Commit 5d206fb

Browse files
committed
Revert "feat(cmd): optionally check docker graph driver"
This reverts commit 051d386.
1 parent 6a1d3ac commit 5d206fb

7 files changed

Lines changed: 8 additions & 31 deletions

File tree

cmd/fioup/check.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ func init() {
3030
Short: "Update TUF metadata",
3131
Args: cobra.NoArgs,
3232
Annotations: map[string]string{
33-
lockFlagKey: "true",
34-
requireOverlay2Key: "true",
33+
lockFlagKey: "true",
3534
},
3635
}
3736
cmd.Flags().StringVar(&opts.Format, "format", "text", "Format the output. Values: [text | json]")

cmd/fioup/daemon.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ func init() {
5050
},
5151
Args: cobra.NoArgs,
5252
Annotations: map[string]string{
53-
lockFlagKey: "true",
54-
requireOverlay2Key: "true",
53+
lockFlagKey: "true",
5554
},
5655
}
5756
cmd.Flags().BoolVar(&opts.configEnabled, "fioconfig", true, "Include fioconfig daemon logic.")

cmd/fioup/fetch.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ func init() {
3838
},
3939
Args: cobra.RangeArgs(0, 1),
4040
Annotations: map[string]string{
41-
lockFlagKey: "true",
42-
requireOverlay2Key: "true",
41+
lockFlagKey: "true",
4342
},
4443
}
4544
rootCmd.AddCommand(cmd)

cmd/fioup/install.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ func init() {
1818
},
1919
Args: cobra.NoArgs,
2020
Annotations: map[string]string{
21-
lockFlagKey: "true",
22-
requireOverlay2Key: "true",
21+
lockFlagKey: "true",
2322
},
2423
}
2524
rootCmd.AddCommand(cmd)

cmd/fioup/root.go

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"strings"
1313
"syscall"
1414

15-
"github.com/docker/docker/client"
1615
fioconfig "github.com/foundriesio/fioconfig/app"
1716
"github.com/foundriesio/fioconfig/sotatoml"
1817
cfg "github.com/foundriesio/fioup/pkg/config"
@@ -21,10 +20,8 @@ import (
2120
)
2221

2322
const (
24-
lockFileName = "fioup.lock"
25-
lockFlagKey = "lock-flag"
26-
requireOverlay2Key = "require-overlay2"
27-
overlay2DriverName = "overlay2"
23+
lockFileName = "fioup.lock"
24+
lockFlagKey = "lock-flag"
2825
)
2926

3027
var (
@@ -64,19 +61,6 @@ var (
6461
if l := cmd.Annotations[lockFlagKey]; l == "true" {
6562
cobra.CheckErr(acquireLock())
6663
}
67-
68-
// If the "require overlay2" flag is set, then check if the Docker storage driver is overlay2
69-
if l := cmd.Annotations[requireOverlay2Key]; l == "true" {
70-
cli, err := client.NewClientWithOpts(client.FromEnv)
71-
cobra.CheckErr(err)
72-
73-
info, err := cli.Info(cmd.Context())
74-
cobra.CheckErr(err)
75-
if info.Driver != overlay2DriverName {
76-
cobra.CheckErr(fmt.Errorf("overlay2 storage driver is required, detected: %s", info.Driver))
77-
}
78-
slog.Debug("Detected storage driver", "driver", info.Driver)
79-
}
8064
},
8165
}
8266
)
@@ -102,7 +86,6 @@ func Execute() error {
10286
rootCmd.PersistentPreRun(rootCmd, nil)
10387
os.Exit(runDockerCredsHelper())
10488
}
105-
10689
return rootCmd.Execute()
10790
}
10891

cmd/fioup/start.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ func init() {
1818
},
1919
Args: cobra.NoArgs,
2020
Annotations: map[string]string{
21-
lockFlagKey: "true",
22-
requireOverlay2Key: "true",
21+
lockFlagKey: "true",
2322
},
2423
}
2524
rootCmd.AddCommand(cmd)

cmd/fioup/update.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ func init() {
4444
},
4545
Args: cobra.RangeArgs(0, 1),
4646
Annotations: map[string]string{
47-
lockFlagKey: "true",
48-
requireOverlay2Key: "true",
47+
lockFlagKey: "true",
4948
},
5049
}
5150

0 commit comments

Comments
 (0)