Skip to content

Commit

Permalink
kola: Add --no-default-checks
Browse files Browse the repository at this point in the history
This will allow us to e.g. bypass SELinux denials when we need
to, e.g.  coreos/fedora-coreos-tracker#751

The intention is that for FCOS releases we would drive this declaratively
in the pipeline, something like a:

```
kola:
  no-default-checks: 33.20210201.3.0
```

to automatically suppress checks for builds with that version number.
  • Loading branch information
cgwalters authored and openshift-merge-robot committed Feb 23, 2021
1 parent 4601f7b commit 0d07f4e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions mantle/cmd/kola/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func init() {
bv(&kola.NoNet, "no-net", false, "Don't run tests that require an Internet connection")
ssv(&kola.Tags, "tag", []string{}, "Test tag to run. Can be specified multiple times.")
bv(&kola.Options.SSHOnTestFailure, "ssh-on-test-failure", false, "SSH into a machine when tests fail")
bv(&kola.Options.SuppressDefaultChecks, "no-default-checks", false, "Disable default checks for failed systemd units and SELinux AVC denials")
sv(&kola.Options.Stream, "stream", "", "CoreOS stream ID (e.g. for Fedora CoreOS: stable, testing, next)")
sv(&kola.Options.CosaWorkdir, "workdir", "", "coreos-assembler working directory")
sv(&kola.Options.CosaBuildId, "build", "", "coreos-assembler build ID")
Expand Down
9 changes: 6 additions & 3 deletions mantle/kola/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,9 +878,12 @@ func getClusterSemver(flight platform.Flight, outputDir string) (*semver.Version
return nil, err
}

cluster, err := flight.NewCluster(&platform.RuntimeConfig{
OutputDir: testDir,
})
cfg := &platform.RuntimeConfig{
OutputDir: testDir,
AllowFailedUnits: Options.SuppressDefaultChecks,
}

cluster, err := flight.NewCluster(cfg)
if err != nil {
return nil, errors.Wrapf(err, "creating cluster for semver check")
}
Expand Down
3 changes: 2 additions & 1 deletion mantle/platform/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ type Options struct {
// inside of RenderUserData
OSContainer string

SSHOnTestFailure bool
SSHOnTestFailure bool
SuppressDefaultChecks bool
}

// RuntimeConfig contains cluster-specific configuration.
Expand Down

0 comments on commit 0d07f4e

Please sign in to comment.