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

Cherry-pick #22359 to 7.10: Treat session ID as a string in system/users #22390

Closed

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Nov 3, 2020

Cherry-pick of PR #22359 to 7.10 branch. Original message:

What does this PR do?

We should be treating the session ID we get from DBus as a string:

      struct {
         string "106"
         uint32 1000
         string "alexk"
         string ""
         object path "/org/freedesktop/login1/session/_3106"
      }

The value seems to be an int 95% of the time, which is why I probably missed this. I'm still not sure under what circumstances we see a character thrown into the Session ID, but it does happen.

Why is it important?

If the Session ID isn't an int, we'll get an error.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

  • Pull down and build
  • On a linux/systemd box, run this metricset and insure that the system.users.id value is a string.

* treat session ID as a string

* add changelog

* Update wording on CHANGELOG.next.asciidoc

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
(cherry picked from commit 7826ef6)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 3, 2020
@botelastic
Copy link

botelastic bot commented Nov 3, 2020

This pull request doesn't have a Team:<team> label.

@elasticmachine
Copy link
Collaborator

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 2239
Skipped 505
Total 2744

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #22390 opened]

  • Start Time: 2020-11-03T16:49:05.064+0000

  • Duration: 73 min 32 sec

Test stats 🧪

Test Results
Failed 0
Passed 2239
Skipped 505
Total 2744

@zube zube bot removed the [zube]: Done label Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants