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

2076948: [1.28] Fix issue with race condition in rhsm.service #3199

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

jirihnidek
Copy link
Contributor

@jirihnidek jirihnidek commented Jan 30, 2023

  • Backport commit
  • BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2076948
  • Card ID: ENT-5383
  • When logging level was changed using D-Bus method SetAll(), then exception was raised and it wasn't possible to change log level. This has happened very rarely.
  • The race condition was caused probably by this case. When logging level was changed by SetAll() method and it was necessary to re-initialized loggin, then some other process changed rhsm.conf and [logging] section was removed from this file. When iniparse tried to get section logging, then this section wasn't there and it caused exceptions.
  • Fixed same issue for Set() D-Bus method too.

Backport of PR #3151 to 1.28.

@jirihnidek jirihnidek marked this pull request as ready for review March 15, 2023 13:21
@ptoscano
Copy link
Contributor

In addition of a needed rebase, the referenced BZ ought to be 2076948 rather than 2093883.

Other than that, same notes as I wrote in #3151: #3151 (review).

@jirihnidek jirihnidek changed the title 2093883: [1.28] Fix issue with race condition in rhsm.service 2076948: [1.28] Fix issue with race condition in rhsm.service Mar 17, 2023
* Backport commit
* BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2076948
* Card ID: ENT-5383
* When logging level was changed using D-Bus method SetAll(),
  then exception was raised and it wasn't possible to
  change log level. This has happened very rarely.
* The race condition was caused probably by this case.
  When logging level was changed by SetAll() method and it was
  necessary to re-initialized loggin, then some other process
  changed rhsm.conf and [logging] section was removed from
  this file. When iniparse tried to get section logging, then
  this section wasn't there and it caused exceptions.
* Fixed same issue for Set() D-Bus method too.
* Original PR: #3151
@jirihnidek
Copy link
Contributor Author

Updated the PR and commit as requested.

@github-actions
Copy link

github-actions bot commented Mar 17, 2023

Coverage

Coverage (computed on Fedora latest) •
FileStmtsMissCoverMissing
rhsmlib/dbus/objects
   config.py1054061%54–55, 85, 99–100, 105–108, 126–128, 130, 132, 134–135, 137–138, 140, 142–143, 148, 151, 154–156, 161–164, 167, 220, 224, 227, 229–233, 235
TOTAL22831992556% 

Tests Skipped Failures Errors Time
2339 10 💤 0 ❌ 0 🔥 9m 1s ⏱️

Copy link
Contributor

@ptoscano ptoscano left a comment

Choose a reason for hiding this comment

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

Easy backport, thanks!

@ptoscano ptoscano merged commit 7409357 into subscription-manager-1.28 Mar 17, 2023
@ptoscano ptoscano deleted the jhnidek/1.28-2093883 branch March 17, 2023 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants