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

Install sosreport package #868

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vaishnavibhat
Copy link
Contributor

Install the required packages for collecting sosreport

Copy link
Collaborator

@abdhaleegit abdhaleegit left a comment

Choose a reason for hiding this comment

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

Better way is to just add the sos package in this line

lpm_pkg_list = ["src", "rsct.core", "rsct.core.utils", "rsct.basic", "rsct.opt.storagerm", "DynamicRM", "stress-ng"]

@vaishnavibhat
Copy link
Contributor Author

vaishnavibhat commented Oct 9, 2024

Better way is to just add the sos package in this line

lpm_pkg_list = ["src", "rsct.core", "rsct.core.utils", "rsct.basic", "rsct.opt.storagerm", "DynamicRM", "stress-ng"]

Hi Abdul,
If the distro does not have sos package, won't this lead to test ERROR ?

        for pkg in lpm_pkg_list:
            pkg_status = self.cv_HOST.host_check_pkg_installed(self.oslevel, pkg)
            if not pkg_status:
                pkg_found = False
                pkg_notfound.append(pkg)

        if pkg_found:
            return True
        raise OpTestError("Install the required packages : %s" % pkg_notfound) 

@abdhaleegit
Copy link
Collaborator

Better way is to just add the sos package in this line

lpm_pkg_list = ["src", "rsct.core", "rsct.core.utils", "rsct.basic", "rsct.opt.storagerm", "DynamicRM", "stress-ng"]

Hi Abdul, If the distro does not have sos package, won't this lead to test ERROR ?

        for pkg in lpm_pkg_list:
            pkg_status = self.cv_HOST.host_check_pkg_installed(self.oslevel, pkg)
            if not pkg_status:
                pkg_found = False
                pkg_notfound.append(pkg)

        if pkg_found:
            return True
        raise OpTestError("Install the required packages : %s" % pkg_notfound) 

yes always better to fail early and it is user responsibility to set the repo and make sure all packages are available with repo.. and make sure we differentiate rhel and suse package

@abdhaleegit
Copy link
Collaborator

so you need to handle sos and support both commands

Install the required packages for collecting sosreport

Signed-off-by: Vaishnavi Bhat <vaishnavi@linux.vnet.ibm.com>
@@ -138,7 +138,7 @@ def check_pkg_installation(self):
pkg_found = True
pkg_notfound = []
self.oslevel = self.cv_HOST.host_get_OS_Level()
lpm_pkg_list = ["src", "rsct.core", "rsct.core.utils", "rsct.basic", "rsct.opt.storagerm", "DynamicRM", "stress-ng"]
lpm_pkg_list = ["src", "rsct.core", "rsct.core.utils", "rsct.basic", "rsct.opt.storagerm", "DynamicRM", "stress-ng", "sos", "supportutils"]
for pkg in lpm_pkg_list:
pkg_status = self.cv_HOST.host_check_pkg_installed(self.oslevel, pkg)
Copy link
Collaborator

Choose a reason for hiding this comment

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

pkg_status will fail if sos package is not in SUSE OS.. and support in RHEL OS.. so we need to take care explicitly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants