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.x: Treat session ID as a string in system/users #22391

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

fearful-symmetry
Copy link
Contributor

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

Cherry-pick of PR #22359 to 7.x 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 <[email protected]>

Co-authored-by: kaiyan-sheng <[email protected]>
(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
@fearful-symmetry fearful-symmetry requested a review from a team November 3, 2020 16:50
@@ -925,3 +926,5 @@ field. You can revert this change by configuring tags for the module and omittin
==== Known Issue

*Journalbeat*

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe these are not needed

@elasticmachine
Copy link
Collaborator

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 2246
Skipped 506
Total 2752

@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 #22391 opened]

  • Start Time: 2020-11-03T16:51:04.721+0000

  • Duration: 73 min 13 sec

Test stats 🧪

Test Results
Failed 0
Passed 2246
Skipped 506
Total 2752

@fearful-symmetry fearful-symmetry merged commit 3ad3c1b into elastic:7.x Nov 3, 2020
@fearful-symmetry fearful-symmetry deleted the backport_22359_7.x branch November 16, 2020 18:14
@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.

3 participants