[plugin][systemd] prefer resolvectl over systemd-resolve

Bug #1913581 reported by Eric Desrochers
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Debian)
Fix Released
Unknown
sosreport (Ubuntu)
Fix Released
Medium
Eric Desrochers
Bionic
Fix Released
Medium
Eric Desrochers
Focal
Fix Released
Medium
Eric Desrochers
Groovy
Fix Released
Medium
Eric Desrochers
Hirsute
Fix Released
Medium
Eric Desrochers

Bug Description

[Impact]

'resolvectl' has been introduced in systemd v239. Hence 'systemd-resolve' is now considered deprecated.

In Ubuntu (Focal and onward), to accommodate the transition, a symlink has been created as follows:

$ ls -altr /usr/bin/systemd-resolve
lrwxrwxrwx 1 root root 10 Jul 6 2020 /usr/bin/systemd-resolve -> resolvectl

In stable releases we have systemd version lt and gt v239:

#systemd-resolve (wo/ resolvectl cmd):
 systemd | 229-4ubuntu21.27 | xenial-security
 systemd | 229-4ubuntu21.29 | xenial-updates
 systemd | 237-3ubuntu10 | bionic
 systemd | 237-3ubuntu10.38 | bionic-security
 systemd | 237-3ubuntu10.44 | bionic-updates

#resolvectl (w/ resolvectl and the symlink for 'systemd-resolve'):
 systemd | 245.4-4ubuntu3 | focal
 systemd | 245.4-4ubuntu3.4 | focal-updates
 systemd | 246.6-1ubuntu1 | groovy
 systemd | 246.6-1ubuntu1.1 | groovy-updates
 systemd | 247.1-4ubuntu1 | hirsute

[Test case]

* Deploy Ubuntu (A container will do)
* Run sosreport and make sure the systemd plugin is executed
  ** sosreport -a
  ** sosreport -o systemd
* Look the content of the generated tarball under 'path_to_sosreport/sos_commands/systemd/'

And you'll find the output of 'systemd'resolve' for statistics and status.

What we want is to sosreport to prefer 'resolvectl' iff it exists/executable.

[Where problem could occur]

This 'sos' change enable 'resolvectl' as the preference but remains backward compatible with 'systemd-resolve' for system with systemd version lt v239.

If a problem have to occur, it will only be impacting the systemd plugin itself, not the core functionalities of 'sos' nor its other plugins.

[Other information]

Upstream:
https://github.com/sosreport/sos/pull/2385
https://github.com/sosreport/sos/pull/2385/commits

Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979264

Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Hirsute):
assignee: nobody → Eric Desrochers (slashd)
status: New → In Progress
Changed in sosreport (Ubuntu Groovy):
status: New → In Progress
Changed in sosreport (Ubuntu Focal):
status: New → In Progress
Changed in sosreport (Ubuntu Bionic):
status: New → Incomplete
Changed in sosreport (Ubuntu Groovy):
assignee: nobody → Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Focal):
assignee: nobody → Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Bionic):
assignee: nobody → Eric Desrochers (slashd)
status: Incomplete → In Progress
status: In Progress → Won't Fix
status: Won't Fix → In Progress
tags: added: seg sts
summary: - [plugin]systemd] prefer resolvectl over systemd-resolve
+ [plugin][systemd] prefer resolvectl over systemd-resolve
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 4.0-1ubuntu6

---------------
sosreport (4.0-1ubuntu6) hirsute; urgency=medium

  [Eric Desrochers]
  * d/p/0012-apt-move-unattended-upgrades-log-collection.patch
  (LP: #1906302)

  [Ponnuvel Palaniyappan]
  * d/p/0013-bcache-add-a-new-plugin-for-bcache.patch
  (LP: #1913284)

  [Felipe Reyes]
  * d/p/0014-k8s-add-cdk-master-auth-webhook-to-journal.patch
  * d/p/0015-k8s-fix-cdk-related-file-paths.patch
  (LP: #1913583)

  [Michael Biebl]
  * d/p/0016-systemd-prefer-resolvectl-over-systemd-resolve.patch
    (LP: #1913581)

 -- Eric Desrochers <email address hidden> Fri, 29 Jan 2021 12:20:50 -0500

Changed in sosreport (Ubuntu Hirsute):
status: In Progress → Fix Released
Eric Desrochers (slashd)
description: updated
Changed in sosreport (Ubuntu Hirsute):
importance: Undecided → Medium
Changed in sosreport (Ubuntu Groovy):
importance: Undecided → Medium
Changed in sosreport (Ubuntu Bionic):
importance: Undecided → Medium
Changed in sosreport (Ubuntu Focal):
importance: Undecided → Medium
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Eric, or anyone else affected,

Accepted sosreport into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.0-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, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. 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 Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Changed in sosreport (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eric, or anyone else affected,

Accepted sosreport into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.0-1~ubuntu0.20.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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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
Eric Desrochers (slashd) wrote :

[VERIFICATION FOCAL]

In focal, systemd is shipped as follow:

ls -altr /usr/bin/systemd-resolve
lrwxrwxrwx 1 root root 10 Jan 6 20:47 /usr/bin/systemd-resolve -> resolvectl

With the proposed package of sosreport, the systemd plugin prefer 'resolvectl' over 'systemd-resolve' as it should.

# sos.log
2021-02-18 14:21:53,815 INFO: [plugin:systemd] added cmd output 'resolvectl status'
2021-02-18 14:21:53,815 INFO: [plugin:systemd] added cmd output 'resolvectl statistics'
2021-02-18 14:21:56,377 INFO: [plugin:systemd] collecting output of 'resolvectl status'
2021-02-18 14:21:56,391 INFO: [plugin:systemd] collecting output of 'resolvectl statistics'

ls -altr sos_commands/systemd/resolvectl_stat*
-rw-r--r-- 1 root root 1806 Feb 18 14:21 sos_commands/systemd/resolvectl_status
-rw-r--r-- 1 root root 391 Feb 18 14:21 sos_commands/systemd/resolvectl_statistics

Each command run well and collected the desired output.

If I intentionally remove of the equation and make 'resolvectl' no longer exist. The plugin is taking 'systemd-resolve' as fallback.

# sos.log
2021-02-18 14:25:30,816 INFO: [plugin:systemd] collecting output of 'systemd-resolve --status'
2021-02-18 14:25:30,830 INFO: [plugin:systemd] collecting output of 'systemd-resolve --statistics'

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

[VERIFICATION GROOVY]

In groovy, systemd is shipped as follows:

ls -altr /usr/bin/systemd-resolve
lrwxrwxrwx 1 root root 10 Jan 6 20:47 /usr/bin/systemd-resolve -> resolvectl

With the proposed package of sosreport, the systemd plugin prefer 'resolvectl' over 'systemd-resolve' as it

ls -altr sos_commands/systemd/resolvectl_stat*
-rw-r--r-- 1 root root 555 Feb 18 14:32 sos_commands/systemd/resolvectl_status
-rw-r--r-- 1 root root 391 Feb 18 14:32 sos_commands/systemd/resolvectl_statistics

Each command run well and collected the desired output.

# sos.log
2021-02-18 14:31:58,715 INFO: [plugin:systemd] added cmd output 'resolvectl status'
2021-02-18 14:31:58,716 INFO: [plugin:systemd] added cmd output 'resolvectl statistics'
2021-02-18 14:32:00,962 INFO: [plugin:systemd] collecting output of 'resolvectl status'
2021-02-18 14:32:00,976 INFO: [plugin:systemd] collecting output of 'resolvectl statistics'

If I intentionally remove of the equation and make 'resolvectl' no longer exist. The plugin is taking 'systemd-resolve' as fallback.

2021-02-18 14:33:43,819 INFO: [plugin:systemd] collecting output of 'systemd-resolve --status'
2021-02-18 14:33:43,832 INFO: [plugin:systemd] collecting output of 'systemd-resolve --statistics'

tags: added: verification-done-groovy
removed: verification-needed-groovy
Changed in sosreport (Debian):
status: Unknown → Fix Released
Eric Desrochers (slashd)
Changed in sosreport (Ubuntu Groovy):
status: Fix Committed → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eric, or anyone else affected,

Accepted sosreport into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.1-1ubuntu0.20.10.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, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. 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 Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed-groovy
removed: verification-done-groovy
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Eric, or anyone else affected,

Accepted sosreport into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.1-1ubuntu0.20.04.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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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.

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

Hello Eric, or anyone else affected,

Accepted sosreport into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.1-1ubuntu0.18.04.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, what testing has been performed on the package 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
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (sosreport/4.1-1ubuntu0.20.04.1)

All autopkgtests for the newly accepted sosreport (4.1-1ubuntu0.20.04.1) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

sosreport/4.1-1ubuntu0.20.04.1 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#sosreport

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (sosreport/4.1-1ubuntu0.18.04.1)

All autopkgtests for the newly accepted sosreport (4.1-1ubuntu0.18.04.1) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

sosreport/4.1-1ubuntu0.18.04.1 (s390x, arm64, i386, ppc64el, amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#sosreport

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

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

[VERIFICATION FOCAL]

Did the exact same test (as comment #4) but against new upstream 4.1 found in -proposed.

It is working as expected.

- Eric

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

[VERIFICATION GROOVY]

Did the exact same test (as comment #5) but against new upstream 4.1 found in -proposed.

It is working as expected.

- Eric

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

[VERIFICATION BIONIC]

Did the exact same test as detailed in comment #4,#5 against sos 4.1 found in -proposed for Bionic.

It is working as expected.

- Eric

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sosreport - 4.1-1ubuntu0.20.10.1

---------------
sosreport (4.1-1ubuntu0.20.10.1) groovy; urgency=medium

  * New 4.1 upstream minor release. (LP: #1917894)
    - https://github.com/sosreport/sos/releases/tag/4.1

  * d/tests/simple.sh:
    - Update the script from upstream
    - Modify the script to use /tmp as a target, instead
      of /var/tmp.

  * d/tests/control:
    - Adding isolation-machine as simple.sh wants to
      interact with the kernel.

  * Former patches, now fixed:
    - d/p/0002-fix-dict-order-py38-incompatibility.patch
    - d/p/0003-sosclean-fix-handling-of-filepath-with-archive-name.patch
    - d/p/0004-sosclean-fix-tarball-skipping-regex.patch
    - d/p/0005-ceph-collect-balancer-and-pg-autoscale-status.patch
    - d/p/0006-rabbitmq-add-info-on-maybe-stuck-processes.patch
    - d/p/0007-rabbitmq-add-10sec-timeout-to-call-to-maybestuck.patch
    - d/p/0008-networking-include-ip-neigh-and-rule-info.patch
    - d/p/0009-conntrack-add-conntrack-info.patch
    - d/p/0010-conntrack-gather-per-namespace-data.patch
    - d/p/0011-ceph-include-time-sync-status-for-ceph-mon.patch
    - d/p/0012-apt-move-unattended-upgrades-log-collection.patch
    - d/p/0013-bcache-add-a-new-plugin-for-bcache.patch
    - d/p/0014-k8s-add-cdk-master-auth-webhook-to-journal.patch
    - d/p/0015-k8s-fix-cdk-related-file-paths.patch
    - d/p/0016-systemd-prefer-resolvectl-over-systemd-resolve.patch
    - d/p/0017-ovn-extend-information.patch
    - d/p/0018-ua-prefer-new-ua-cmd-over-the-deprecated-one.patch
    - d/p/0019-ovn-fix-sbctl-cmd-execution.patch

  * Remaining patches:
   - d/p/0001-debian-change-tmp-dir-location.patch

  * New patches:
   - d/p/0002-clean-prevent-parsing-ubuntu-user.patch

  * Fixing the following LP bugs:
   - (LP: #1910264)
   - (LP: #1906302)
   - (LP: #1913284)
   - (LP: #1913583)
   - (LP: #1913581)
   - (LP: #1915072)

 -- Eric Desrochers <email address hidden> Tue, 23 Mar 2021 19:56:28 +0000

Changed in sosreport (Ubuntu Groovy):
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 - 4.1-1ubuntu0.20.04.1

---------------
sosreport (4.1-1ubuntu0.20.04.1) focal; urgency=medium

  * New 4.1 upstream minor release. (LP: #1917894)
    - https://github.com/sosreport/sos/releases/tag/4.1

  * d/tests/simple.sh:
    - Update the script from upstream
    - Modify the script to use /tmp as a target, instead
      of /var/tmp.

  * d/tests/control:
    - Adding isolation-machine as simple.sh wants to
      interact with the kernel.

  * Former patches, now fixed:
    - d/p/0002-fix-dict-order-py38-incompatibility.patch
    - d/p/0003-sosclean-fix-handling-of-filepath-with-archive-name.patch
    - d/p/0004-sosclean-fix-tarball-skipping-regex.patch
    - d/p/0005-ceph-collect-balancer-and-pg-autoscale-status.patch
    - d/p/0006-rabbitmq-add-info-on-maybe-stuck-processes.patch
    - d/p/0007-rabbitmq-add-10sec-timeout-to-call-to-maybestuck.patch
    - d/p/0008-networking-include-ip-neigh-and-rule-info.patch
    - d/p/0009-conntrack-add-conntrack-info.patch
    - d/p/0010-conntrack-gather-per-namespace-data.patch
    - d/p/0011-ceph-include-time-sync-status-for-ceph-mon.patch
    - d/p/0012-apt-move-unattended-upgrades-log-collection.patch
    - d/p/0013-bcache-add-a-new-plugin-for-bcache.patch
    - d/p/0014-k8s-add-cdk-master-auth-webhook-to-journal.patch
    - d/p/0015-k8s-fix-cdk-related-file-paths.patch
    - d/p/0016-systemd-prefer-resolvectl-over-systemd-resolve.patch
    - d/p/0017-ovn-extend-information.patch
    - d/p/0018-ua-prefer-new-ua-cmd-over-the-deprecated-one.patch
    - d/p/0019-ovn-fix-sbctl-cmd-execution.patch

  * Remaining patches:
   - d/p/0001-debian-change-tmp-dir-location.patch

  * New patches:
   - d/p/0002-clean-prevent-parsing-ubuntu-user.patch

  * Fixing the following LP bugs:
   - (LP: #1910264)
   - (LP: #1906302)
   - (LP: #1913284)
   - (LP: #1913583)
   - (LP: #1913581)
   - (LP: #1915072)

 -- Eric Desrochers <email address hidden> Thu, 25 Mar 2021 19:02:37 +0000

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

This bug was fixed in the package sosreport - 4.1-1ubuntu0.18.04.1

---------------
sosreport (4.1-1ubuntu0.18.04.1) bionic; urgency=medium

  * New 4.1 upstream minor release. (LP: #1917894)
    - https://github.com/sosreport/sos/releases/tag/4.1

  * d/tests/*:
    - Remove obsolete scripts

  * d/tests/simple.sh:
    - Update the script from upstream to match sos-4.1
    - Modify the script to use /tmp as a target, instead
      of sos default /var/tmp.

  * d/tests/control:
    - Adding isolation-machine as simple.sh wants to
      interact with the kernel.

  * New config file location now under /etc/sos/sos.conf
    - The old config (/etc/sos.conf) contents will not be
      removed nor carried over after update. Users will
      have to modify the new file instead (as needed).

  * Former patches, now fixed:
    - d/p/0001-lshw-command.patch
    - d/p/0002-lds-substitute-oidc-conf.patch
    - d/p/0003-kvm-change-trigger-to-dev-kvm.patch
    - d/p/0004-maas-add-snap-support.patch
    - d/p/0005-conntrack-add-conntrack-info.patch
    - d/p/0006-conntrack-gather-per-namespace-data.patch
    - d/p/0007-networking-include-ns-ip-neigh-and-ip-rule-info.patch

  * New patches:
   - d/p/0001-debian-change-tmp-dir-location.patch
   - d/p/0002-clean-prevent-parsing-ubuntu-user.patch

  * Fixing the following LP bugs:
   - (LP: #1910264)
   - (LP: #1906302)
   - (LP: #1913284)
   - (LP: #1913583)
   - (LP: #1913581)
   - (LP: #1915072)

 -- Eric Desrochers <email address hidden> Fri, 26 Mar 2021 13:47:44 +0000

Changed in sosreport (Ubuntu Bionic):
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.