Skip to content

Commit

Permalink
MGMT-4966 Mapping /run/media directory to the next_step agent (#1780)
Browse files Browse the repository at this point in the history
This PR is related to an agent PR: openshift/assisted-installer-agent#197
This PR aready merged #1685 and reverted #1691 after discovering that /run/media/iso directory does not exist for a minimal ISO
so here we mounted the /run/media directory which exist in them both

When a media disconnection error occurred the system became unstable and the step execution might be stuck on IO errors or failed with an unfriendly message.
Media disconnection occurred when a network drive (mostly PXE) has any errors (Network issue) and the controller disconnects it automatically.
Since this error is common to all the steps, we add this verification to the agent.
/run/media/iso is the ISO directory which mounted to the ISO device for a full-iso
The disconnection event not reproduced for the minimal-iso
  • Loading branch information
Michael Levy authored May 21, 2021
1 parent a47e966 commit 305e5a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/host/hostcommands/next_step_runner_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ func GetNextStepRunnerCommand(config *NextStepRunnerConfig) (string, *[]string)
arguments := []string{"run", "--rm", "-ti", "--privileged", "--pid=host", "--net=host",
"-v", "/dev:/dev:rw", "-v", "/opt:/opt:rw",
"-v", "/run/systemd/journal/socket:/run/systemd/journal/socket",
"-v", "/var/log:/var/log:rw"}
"-v", "/var/log:/var/log:rw",
"-v", "/run/media:/run/media:rw"}

if config.UseCustomCACert {
arguments = append(arguments, "-v", fmt.Sprintf("%s:%s", common.HostCACertPath, common.HostCACertPath))
Expand Down

0 comments on commit 305e5a0

Please sign in to comment.