From ae862c660ea1e0aa9b57a33617e3bb2fd87d208b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 21 Sep 2018 09:57:14 -0400 Subject: [PATCH] platform: Drop checks for OS IDs This way if someone uses e.g. `-b rhcos`, we will believe them and try. Theoretically for example Flatcar should have its own OS ID and set `ID_LIKE=coreos` or so - in general we should also support `ID_LIKE` but that's a distinct path. --- platform/platform.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/platform/platform.go b/platform/platform.go index 3681fb716..f5fe9b583 100644 --- a/platform/platform.go +++ b/platform/platform.go @@ -299,19 +299,9 @@ func CheckMachine(ctx context.Context, m Machine) error { return fmt.Errorf("ssh unreachable: %v", err) } - // ensure we're talking to a Container Linux system - out, stderr, err := m.SSH("grep ^ID= /etc/os-release") - if err != nil { - return fmt.Errorf("no /etc/os-release file: %v: %s", err, stderr) - } - - if !bytes.Equal(out, []byte("ID=coreos")) && !bytes.Equal(out, []byte(`ID="rhcos"`)) { - return fmt.Errorf("not a supported instance") - } - if !m.RuntimeConf().AllowFailedUnits { // ensure no systemd units failed during boot - out, stderr, err = m.SSH("systemctl --no-legend --state failed list-units") + out, stderr, err := m.SSH("systemctl --no-legend --state failed list-units") if err != nil { return fmt.Errorf("systemctl: %s: %v: %s", out, err, stderr) }