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

LsVarLog parser does not handle group name containing space #3395

Open
rahulXs opened this issue Apr 22, 2022 · 1 comment · May be fixed by #3406
Open

LsVarLog parser does not handle group name containing space #3395

rahulXs opened this issue Apr 22, 2022 · 1 comment · May be fixed by #3406
Assignees
Labels

Comments

@rahulXs
Copy link
Contributor

rahulXs commented Apr 22, 2022

LsVarLog parser is returning ValueError while parsing lines containing group name with space.

# Example 1
-rw-r--r--.  1 root   domain users@CR.LOCAL        36548 Jan 13 10:43 Xorg.1.log
-rw-r--r--.  1 root   domain users@CR.LOCAL        28245 Jan 13 10:38 Xorg.1.log.old
# Example 2
-rw-r--r--.  1 root   domain users        40893 Jan 31 16:34 Xorg.1.log
-rw-r--r--.  1 root   domain users        36911 Dec 20 09:49 Xorg.1.log.old

Error:

File "/opt/venv/lib64/python3.6/site-packages/insights/core/__init__.py", line 1736, in listing_of
    return self.listings[directory]['entries']
  File "/opt/venv/lib64/python3.6/site-packages/insights/core/ls_parser.py", line 228, in __getitem__
    self._load()
  File "/opt/venv/lib64/python3.6/site-packages/insights/core/ls_parser.py", line 199, in _load
    rest = parse_non_selinux(parts[1:])
  File "/opt/venv/lib64/python3.6/site-packages/insights/core/ls_parser.py", line 54, in parse_non_selinux
    result["size"] = int(size)
ValueError: invalid literal for int() with base 10: 'users@CR.LOCAL'
@psachin psachin self-assigned this Apr 22, 2022
@psachin
Copy link
Contributor

psachin commented Apr 27, 2022

@rahulXs Thanks for raising this. I have verified this issue.

@psachin psachin added the bug label Apr 27, 2022
psachin pushed a commit to psachin/insights-core that referenced this issue May 10, 2022
The SSSD group listings breaks the present implementation by parsing the domain
group as the file-size.

Resolves: RedHatInsights#3395

Signed-off-by: Sachin Patil <psachin@redhat.com>
@psachin psachin linked a pull request May 10, 2022 that will close this issue
3 tasks
psachin pushed a commit to psachin/insights-core that referenced this issue May 10, 2022
The SSSD group listings breaks the present implementation by parsing the domain
group as the file-size.

Resolves: RedHatInsights#3395

Signed-off-by: Sachin Patil <psachin@redhat.com>
psachin pushed a commit to psachin/insights-core that referenced this issue May 10, 2022
The SSSD group listings breaks the present implementation by parsing the domain
group as the file-size.

Resolves: RedHatInsights#3395

Signed-off-by: Sachin Patil <psachin@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants