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

redis-dump -d 6 -k JINJA2_CACHE error #5587

Closed
lguohan opened this issue Oct 11, 2020 · 3 comments · Fixed by #5646
Closed

redis-dump -d 6 -k JINJA2_CACHE error #5587

lguohan opened this issue Oct 11, 2020 · 3 comments · Fixed by #5646

Comments

@lguohan
Copy link
Collaborator

lguohan commented Oct 11, 2020

Description

Steps to reproduce the issue:

  1. redis-dump -d 6 -k JINJA2_CACHE

Describe the results you received:

admin@sonic:~$ redis-dump -d 6 -k JINJA2_CACHE
{Traceback (most recent call last):
  File "/usr/local/bin/redis-dump", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/redisdl.py", line 666, in main
    do_dump(options)
  File "/usr/local/lib/python2.7/dist-packages/redisdl.py", line 587, in do_dump
    dump(output, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/redisdl.py", line 173, in dump
    for key, type, ttl, value in _reader(r, pretty, encoding, keys):
  File "/usr/local/lib/python2.7/dist-packages/redisdl.py", line 283, in _reader
    pretty=pretty, encoding=encoding):
  File "/usr/local/lib/python2.7/dist-packages/redisdl.py", line 341, in _read_keys
    value = reader.handle_response(results[i*3], pretty, encoding)
  File "/usr/local/lib/python2.7/dist-packages/redisdl.py", line 241, in handle_response
    value[k.decode(encoding)] = response[k].decode(encoding)
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 2: invalid start byte

Describe the results you expected:
it should not have issue.

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `show version`:**
admin@str2-7050cx3-acs-03:~$ show version

SONiC Software Version: SONiC.master.436-d03de95e
**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@lguohan
Copy link
Collaborator Author

lguohan commented Oct 11, 2020

introduced in #3658

@lguohan
Copy link
Collaborator Author

lguohan commented Oct 11, 2020

I am not sure if JINJA2_CACHE belongs to state db.

@liat-grozovik
Copy link
Collaborator

the cash info is required, the reason for putting it on stat db was just yet another db which is not dumped by the show techsupport. for example: log level or flex counters.
the problem is with redis dump utility so need to move the info to another db which is not used by redis dump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants