Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shutdown/factory-reset: ignore missing lima-home dir error. #5105

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

ericpromislow
Copy link
Contributor

Fixes #4600

@gaktive gaktive requested a review from jandubois July 6, 2023 18:10
@ericpromislow ericpromislow removed the request for review from mook-as July 6, 2023 18:10
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't call limactl if you cannot setup LIMA_HOME.

src/go/rdctl/pkg/shutdown/shutdown.go Show resolved Hide resolved
@jandubois
Copy link
Member

This should probably go into a separate PR, but I noticed that SetupLimaHome has its own logic to set up the LIMA_HOME path. It should use Paths.Lima from the new paths package instead.

Maybe also audit if there is other now redundant path logic in other places.

@ericpromislow ericpromislow force-pushed the 4600-force-shutdown-when-lima-missing branch from 1a968de to f731ab6 Compare July 6, 2023 20:47
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have 2 more questions; not sure if they require changes, but I suspect they do.

Comment on lines 69 to 71
if err != nil {
return err
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do these errors abort the shutdown sequence? Should they also just be logged, and processing continues?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point; processing should continue.

default:
return fmt.Errorf("internal error: unknown shutdown initiating command of '%s'", initiatingCommand)
}
err = s.waitForAppToDieOrKillIt(checkProcessQemu, pkillQemu, 15, 2, "qemu")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the Qemu shutdown inside the Lima conditional? It does not rely on LIMA_HOME or limactl as far as I can tell.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed it was part of lima, but moving it out is fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, but you don't need LIMA_HOME or limactl to kill it, so you can still try...

Don't check or kill lima and qemu processes when the path
to the lima directory can't be found.

Signed-off-by: Eric Promislow <[email protected]>
@ericpromislow ericpromislow force-pushed the 4600-force-shutdown-when-lima-missing branch from f731ab6 to 26ed6dd Compare July 10, 2023 20:06
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@jandubois jandubois merged commit bb26699 into main Jul 18, 2023
14 checks passed
@jandubois jandubois deleted the 4600-force-shutdown-when-lima-missing branch July 18, 2023 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rdctl factory-reset fails to terminate the app
2 participants