-
Notifications
You must be signed in to change notification settings - Fork 21
Merge remote-tracking branch '6.0/stage' into 'master' #290
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
Conversation
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
The dbuf command can select dbufs that match certain parameters (e.g. '-l 1' for level-1 dbufs). This works when `dbuf` is the first command in the pipeline, and when it is used as a locator with a dnode_t* as input. But it doesn't work in other circumstances, for example when it's being used only as a pretty-printer (with the list of dbufs piped in), or when it's used in the middle of a pipeline. This change adds the filter calls to this use cases, and adds corresponding test cases
mypy: enable mypy --strict
Introduce type_canonicalize_size() to target API
feature: allow alternate paths for history file
= Issue
Having a history file created using sudo first then trying to use SDB
on a crash dump without sudo:
```
$ sdb vmlinux-5.0.0-36-generic dump.201912060006 -s mods
Traceback (most recent call last):
File "/usr/bin/sdb", line 11, in <module>
load_entry_point('sdb==0.1.0', 'console_scripts', 'sdb')()
File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/internal/cli.py", line 215, in main
repl.enable_history(os.getenv('SDB_HISTORY_FILE', '~/.sdb_history'))
File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/internal/repl.py", line 79, in enable_history
readline.read_history_file(self.histfile)
PermissionError: [Errno 13] Permission denied
...(sdb exits)...
```
= Testing
With this patch we print a warning and drive on:
```
$ sdb vmlinux-5.0.0-36-generic dump.201912060006 -s mods
Warning: You don't have permissions to read ~/.sdb_history and
the command history of this session won't be saved.
Either change this files permission, recreate this file,
or use an alternate path with the SDB_HISTORY_FILE
environment variable.
sdb> addr spa_namespace_avl
(avl_tree_t *)spa_namespace_avl+0x0 = 0xffffffffc07d0fe0
```
Again with this patch in the same situation, we can provide an
alternative path:
```
$ SDB_HISTORY_FILE=./test-history sdb vmlinux-5.0.0-36-generic dump.201912060006 -s mods
sdb> addr init_task
(struct task_struct *)init_task+0x0 = 0xffffffff8c817740
sdb> spa
ADDR NAME
------------------------------------------------------------
0xffffa0894e720000 data
0xffffa089413b8000 meta-domain
0xffffa08955c44000 rpool
sdb>
(^D)
$ cat test-history
addr init_task
spa
$ # running sdb with the same history file we ensure that it works
$ SDB_HISTORY_FILE=./test-history sdb vmlinux-5.0.0-36-generic dump.201912060006 -s mods
sdb> spa
ADDR NAME
------------------------------------------------------------
0xffffa0894e720000 data
0xffffa089413b8000 meta-domain
0xffffa08955c44000 rpool
```
= Other Notes
This patch also helps with situations where SDB gets stuck because the
filesystem backing its history file has crashed and it cannot append
anything to it. For cases like these with the above patch we should
be able to get unstuck by specifying SDB_HISTORY_FILE=/dev/null, like
this:
```
$ SDB_HISTORY_FILE=/dev/null sdb vmlinux-5.0.0-36-generic dump.201912060006 -s mods
sdb> addr spa_namespace_avl
(avl_tree_t *)spa_namespace_avl+0x0 = 0xffffffffc07d0fe0
```
= Github Issue Tracker Automation
Closes #56
= Issue
Specifying a wrong argument for a crash dump shows the following error:
```
$ sdb vmlinux-5.0.0-36-generic bogus.dump -s mods
Traceback (most recent call last):
File "/usr/bin/sdb", line 11, in <module>
load_entry_point('sdb==0.1.0', 'console_scripts', 'sdb')()
File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/internal/cli.py", line 209, in main
prog = setup_target(args)
File "/usr/local/lib/python3.6/dist-packages/sdb-0.1.0-py3.6.egg/sdb/internal/cli.py", line 157, in setup_target
prog.set_core_dump(args.core)
FileNotFoundError: [Errno 2] No such file or directory: 'bogus.dump'
```
= Patch
With this patch:
```
$ sdb vmlinux-5.0.0-36-generic bogus.dump -s mods
sdb: no such file: 'bogus.dump'
```
github-actions: upgrade to latest stable checkout module (v2)
Merge remote-tracking branch 'origin/master' into sync-with-master/6.0/stage
* pylint upgrade: fix new warnings (#218) * Migrate "sync-with-master" to use "delphix/actions" (#217) Co-authored-by: Serapheim Dimitropoulos <[email protected]> Co-authored-by: Prakash Surya <[email protected]>
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Reasoning: The copyrights will be included the debian packages and can be scanned on a deployed VM by Delphix's automation.
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
Merge branch 'master' into '6.0/stage'
sdimitro
pushed a commit
to sdimitro/sdb-dlpx
that referenced
this pull request
Aug 1, 2022
…aster Merge remote-tracking branch '6.0/stage' into 'master' -
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.