-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MGMT-19100: Allow install to the existing root filesystem (#7197)
* Add coreos image arg to install command * Add coreos image to install command when INSTALL_TO_DISK is set * Don't check disk performance for installs to the existing root Use INSTALL_TO_EXISTING_ROOT to determine if we should check disk performance. Running this check breaks the disk and fails the install when installing to the booted disk.
- Loading branch information
Showing
20 changed files
with
200 additions
and
55 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
api/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
client/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package host | ||
|
||
import ( | ||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
"github.com/openshift/assisted-service/internal/common" | ||
"github.com/openshift/assisted-service/internal/hardware" | ||
"github.com/openshift/assisted-service/models" | ||
) | ||
|
||
var _ = Describe("isInstallationDiskSpeedCheckSuccessful", func() { | ||
var ( | ||
validationCtx *validationContext | ||
v *validator | ||
) | ||
|
||
BeforeEach(func() { | ||
validationCtx = &validationContext{ | ||
host: &models.Host{}, | ||
} | ||
v = &validator{ | ||
log: common.GetTestLog(), | ||
hwValidator: hardware.NewValidator(common.GetTestLog(), hardware.ValidatorCfg{}, nil, nil), | ||
} | ||
}) | ||
|
||
It("returns false when the infraenv is set", func() { | ||
validationCtx.infraEnv = &common.InfraEnv{} | ||
Expect(v.isInstallationDiskSpeedCheckSuccessful(validationCtx)).To(BeFalse()) | ||
}) | ||
|
||
It("returns true when disk partitions are being saved", func() { | ||
validationCtx.host.InstallerArgs = "--save-partindex 1" | ||
Expect(v.isInstallationDiskSpeedCheckSuccessful(validationCtx)).To(BeTrue()) | ||
}) | ||
|
||
It("returns true when installToExistingRoot is set", func() { | ||
v.installToExistingRoot = true | ||
Expect(v.isInstallationDiskSpeedCheckSuccessful(validationCtx)).To(BeTrue()) | ||
}) | ||
|
||
It("fails when install disk path can't be found", func() { | ||
Expect(v.isInstallationDiskSpeedCheckSuccessful(validationCtx)).To(BeFalse()) | ||
}) | ||
|
||
It("succeeds when disk speed has been checked", func() { | ||
validationCtx.host.InstallationDiskPath = "/dev/sda" | ||
validationCtx.host.DisksInfo = "{\"/dev/sda\": {\"disk_speed\": {\"tested\": true, \"exit_code\": 0}, \"path\": \"/dev/sda\"}}" | ||
Expect(v.isInstallationDiskSpeedCheckSuccessful(validationCtx)).To(BeTrue()) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.