-
Notifications
You must be signed in to change notification settings - Fork 20
Don't save migrated startup-config, fail-secure hardening #1672
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
Merged
+344
−52
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
52eeb1e
confd: don't save migrated startup-config
troglobit ba0d368
confd: try loading a newer startup-config before giving up
troglobit 519e520
confd: reset and go to fail-secure when startup-config fails
troglobit c224d91
board: remind to upgrade the other partition
troglobit 3de6c8e
cli, webui: remind to upgrade the other partition
troglobit ee57d05
doc: startup-config migration, downgrade, and fail-secure reset
troglobit 59c3a8d
confd: reset to fail-secure if loading startup-config hangs
troglobit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| task name:ixinit [S] <pid/syslogd> \ | ||
| /usr/libexec/finit/runparts -bp /usr/libexec/infix/init.d \ | ||
| -- Probing system | ||
|
|
||
| task name:slot-check [2345] <service/rauc/running> \ | ||
| /usr/libexec/infix/slot-check \ | ||
| -- Checking software partitions |
This file contains hidden or 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 hidden or 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,14 @@ | ||
| #!/bin/sh | ||
| # Remind the user to upgrade the other partition, issue #1637 | ||
|
|
||
| rauc status --detailed --output-format=json 2>/dev/null | jq -r ' | ||
| [.slots | add | .[] | select(.class == "rootfs")] as $slots | ||
| | ($slots[] | select(.state == "booted") | .slot_status.bundle.version) as $booted | ||
| | $slots[] | select(.state != "booted") | ||
| | select(.slot_status.bundle.version != $booted) | ||
| | "\(.bootname) \(.slot_status.bundle.version // "unknown") \($booted)"' | | ||
| while read -r name version booted; do | ||
| msg="NOTE: the $name partition has $version, this is $booted. Use 'upgrade' to update it." | ||
| logger -t slot-check -p user.notice "$msg" | ||
| printf "\n%s\n" "$msg" | tee -a /etc/banner /etc/issue /etc/issue.net >/dev/null | ||
| done |
This file contains hidden or 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,16 @@ | ||
| #!/bin/sh | ||
| # Called by watchdogd when a supervised process misses its deadline: | ||
| # | ||
| # $0 supervisor CODE PID LABEL | ||
| # | ||
| # A hung confd bootstrap goes to fail-secure on next boot, issue #1637. | ||
| # Exit non-zero so watchdogd saves the reset reason and resets. A lost | ||
| # kick reply is not a hang, exit 0 and watchdogd drops the supervision. | ||
|
|
||
| if [ "$4" = "confd-bootstrap" ]; then | ||
| [ "$2" = 5 ] || exit 0 # WDOG_FAILED_TO_MEET_DEADLINE | ||
| touch /mnt/aux/startup-config.failed | ||
| sync | ||
| fi | ||
|
|
||
| exit 1 | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.