Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

platform: Drop checks for OS IDs #920

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions platform/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down