Giter Site home page Giter Site logo

Comments (11)

richm avatar richm commented on August 17, 2024 1

The problem was that the package was missing when running the role. When I manually installed it is was available in Fedora repo. So we probably need to add it to the packages list to install no?

Ok, but that is a workaround, not a fix. The fix is to identify the package that depends on it, and update the Requires in the rpm spec for that package, so that libselinux-python is properly pulled in.

from logging.

nhosoi avatar nhosoi commented on August 17, 2024

Regarding 1:
I already had libselinux-python on my test host, which is needed by multiple packages [1]. I forced to remove libselinux-python, then I could reproduce the problem. If I add libselinux-python in rsyslog__base_packages as in [2], we won't run into the failure. But I have an impression there could be more appropriate package(s) to be there which would install all the necessary packages including 'libselinux-python'... Do you have any good idea for such candidates? For instance, libselinux-python has these direct dependencies in my test env... [3]

# rpm -q libselinux-python
libselinux-python-2.5-14.1.el7.x86_64

[1]

# rpm -e libselinux-python
error: Failed dependencies:
    libselinux-python is needed by (installed) openshift-ansible-3.9.1-1.git.0.f99af1f.el7.centos.noarch
    libselinux-python is needed by (installed) python-slip-0.4.0-4.el7.noarch
    libselinux-python >= 2.1.5-1 is needed by (installed) setroubleshoot-server-3.2.29-3.el7.x86_64
    libselinux-python is needed by (installed) anaconda-core-21.48.22.134-1.el7.centos.x86_64
    libselinux-python is needed by (installed) policycoreutils-python-2.5-29.el7.x86_64

[2]

# diff --git a/roles/rsyslog/defaults/main.yaml b/roles/rsyslog/defaults/main.yaml
index c91694e..fcbefed 100644
--- a/roles/rsyslog/defaults/main.yaml
+++ b/roles/rsyslog/defaults/main.yaml
@@ -61,7 +61,7 @@ rsyslog__message_reduction: False
 # .. envvar:: rsyslog__base_packages
 #
 # List of default rpm packages to install.
-rsyslog__base_packages: [ 'rsyslog' ]
+rsyslog__base_packages: [ 'rsyslog', 'libselinux-python' ]
 
 # .. envvar:: rsyslog__logging_packages
 #

[3]

# rpm -e libselinux-python
error: Failed dependencies:
    libselinux-python is needed by (installed) openshift-ansible-3.9.1-1.git.0.f99af1f.el7.centos.noarch
    libselinux-python is needed by (installed) python-slip-0.4.0-4.el7.noarch
    libselinux-python is needed by (installed) anaconda-core-21.48.22.134-1.el7.centos.x86_64
    libselinux-python is needed by (installed) policycoreutils-python-2.5-29.el7.x86_64
    libselinux-python >= 2.1.5-1 is needed by (installed) setroubleshoot-server-3.2.30-3.el7.x86_64

from logging.

nhosoi avatar nhosoi commented on August 17, 2024

@sradco, could you take a look at #20 ?
Thanks!

from logging.

sradco avatar sradco commented on August 17, 2024

Regarding 1:
I already had libselinux-python on my test host, which is needed by multiple packages [1]. I forced to remove libselinux-python, then I could reproduce the problem. If I add libselinux-python in rsyslog__base_packages as in [2], we won't run into the failure. But I have an impression there could be more appropriate package(s) to be there which would install all the necessary packages including 'libselinux-python'... Do you have any good idea for such candidates? For instance, libselinux-python has these direct dependencies in my test env... [3]

# rpm -q libselinux-python
libselinux-python-2.5-14.1.el7.x86_64

[1]

# rpm -e libselinux-python
error: Failed dependencies:
    libselinux-python is needed by (installed) openshift-ansible-3.9.1-1.git.0.f99af1f.el7.centos.noarch
    libselinux-python is needed by (installed) python-slip-0.4.0-4.el7.noarch
    libselinux-python >= 2.1.5-1 is needed by (installed) setroubleshoot-server-3.2.29-3.el7.x86_64
    libselinux-python is needed by (installed) anaconda-core-21.48.22.134-1.el7.centos.x86_64
    libselinux-python is needed by (installed) policycoreutils-python-2.5-29.el7.x86_64

[2]

# diff --git a/roles/rsyslog/defaults/main.yaml b/roles/rsyslog/defaults/main.yaml
index c91694e..fcbefed 100644
--- a/roles/rsyslog/defaults/main.yaml
+++ b/roles/rsyslog/defaults/main.yaml
@@ -61,7 +61,7 @@ rsyslog__message_reduction: False
 # .. envvar:: rsyslog__base_packages
 #
 # List of default rpm packages to install.
-rsyslog__base_packages: [ 'rsyslog' ]
+rsyslog__base_packages: [ 'rsyslog', 'libselinux-python' ]
 
 # .. envvar:: rsyslog__logging_packages
 #

[3]

# rpm -e libselinux-python
error: Failed dependencies:
    libselinux-python is needed by (installed) openshift-ansible-3.9.1-1.git.0.f99af1f.el7.centos.noarch
    libselinux-python is needed by (installed) python-slip-0.4.0-4.el7.noarch
    libselinux-python is needed by (installed) anaconda-core-21.48.22.134-1.el7.centos.x86_64
    libselinux-python is needed by (installed) policycoreutils-python-2.5-29.el7.x86_64
    libselinux-python >= 2.1.5-1 is needed by (installed) setroubleshoot-server-3.2.30-3.el7.x86_64

In Fedora the Fedora-28_updates repo includes this package , but we dont install it anywhere in the code ... I only needed to do yum install libselinux-python to get it.

@nhosoi

from logging.

richm avatar richm commented on August 17, 2024

I don't understand what the problem is. We don't have any direct dependencies on libselinux-python. If anything, it is a dependency of ansible, the selinux module perhaps. A bug should be opened against Fedora 28 ansible or maybe ansible-selinux if there is a separate package for the selinux functionality in ansible.

from logging.

sradco avatar sradco commented on August 17, 2024

The problem was that the package was missing when running the role. When I manually installed it is was available in Fedora repo. So we probably need to add it to the packages list to install no?
@richm

from logging.

nhosoi avatar nhosoi commented on August 17, 2024

Ok, but that is a workaround, not a fix.

Let me confirm...
ToDo: We should revert this patch and find out the package which requires libselinux-python, then file a bug against the package. Correct?

commit a6c10abb26c2146bc1cebec4cc99734c96db63e6
    Adding 'libselinux-python' to rsyslog__base_packages to avoid the installation
    failure due to the missing package.  But still not clear this is the right
    package to be in the list.

from logging.

richm avatar richm commented on August 17, 2024

ToDo: We should revert this patch and find out the package which requires libselinux-python, then file a bug against the package. Correct?

Correct, although we may have to leave the libselinux-python in the list until we can fix the problem with the package.

from logging.

nhosoi avatar nhosoi commented on August 17, 2024

@richm ,
Sadly, it's already done in bz and it was closed with NOTABUG... :(
https://bugzilla.redhat.com/show_bug.cgi?id=1505083#c3
(and we could find lots of "issues" in the ansible github...)
For us, it'd be safer to have it in rsyslog_base_packages...?

from logging.

richm avatar richm commented on August 17, 2024

I don't understand the reasoning in the bz, but ok - let's just add the package in rsyslog_base_packages

from logging.

nhosoi avatar nhosoi commented on August 17, 2024

@sradco, can we consider this "issue" was solved in pr/#20?

from logging.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.