RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1800564 - `sssd.api.conf` and `sssd.api.d` should belong to `python-sssdconfig` package
Summary: `sssd.api.conf` and `sssd.api.d` should belong to `python-sssdconfig` package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.8
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Alexey Tikhonov
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-07 12:35 UTC by Florence Blanc-Renaud
Modified: 2020-09-29 19:50 UTC (History)
10 users (show)

Fixed In Version: sssd-1.16.5-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:50:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 1038 0 None closed `sssd.api.conf` and `sssd.api.d` should belong to `python-sssdconfig` package 2021-02-16 16:22:46 UTC
Red Hat Product Errata RHBA-2020:3904 0 None None None 2020-09-29 19:50:24 UTC

Description Florence Blanc-Renaud 2020-02-07 12:35:02 UTC
Description of problem:
python-sssd package should have a weak dependency on sssd-config because the call to SSSDConfig() requires the file /usr/share/sssd/sssd.conf.api to be present, and this file is provided by sssd-common.

Version-Release number of selected component (if applicable):
sssd-1.16.4-35.el7.x86_64

How reproducible:
always

Steps to Reproduce:

freeipa tests are using SSSDConfig() python API to  modify sssd.conf from another node.
On host A (=the test controller), only python-sssd package is installed. On host B (=freeipa master), sssd is configured (with python-sssd, sssd-common, sssd-client).
The host A is copying sssd.conf from host B, then locally uses SSSDConfig() to modify the conf and later copies the modified sssd.conf file to host B.

The following error happens when host A calls SSSDConfig():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pytest_ipa/integration/tasks.py:741: in modify_sssd_conf
    sssd_config = SSSDConfig()
../SSSDConfig/__init__.py:1424: in __init__
    self.schema = SSSDConfigSchema(schemafile, schemaplugindir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <SSSDConfig.SSSDConfigSchema object at 0x7f3fc57a9ed0>
schemafile = '/usr/share/sssd/sssd.api.conf'
schemaplugindir = '/usr/share/sssd/sssd.api.d'

    def __init__(self, schemafile, schemaplugindir):
        SSSDChangeConf.__init__(self)
        #TODO: get these from a global setting
        if not schemafile:
            schemafile = '/usr/share/sssd/sssd.api.conf'
        if not schemaplugindir:
            schemaplugindir = '/usr/share/sssd/sssd.api.d'
    
        try:
            # Read the primary config file
>           with open(schemafile, 'r') as fd:
E           IOError: [Errno 2] No such file or directory: '/usr/share/sssd/sssd.api.conf'

schemafile = '/usr/share/sssd/sssd.api.conf'
schemaplugindir = '/usr/share/sssd/sssd.api.d'
self       = <SSSDConfig.SSSDConfigSchema object at 0x7f3fc57a9ed0>

../SSSDConfig/__init__.py:508: IOError


Actual results:
IOError when calling SSSDConfig() if the package sssd-common is not installed.

Expected results:
No IOError.

Comment 2 Lukas Slebodnik 2020-02-07 13:46:30 UTC
rhel7 does not work well with weak dependencies and adding required dependency is wrong.

Comment 3 Lukas Slebodnik 2020-02-07 13:51:44 UTC
> On host A (=the test controller), only python-sssd package is installed. On host B (=freeipa master)

Florence that approach is fragile.

You might have different version of sssd installed on host A and host B.
An schema for sssd on host A might be different than on host B.

e.g.
host A (controller is rhel8) and host B (is rhel6)

Schema validation might pass on new version but it might fail on old version.
So the best would be:
* to copy schema files together with sssd.con from (host B) to controller.
* do not pass default schema on controller (if it is not possible than it should be)
* do magic
* copy sssd.conf from controller to host B

Comment 5 Alexey Tikhonov 2020-04-29 12:56:32 UTC
(In reply to Florence Blanc-Renaud from comment #0)
> Description of problem:
> python-sssd package should have a weak dependency on sssd-config because the


I'm a little bit confused:
 - "python-sssd" package doesn't exist (there is "python-sss")
 - title says "on sssd-common", but description says "on sssd-config" (and "sssd-config" doesn't exist, there is "python-sssdconfig")
 - to be able to call `SSSDConfig()` in python code one needs "python-sssdconfig" package, not "python-sss"

(Sorry for all those nitpicks, this is partially to make things clear for myself)


1) Do I understand correctly that the request is to add "sssd-common" as a dependency of "python-sssdconfig"?
2) Do I understand correctly the same applies to rhel8?

Comment 6 Alexey Tikhonov 2020-04-29 15:23:24 UTC
I think it is better to move 'sssd.api.*' to "python-sssdconfig" instead of making dependency.

Upstream PR: https://github.com/SSSD/sssd/pull/1039

Comment 8 Florence Blanc-Renaud 2020-05-04 12:38:06 UTC
Hi Alexey,

you are right, the package that is providing SSSDConfig is python-sssdconfig and not python-sssd. Your proposal in #c6 looks good to me.

Comment 9 Alexey Tikhonov 2020-05-07 13:00:33 UTC
  * master
        5379fdd - SPEC: 'sssd.api.*' should belong python-sssdconfig
  * sssd-1-16
        0ecc498 - SPEC: 'sssd.api.*' should belong python-sssdconfig

Comment 14 Niranjan Mallapadi Raghavender 2020-06-10 08:59:18 UTC
Version:
sssd-common-pac-1.16.4-21.el7_7.1.x86_64
sssd-krb5-1.16.4-21.el7_7.1.x86_64
sssd-kcm-1.16.4-21.el7_7.1.x86_64
python-sssdconfig-1.16.4-21.el7_7.1.noarch
sssd-client-1.16.4-21.el7_7.1.x86_64
sssd-krb5-common-1.16.4-21.el7_7.1.x86_64
sssd-ad-1.16.4-21.el7_7.1.x86_64
sssd-ldap-1.16.4-21.el7_7.1.x86_64
sssd-proxy-1.16.4-21.el7_7.1.x86_64
sssd-dbus-1.16.4-21.el7_7.1.x86_64
sssd-1.16.4-21.el7_7.1.x86_64
sssd-common-1.16.4-21.el7_7.1.x86_64
sssd-ipa-1.16.4-21.el7_7.1.x86_64
sssd-tools-1.16.4-21.el7_7.1.x86_64
sssd-winbind-idmap-1.16.4-21.el7_7.1.x86_64


[root@cloud-qe-09 ~]# rpm -qf /usr/share/sssd/sssd.api.conf
sssd-common-1.16.4-21.el7_7.1.x86_64


On fixed version:

[root@auto-hv-02-guest02 ~]# rpm -qf /usr/share/sssd/sssd.api.conf
python-sssdconfig-1.16.5-8.el7.noarch

Removes sssd-common package 

[root@auto-hv-02-guest02 ~]# rpm -qa | grep sssd
python-sssdconfig-1.16.5-8.el7.noarch
sssd-client-1.16.5-8.el7.x86_64


[root@auto-hv-02-guest02 ~]# cat a.py
from SSSDConfig import SSSDConfig
sssd_config = SSSDConfig()
print(type(sssd_config))


[root@auto-hv-02-guest02 ~]# python a.py 
<class 'SSSDConfig.SSSDConfig'>

Comment 16 errata-xmlrpc 2020-09-29 19:50:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (sssd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3904


Note You need to log in before you can comment on or make changes to this bug.