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

tkt-77089: Init/shutdown script fixes #2676

Merged
merged 2 commits into from
Feb 27, 2019
Merged

Conversation

sonicaj
Copy link
Member

@sonicaj sonicaj commented Feb 27, 2019

This PR fixes the following issues:

  1. Normalizes reboot, reboot done via new UI resulted in shutdown scripts to not be executed at all.
  2. There are commands which can drain stdin in a while read loop resulting in the termination of the loop i.e ssh. This results in scripts/commands still left to be executed. The issue arises because stdin is shared with the whole while loop body.

Ticket: #77089

This commit normalizes shutdown/reboot behavior making sure of the following factors:
1) Service plugin uses system plugin to reboot/shutdown when stop/restart system is desired.
2) Make sure we cleanly reboot in system plugin ensuring that the rc.shutdown procedure is respected.
This commit fixes an issue where it was possible that some commands like ssh drain out the stdin of the while read loop resulting in termination of the loop with scripts/commands still left to execute.
@sonicaj sonicaj self-assigned this Feb 27, 2019
@bugclerk bugclerk changed the title Init/shutdown script fixes tkt-77089: Init/shutdown script fixes Feb 27, 2019
@sonicaj sonicaj merged commit 376720c into freenas/11.2-stable Feb 27, 2019
@sonicaj sonicaj deleted the issues/77089 branch February 27, 2019 15:15
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.

3 participants