[sru] remove juju-db stop/start service interactions

Bug #1828467 reported by Dan Hill
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Ubuntu)
Fix Released
Low
Eric Desrochers
Trusty
Won't Fix
Low
Unassigned
Xenial
Fix Released
Medium
Eric Desrochers
Bionic
Fix Released
Medium
Eric Desrochers
Cosmic
Won't Fix
Low
Unassigned
Disco
Fix Released
Medium
Eric Desrochers
Eoan
Fix Released
Medium
Eric Desrochers

Bug Description

[Impact]

The juju plugin will stop and start the juju-db service during data collection.
sosreport should not impact running services, or attempt to recover them.

This has been reported upstream[0] and will be fixed by the juju 2.x refactor[1]

This is a stop-gap tracking the removal of the juju-db service restart code in existing sosreport releases.

[0] - https://github.com/sosreport/sos/issues/1653
[1] - https://github.com/sosreport/sos/pull/1670

[Test Case]

 * Make sure you are in the juju controller.
 * Install sosreport (if not present already)
    $ sudo apt-get install sosreport -y

 * Look mongod PID before
    $ pidof mongod

 * Run sosreport, ensuring that the juju plugin is exercised
    $ sosreport -a # Should detect it if /usr/bin/juju' or '/usr/bin/juju-run' are found
    and/or
    $ sosreport -o juju # In a snap package env, it's possible sosreport doesn't detect it and the plugin would need to be enforce.

 * Confirm the juju-db service was not restarted, and mongoexport data captured by looking mongod PID after
    $ pidof mongod

Check for errors while running, or in /tmp/sosreport-*/sos_logs/

The offending function ensure_service_is_running() in theory doesn't create any harm unless juju plugin is exercised during a sosreport run from a juju controller where mongod and/or juju-db resides.

[Regression Potential]

 * Risk is low.
 * Change is limited in scope to the juju plugin.
 * Worst-case scenario is that the mongoexport command will fail to collect any data, which won't affect core functionality of sosreport itself nor impact other sosreport plugins.

If any regression, it will be way less worse than current situation, where daemon are susceptible to be restarted. It's not sosreport responsability to take action on daemons, it should only monitor it and report back to users via its respective plugin.

[Other information]

We will temporary divert from the juju plugin found upstream and debian, while the refactoring is completed to avoid any situation where sosreport is run on a controller since it may have production impact on Ubuntu juju environment.

Once the refactoring of the juju plugin is completed upstream, we will make sure to update debian and put the juju plugin align with what found upstream and debian.

Actually, sosreport 3.8 micro-release is blocked waiting for this refactoring to be completed (LP: #1825010).

Dan Hill (hillpd)
Changed in sosreport (Ubuntu):
milestone: none → eoan-updates
milestone: eoan-updates → none
Changed in sosreport (Ubuntu Xenial):
assignee: nobody → Dan Hill (hillpd)
Changed in sosreport (Ubuntu Bionic):
assignee: nobody → Dan Hill (hillpd)
Changed in sosreport (Ubuntu Cosmic):
assignee: nobody → Dan Hill (hillpd)
Changed in sosreport (Ubuntu Disco):
assignee: nobody → Dan Hill (hillpd)
Changed in sosreport (Ubuntu Eoan):
assignee: nobody → Dan Hill (hillpd)
Changed in sosreport (Ubuntu Trusty):
assignee: nobody → Dan Hill (hillpd)
importance: Undecided → Low
Changed in sosreport (Ubuntu Xenial):
importance: Undecided → Low
Changed in sosreport (Ubuntu Bionic):
importance: Undecided → Low
Changed in sosreport (Ubuntu Cosmic):
importance: Undecided → Low
Changed in sosreport (Ubuntu Disco):
importance: Undecided → Low
Changed in sosreport (Ubuntu Eoan):
importance: Undecided → Low
tags: added: sts
Dan Hill (hillpd)
Changed in sosreport (Ubuntu Eoan):
status: New → In Progress
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Trusty):
status: New → Won't Fix
Revision history for this message
Eric Desrochers (slashd) wrote :

I marked Trusty as 'Won't Fix' as it reached EOL.

description: updated
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
Changed in sosreport (Ubuntu):
assignee: Dan Hill (hillpd) → Eric Desrochers (slashd)
status: In Progress → Fix Released
Changed in sosreport (Ubuntu Cosmic):
status: New → Won't Fix
Changed in sosreport (Ubuntu Eoan):
assignee: Dan Hill (hillpd) → Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Disco):
assignee: Dan Hill (hillpd) → Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Cosmic):
assignee: Dan Hill (hillpd) → nobody
Changed in sosreport (Ubuntu Bionic):
assignee: Dan Hill (hillpd) → Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Xenial):
assignee: Dan Hill (hillpd) → Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Disco):
status: New → In Progress
Changed in sosreport (Ubuntu Bionic):
status: New → In Progress
Changed in sosreport (Ubuntu Xenial):
status: New → In Progress
Revision history for this message
Eric Desrochers (slashd) wrote :

Uploaded in E/D/B/X.

- Eric

Changed in sosreport (Ubuntu Xenial):
importance: Low → Medium
Changed in sosreport (Ubuntu Bionic):
importance: Low → Medium
Changed in sosreport (Ubuntu Disco):
importance: Low → Medium
Changed in sosreport (Ubuntu Eoan):
importance: Low → Medium
description: updated
description: updated
Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Trusty):
assignee: Dan Hill (hillpd) → nobody
description: updated
Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Dan, or anyone else affected,

Accepted sosreport into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/3.6-1ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sosreport (Ubuntu Eoan):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-eoan
Changed in sosreport (Ubuntu Disco):
status: In Progress → Fix Committed
tags: added: verification-needed-disco
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Dan, or anyone else affected,

Accepted sosreport into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/3.6-1ubuntu2.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Dan, or anyone else affected,

Accepted sosreport into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/3.6-1ubuntu0.18.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sosreport (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Changed in sosreport (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Dan, or anyone else affected,

Accepted sosreport into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/3.6-1ubuntu0.16.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Eric Desrochers (slashd)
tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION BIONIC]

# pidof mongod
975

# service juju-db status
Active: active (running) since Thu 2019-11-14 16:59:56 UTC; 9min ago
Main PID: 975 (mongod)

# sosreport -o juju

# pidof mongod
975

# service juju-db status
Active: active (running) since Thu 2019-11-14 16:59:56 UTC; 9min ago
Main PID: 975 (mongod)

No more mongod restart observed when juju plugin is exercised in a Juju controller.

- Eric

Revision history for this message
Eric Desrochers (slashd) wrote :

[VERIFICATION XENIAL] + [VERIFICATION DISCO] + [VERIFICATION EOAN]

Same exact verification as #9 has been made on D/E, and no more mongod restart observed when juju plugin is exercised in a Juju controller.

- Eric

tags: added: verification-done-disco verification-done-eoan verification-done-xenial
removed: verification-needed-disco verification-needed-eoan verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

For the future, please be sure to record the version tested during verification. Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 3.6-1ubuntu3.1

---------------
sosreport (3.6-1ubuntu3.1) eoan; urgency=medium

  * d/p/juju-shouldnt-restart-juju-db-service.patch (LP: #1828467)
    sosreport shouldn't restart a service. It can only collect
    it's status to notify user in case the service is stopped.

 -- Eric Desrochers <email address hidden> Mon, 11 Nov 2019 15:32:21 +0000

Changed in sosreport (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for sosreport has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 3.6-1ubuntu2.2

---------------
sosreport (3.6-1ubuntu2.2) disco; urgency=medium

  * d/p/juju-shouldnt-restart-juju-db-service.patch (LP: #1828467)
    sosreport shouldn't restart a service. It can only collect
    it's status to notify user in case the service is stopped.

 -- Eric Desrochers <email address hidden> Mon, 11 Nov 2019 15:51:56 +0000

Changed in sosreport (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 3.6-1ubuntu0.18.04.4

---------------
sosreport (3.6-1ubuntu0.18.04.4) bionic; urgency=medium

  * d/p/juju-shouldnt-restart-juju-db-service.patch (LP: #1828467)
    sosreport shouldn't restart a service. It can only collect
    it's status to notify user in case the service is stopped.

 -- Eric Desrochers <email address hidden> Mon, 11 Nov 2019 16:13:35 +0000

Changed in sosreport (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 3.6-1ubuntu0.16.04.4

---------------
sosreport (3.6-1ubuntu0.16.04.4) xenial; urgency=medium

  * d/p/juju-shouldnt-restart-juju-db-service.patch (LP: #1828467)
    sosreport shouldn't restart a service. It can only collect
    it's status to notify user in case the service is stopped.

 -- Eric Desrochers <email address hidden> Mon, 11 Nov 2019 16:06:09 +0000

Changed in sosreport (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.