summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2021-08-04 06:45:13 +0000
committerGitHub <noreply@github.com>2021-08-04 06:45:13 +0000
commit57422d2093e2f03c8bf5101ac2eb8eb7f281c4de (patch)
treeb3c6cb0ac4a193db0f18bc08b783e6936d19ce9f
parentb1d38753255e0ec4d02574964b4a3fcc748c4820 (diff)
parentb1c9c5b5f1d5b45bf8e1f56f828aaadd7ad524c3 (diff)
downloadpodman-57422d2093e2f03c8bf5101ac2eb8eb7f281c4de.tar.gz
podman-57422d2093e2f03c8bf5101ac2eb8eb7f281c4de.tar.bz2
podman-57422d2093e2f03c8bf5101ac2eb8eb7f281c4de.zip
Merge pull request #11120 from baude/3.3disablearm64
[v3.3] Disable aarch64 support
-rw-r--r--cmd/podman/machine/init.go1
-rw-r--r--cmd/podman/machine/list.go1
-rw-r--r--cmd/podman/machine/machine.go14
-rw-r--r--cmd/podman/machine/rm.go1
-rw-r--r--cmd/podman/machine/ssh.go1
-rw-r--r--cmd/podman/machine/start.go1
-rw-r--r--cmd/podman/machine/stop.go1
7 files changed, 20 insertions, 0 deletions
diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go
index f4133dbde..dfdedefca 100644
--- a/cmd/podman/machine/init.go
+++ b/cmd/podman/machine/init.go
@@ -20,6 +20,7 @@ var (
Args: cobra.MaximumNArgs(1),
Example: `podman machine init myvm`,
ValidArgsFunction: completion.AutocompleteNone,
+ PreRunE: noAarch64,
}
)
diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go
index 134a081ab..d23dbbbde 100644
--- a/cmd/podman/machine/list.go
+++ b/cmd/podman/machine/list.go
@@ -30,6 +30,7 @@ var (
ValidArgsFunction: completion.AutocompleteNone,
Example: `podman machine list,
podman machine ls`,
+ PreRunE: noAarch64,
}
listFlag = listFlagType{}
)
diff --git a/cmd/podman/machine/machine.go b/cmd/podman/machine/machine.go
index b059afc38..848a0715e 100644
--- a/cmd/podman/machine/machine.go
+++ b/cmd/podman/machine/machine.go
@@ -3,6 +3,8 @@
package machine
import (
+ "errors"
+ "runtime"
"strings"
"github.com/containers/podman/v3/cmd/podman/registry"
@@ -16,6 +18,18 @@ var (
noOp = func(cmd *cobra.Command, args []string) error {
return nil
}
+ // noAarch64 temporarily disables arm64 support on
+ // Apple Silicon
+ noAarch64 = func(cmd *cobra.Command, args []string) error {
+ if runtime.GOARCH == "arm64" {
+ if runtime.GOOS == "darwin" {
+ return errors.New("due to missing upstream patches, Apple Silicon is not capable of running Podman machine yet")
+ }
+ return errors.New("no aarch64 images are available at this time")
+ }
+ return nil
+ }
+
// Command: podman _machine_
machineCmd = &cobra.Command{
Use: "machine",
diff --git a/cmd/podman/machine/rm.go b/cmd/podman/machine/rm.go
index 02e3dfeb8..a175a7388 100644
--- a/cmd/podman/machine/rm.go
+++ b/cmd/podman/machine/rm.go
@@ -23,6 +23,7 @@ var (
Args: cobra.MaximumNArgs(1),
Example: `podman machine rm myvm`,
ValidArgsFunction: autocompleteMachine,
+ PreRunE: noAarch64,
}
)
diff --git a/cmd/podman/machine/ssh.go b/cmd/podman/machine/ssh.go
index b52a48faf..07666e444 100644
--- a/cmd/podman/machine/ssh.go
+++ b/cmd/podman/machine/ssh.go
@@ -19,6 +19,7 @@ var (
Example: `podman machine ssh myvm
podman machine ssh myvm echo hello`,
ValidArgsFunction: autocompleteMachineSSH,
+ PreRunE: noAarch64,
}
)
diff --git a/cmd/podman/machine/start.go b/cmd/podman/machine/start.go
index f8f0eed09..ebbfd263e 100644
--- a/cmd/podman/machine/start.go
+++ b/cmd/podman/machine/start.go
@@ -19,6 +19,7 @@ var (
Args: cobra.MaximumNArgs(1),
Example: `podman machine start myvm`,
ValidArgsFunction: autocompleteMachine,
+ PreRunE: noAarch64,
}
)
diff --git a/cmd/podman/machine/stop.go b/cmd/podman/machine/stop.go
index 2d5aa7b95..ff99bdef3 100644
--- a/cmd/podman/machine/stop.go
+++ b/cmd/podman/machine/stop.go
@@ -18,6 +18,7 @@ var (
Args: cobra.MaximumNArgs(1),
Example: `podman machine stop myvm`,
ValidArgsFunction: autocompleteMachine,
+ PreRunE: noAarch64,
}
)