[sru] sos upstream 4.5.4

Bug #2022915 reported by nikhil kshirsagar
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Ubuntu)
Fix Released
Undecided
nikhil kshirsagar
Bionic
Invalid
Undecided
nikhil kshirsagar
Focal
Won't Fix
Undecided
nikhil kshirsagar
Jammy
Won't Fix
Undecided
nikhil kshirsagar
Kinetic
Won't Fix
Undecided
nikhil kshirsagar
Lunar
Won't Fix
Undecided
nikhil kshirsagar
Mantic
Fix Released
Undecided
nikhil kshirsagar

Bug Description

[IMPACT]

The sos team is pleased to announce the release of sos-4.5.4. This release focused on expanding support in policies for more and multiple package managers.

[TEST PLAN]

Documentation for Special Cases:
https://wiki.ubuntu.com/SosreportUpdates

[WHERE PROBLEMS COULD OCCUR]

The changes in sosreport are described below. There are a number of changes related to report, plugins and policy. The changes in sosreport content may break existing tooling, so that will need extensive testing.

Global Changes

Policies
Added a snap package manager abstraction so that policies and plugins may inspect package installations using the snap manager.
Added a MultiPackagerManager that allows policies to leverage multiple package managers on the same system - e.g. a system using both dpkg and snaps.
The Ubuntu policy will now use both the dpkg and snap package managers, so plugins will be enabled based on the installation of a package in either dpkg or snap format.
The dpkg package manager will now properly remove recently-uninstalled packages from the returned package list.
The Mariner policy has been renamed to Azure Linux to match the new upstream naming.

Report Changes
Plugins will now collect truncated strings into the report before collecting command output.

Plugin Changes
New plugins: rhc, microk8s
The alternatives plugin now supports Ubuntu installations.
The dnf plugin has removed the superflous use of --assumeno from commands that cannot generate the need for user input. Command file names will change accordingly.
The apport plugin will now collect /var/crash if --all-logs is used.
The lxd plugin will now collect logs and configuration files from locations based on snap installations as well.
The apt plugin will now obfuscate credentials in list files.
The kernel plugin will now collect /var/lib/systemd/pstore.
The powerpc plugin will now collect RMC status logs and invscout logs.
The foreman plugin will now collect qpid-stat output.
The landscape plugin now collects more logs.

Collect Changes
Fixed a bug that would prevent the juju cluster from collections when a subbordinate's parent or its units were missing.
Fixed a bug where collect could end up skipping the local node if that node was part of the cluster but was not forcibly removed via strict_node_list (primarily pacemaker clusters).

For full information on the changes contained in this release, please refer to the Git commit logs.

Further release information and tarballs are available at:
https://github.com/sosreport/sos/releases/tag/4.5.4

Please report any problems to the sos-devel mailing list, or the GitHub issue tracker:
https://github.com/sosreport/sos/issues/

The team would like to thank everyone who contributed fixes, new features, testing, and feedback for this release.

Release notes:
https://github.com/sosreport/sos/releases/tag/4.5.4

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote (last edit ):

Additional patch built on top of upstream sos 4.5.4 is in these packages, patch is https://github.com/sosreport/sos/pull/3263 which fixes https://github.com/sosreport/sos/issues/3261 (Thanks for this fix Arif++)

Also, this release has an exclude clause in the debian/rules under override_dh_auto_test to skip unittests/policy_tests.py due to the avocado dependency introduced due to https://github.com/sosreport/sos/commit/c59ab1c169098fd3a173a68e09373bdc2498139a
Without that , the build fails with,
~~~
test_tail_too_many (tests.unittests.utilities_tests.TailTest) ... ok

======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'avocado')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 417, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/<<PKGBUILDDIR>>/tests/unittests/policy_tests.py", line 10, in <module>
    from avocado.utils import distro
ModuleNotFoundError: No module named 'avocado'
~~~
Uploading all the debdiffs, starting with mantic.

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote (last edit ):
Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

some initial testing on all releases - https://pastebin.canonical.com/p/NPnQF38PTR/

Revision history for this message
Arif Ali (arif-ali) wrote :
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

This bug is in our general sponsorship queue, do you really need someone to sponsor the uploads? Or do you already have someone (from the support engineering team) to do it for you? I am asking because I've seen your team handling the sosreport uploads before. If you already have a sponsor for the packages, please, unsubscribe ~ubuntu-sponsors.

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

I have removed the ~ubuntu-sponsors, I'll take care of the development release upload, and will let se-sponsor handle stable release.

Nikhil, please remove the commented (#) you added. I understand the intent is for a reference, but it give the impression that it was once enabled, and then disabled by "#", this could be misleading.

Please take a reference/note outside the src package and d/rules as this is not the right place for that.

 override_dh_auto_test:
- nosetests3 -v --with-cover --cover-package=sos tests/unittests
+ nosetests3 -v --with-cover --cover-package=sos tests/unittests --ignore-files="policy_tests\.py"
==> + #DEB_BUILD_OPTIONS=nocheck dh_auto_test

- Eric

Changed in sosreport (Ubuntu Mantic):
status: New → In Progress
Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

removed the comment in d/rules as suggested by Eric, and built the new ppa https://launchpad.net/~nkshirsagar/+archive/ubuntu/mantic-sos-4.5.4-final , attaching the changed mantic debdiff here.

Revision history for this message
Dariusz Gadomski (dgadomski) wrote :

Latest debdiff lgtm. Only avocado-dependent test file ignored, nice.

+1 from me.

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

[Mantic Upload Sponsoring]

sosreport '4.5.4ubuntu1' sponsored in Devel release:
https://launchpad.net/ubuntu/+source/sosreport/4.5.4ubuntu1

Will let "se-sponsor" handle the upload in stable release.

- Eric

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

This bug was fixed in the package sosreport - 4.5.4ubuntu1

---------------
sosreport (4.5.4ubuntu1) mantic; urgency=medium

  * New 4.5.4 upstream. (LP: #2022915)

  * For more details, full release note is available here:
    - https://github.com/sosreport/sos/releases/tag/4.5.4

  * d/rules:
    - skip running unittests/policy_tests.py due to the avocado dependency

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

  * New patches:
    - d/p/0002-regex-flags.patch

 -- Nikhil Kshirsagar <email address hidden> Tue, 13 Jun 2023 07:15:42 +0000

Changed in sosreport (Ubuntu Mantic):
status: In Progress → Fix Released
Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote (last edit ):

bionic debdiff not needed as we will not be releasing sos for bionic unless there is a specific ubuntu pro customer request.

Changed in sosreport (Ubuntu Bionic):
status: New → Won't Fix
Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

Note - The fix for https://bugs.launchpad.net/ubuntu/+source/sosreport/+bug/2024547 has been built on top of 4.5.4 upstream for this release. The patch is named d/p/0002-regex-flags.patch, pasted below for reference,

Description: Fix do_file_private_sub() bug related to regex flags
Origin: upstream
Bug: https://github.com/sosreport/sos/issues/3261
Applied-Upstream: https://github.com/sosreport/sos/pull/3263
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: sos-4.5.4/sos/report/plugins/__init__.py
===================================================================
--- sos-4.5.4.orig/sos/report/plugins/__init__.py
+++ sos-4.5.4/sos/report/plugins/__init__.py
@@ -1274,7 +1274,12 @@ class Plugin():
         """
         try:
             path = self._get_dest_for_srcpath(srcpath)
- pattern = regexp.pattern if hasattr(regexp, "pattern") else regexp
+ if hasattr(regexp, "pattern"):
+ pattern = regexp.pattern
+ flags = regexp.flags | re.IGNORECASE
+ else:
+ pattern = regexp
+ flags = re.IGNORECASE
             self._log_debug("substituting scrpath '%s'" % srcpath)
             self._log_debug("substituting '%s' for '%s' in '%s'"
                             % (subst, pattern, path))
@@ -1284,8 +1289,8 @@ class Plugin():
             content = readable.read()
             if not isinstance(content, str):
                 content = content.decode('utf8', 'ignore')
- result, replacements = re.subn(regexp, subst, content,
- flags=re.IGNORECASE)
+ result, replacements = re.subn(pattern, subst, content,
+ flags=flags)
             if replacements:
                 self.archive.add_string(result, srcpath)
             else:

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

focal debdiff

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

kinetic debdiff

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

jammy debdiff

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

lunar debdiff

tags: added: se se-sponsor-dgadomski
Changed in sosreport (Ubuntu Bionic):
status: Won't Fix → Invalid
Revision history for this message
David Negreira (dnegreira) wrote :

I have done a test on a focal/ussuri openstack cloud with ceph and all the expected logs were gathered and no errors were found on any of the sosreports/plugins.

Revision history for this message
David Negreira (dnegreira) wrote :

I have done a test on a jammy/yoga openstack cloud with ceph and all the expected logs were gathered and no errors were found on any of the sosreports/plugins

Revision history for this message
David Negreira (dnegreira) wrote :

I have done a test on a kinetic/zed openstack cloud with ceph and all the expected logs were gathered and no errors were found on any of the sosreports/plugins

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello nikhil, or anyone else affected,

Accepted sosreport into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.5.4ubuntu0.23.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-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. 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 Lunar):
status: New → Fix Committed
tags: added: verification-needed verification-needed-lunar
Changed in sosreport (Ubuntu Kinetic):
status: New → Fix Committed
tags: added: verification-needed-kinetic
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello nikhil, or anyone else affected,

Accepted sosreport into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.5.4ubuntu0.22.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-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. 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 Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello nikhil, or anyone else affected,

Accepted sosreport into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sosreport/4.5.4ubuntu0.22.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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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 Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello nikhil, 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.5.4ubuntu0.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.

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

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

sosreport/4.5.4ubuntu0.20.04.1 (amd64, ppc64el, s390x)

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
nikhil kshirsagar (nkshirsagar) wrote (last edit ):

The autopkgtest failures on focal are expected, and not an issue.

422s Summary
422s
422s failures true time 3 Size 0.00MiB List plugins
422s failures true time 3 Size 0.00MiB List presets
422s failures true time 2 Size 0.00MiB List profiles
422s failures true time 3 Size 11.69KiB --no-report --label TEST -o hardware
422s failures true time 11 Size 3.15MiB --log-size 0 --no-env-vars -z gzip
422s failures true time 29 Size 2.31MiB --mask
422s
422s Tests Failed: 9
422s Failures within each test:
422s
422s run_expecting_success: test generated stderr output, see above
422s run_expecting_success: test generated stderr output, see above
422s run_expecting_success: test generated stderr output, see above
422s run_expecting_success: test generated stderr output, see above
422s run_expecting_success: test generated stderr output, see above
422s run_expecting_success: test generated stderr output, see above
422s run_expecting_success: test generated stderr output, see above
422s run_expecting_success: test generated stderr output, see above
422s run_expecting_success: test generated stderr output, see above

As an example,

343s !!! TEST FAILED: test generated stderr output, see above !!!
343s ### start stderr
343s
343s WARNING: Failed to load 'magic' module version >= 0.4.20 which sos aims
343s to use for detecting binary files. A less effective method will be used.
343s It is recommended to install proper python3-magic package with the
343s module.
343s
343s ### end stderr

These failures are expected, and are a result of https://github.com/sosreport/sos/pull/3025 which makes python3-magic optional. On focal we do not have the required python3-magic version, so we default back to the older way of detecting binaries in sosreport. Unfortunately this then spews that message on stderr.

Even though we have

Restrictions: needs-root, allow-stderr, isolation-machine

in the d/tests/control file, the tests fail because the test returns 1 when it sees stderr output.

The simple.sh file which has the sosreport tests has the following code,

run_expecting_success () {
    #$1 - is command options
    #$2 - kind of check to do, so far only extract
    FAIL=false

   <snip>

    if [ -s /dev/shm/stderr ]; then
       add_failure "test generated stderr output, see above"
       echo "### start stderr"
       cat /dev/shm/stderr
       echo "### end stderr"
    fi

The add_failure then does

add_failure () {
    FAIL=true <--
    echo "!!! TEST FAILED: $1 !!!"
    FAIL_LIST="${FAIL_LIST}\n \t ${FUNCNAME[1]}: \t\t ${1}"
}

So the test returns 1 not the expected 0,

    if $FAIL; then
      NUMOFFAILURES=$(($NUMOFFAILURES + 1))
      return 1 <---
    else
      return 0
    fi

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

I have tested the proposed packages on lxc vms for focal, jammy, kinetic and lunar - testing details are at https://pastebin.canonical.com/p/CcZfX2MRd9/

Revision history for this message
Arif Ali (arif-ali) wrote :

Initial basic testing done https://paste.ubuntu.com/p/yfQwpX855w/

will check openstack + juju + cert + juju collect bits next

Revision history for this message
Arif Ali (arif-ali) wrote :

* focal openstack, ac checked a few units, and looks good
* juju cert issue is now resolved
* juju collect works as expected for the juju transport

Revision history for this message
David Negreira (dnegreira) wrote :

Did some testing on an OpenStack cloud deployed with Juju and with Focal/Ussuri https://pastebin.ubuntu.com/p/9VKmv8Nvgw/

No errors were detected and all the logs were gathered as expected.

Revision history for this message
David Negreira (dnegreira) wrote :

Did some testing on an OpenStack cloud deployed with Juju and with Jammy/Yoga https://pastebin.ubuntu.com/p/2nVVcxK9vJ/

No errors were detected and all the logs were gathered as expected.

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

Tested with jammy - openstack env - https://pastebin.canonical.com/p/8qS82ydKjq/

All logs were gathered as expected.

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote (last edit ):

I have run into an issue while testing lunar proposed packages in openstack environments. - https://pastebin.canonical.com/p/9mtmM8WJYk/

https://github.com/sosreport/sos/issues/3301 opened upstream for this issue.

I do not think its a good idea to push lunar to updates.

The other releases seem fine, though we still need to test well for Kinetic.

We will verify Kinetic and then mark the verification flags accordingly for all the releases.

tags: added: verification-done-focal verification-done-jammy verification-failed-lunar
removed: verification-needed-focal verification-needed-jammy verification-needed-lunar
Changed in sosreport (Ubuntu Lunar):
assignee: nobody → nikhil kshirsagar (nkshirsagar)
Changed in sosreport (Ubuntu Kinetic):
assignee: nobody → nikhil kshirsagar (nkshirsagar)
Changed in sosreport (Ubuntu Jammy):
assignee: nobody → nikhil kshirsagar (nkshirsagar)
Changed in sosreport (Ubuntu Focal):
assignee: nobody → nikhil kshirsagar (nkshirsagar)
Changed in sosreport (Ubuntu Mantic):
assignee: nobody → nikhil kshirsagar (nkshirsagar)
Changed in sosreport (Ubuntu Bionic):
assignee: nobody → nikhil kshirsagar (nkshirsagar)
Revision history for this message
David Negreira (dnegreira) wrote :

Did some testing on an OpenStack cloud deployed with Kinetic/Zed https://pastebin.ubuntu.com/p/KDdMtSmnMx/ .

All logs were gathered as expected.

tags: added: verification-done verification-done-kinetic
removed: verification-needed verification-needed-kinetic
Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

Testing of the proposed packages completed, and flags have been changed to verification-done-* for focal, jammy and kinetic.

Lunar is marked verification-failed-lunar due to https://github.com/sosreport/sos/issues/3301

Revision history for this message
nikhil kshirsagar (nkshirsagar) wrote :

Unfortunately, since lunar cannot be released due to https://github.com/sosreport/sos/issues/3301, according to "latest first" policy, we cannot SRU this release into focal/jammy/kinetic either. I have marked wontfix for all the stable releases, and we will work on releasing debs for sos 4.5.6 when it releases upstream.

Changed in sosreport (Ubuntu Focal):
status: Fix Committed → Won't Fix
Changed in sosreport (Ubuntu Jammy):
status: Fix Committed → Won't Fix
Changed in sosreport (Ubuntu Kinetic):
status: Fix Committed → Won't Fix
Changed in sosreport (Ubuntu Lunar):
status: Fix Committed → Won't Fix
tags: added: verification-failed verification-failed-focal verification-failed-jammy verification-failed-kinetic
removed: verification-done verification-done-focal verification-done-jammy verification-done-kinetic
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Proposed package removed from archive

The version of sosreport in the proposed pocket of Kinetic that was purported to fix this bug report has been removed because one or more bugs that were to be fixed by the upload have failed verification and been in this state for more than 10 days.

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.