Bug 1354348

Summary: ipa trustconfig-show throws internal error.
Product: Red Hat Enterprise Linux 7 Reporter: Sudhir Menon <sumenon>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED ERRATA QA Contact: Kaleem <ksiddiqu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: jcholast, pvoborni, rcritten
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ipa-4.4.0-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:57:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sudhir Menon 2016-07-11 07:40:21 UTC
Description of problem: ipa trustconfig-show throws internal error.

Version-Release number of selected component (if applicable):
ipa-server-trust-ad-4.4.0-1.el7.x86_64
ipa-server-4.4.0-1.el7.x86_64

How reproducible: Always

Steps to Reproduce:
1. Install ipa-server
2. run ipa-adtrust-install
3. run ipa trustconfig-show 
4. Check the message displayed on the console.

Actual results:
[root@server ~]# ipa trustconfig-show
ipa: ERROR: non-public: TypeError: trustconfig_show.validate_output():
  output['value']: need (<type 'NoneType'>,); got <type 'unicode'>: u'ad'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 137, in execute
    result = self.Command[_name](*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 447, in __call__
    return self.__do_call(*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 486, in __do_call
    self.validate_output(ret, options['version'])
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 993, in validate_output
    nice, o.name, o.type, type(value), value)
TypeError: trustconfig_show.validate_output():
  output['value']: need (<type 'NoneType'>,); got <type 'unicode'>: u'ad'
ipa: ERROR: an internal error has occurred


Expected results:
Proper error message should be displayed.

Additional info:

Comment 3 Sudhir Menon 2016-07-12 13:25:43 UTC
[root@server log]# ipa trustconfig-mod --fallback-primary-group=admins
Although the changes are made but the console error should be fixed.

ipa: ERROR: non-public: TypeError: trustconfig_mod.validate_output():
output['value']: need (<type 'NoneType'>,); got <type 'unicode'>: u'ad'
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 137, in execute
result = self.Command[_name](*args, **options)
File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 447, in __call__
return self.__do_call(*args, **options)
File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 486, in __do_call
self.validate_output(ret, options['version'])
File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 993, in validate_output
nice, o.name, o.type, type(value), value)
TypeError: trustconfig_mod.validate_output():
output['value']: need (<type 'NoneType'>,); got <type 'unicode'>: u'ad'
ipa: ERROR: an internal error has occurred

Comment 4 Petr Vobornik 2016-07-12 15:51:12 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/6061

Comment 5 Jan Cholasta 2016-07-20 11:54:36 UTC
Fixed upstream
master:
https://fedorahosted.org/freeipa/changeset/f0a61546f552d4df887617167f7dc1378cb95083

Comment 7 Sudhir Menon 2016-07-25 13:20:12 UTC
Fix is seen. Verified using ipa-server-trust-ad-4.4.0-3.el7.x86_64

[root@vm92 httpd]# ipa trustconfig-show
  Domain: ipa73.test
  Security Identifier: S-1-5-21-2868430366-4073917800-1504180849
  NetBIOS name: IPA73
  Domain GUID: 9ca0f689-a1eb-40bf-b4e8-f52b5558ca4b
  Fallback primary group: Default SMB Group
  IPA AD trust agents: vm92.ipa73.test
  IPA AD trust controllers: vm92.ipa73.test

[root@vm92 httpd]# ipa trustconfig-show --all
  dn: cn=ipa73.test,cn=ad,cn=etc,dc=ipa73,dc=test
  Domain: ipa73.test
  Security Identifier: S-1-5-21-2868430366-4073917800-1504180849
  NetBIOS name: IPA73
  Domain GUID: 9ca0f689-a1eb-40bf-b4e8-f52b5558ca4b
  Fallback primary group: Default SMB Group
  IPA AD trust agents: vm92.ipa73.test
  IPA AD trust controllers: vm92.ipa73.test
  objectclass: nsContainer, top, ipaNTDomainAttrs

[root@vm92 httpd]# ipa trustconfig-show --all --raw
  dn: cn=ipa73.test,cn=ad,cn=etc,dc=ipa73,dc=test
  cn: ipa73.test
  ipantsecurityidentifier: S-1-5-21-2868430366-4073917800-1504180849
  ipantflatname: IPA73
  ipantdomainguid: 9ca0f689-a1eb-40bf-b4e8-f52b5558ca4b
  ipantfallbackprimarygroup: cn=Default SMB Group,cn=groups,cn=accounts,dc=ipa73,dc=test
  objectClass: nsContainer
  objectClass: ipaNTDomainAttrs
  objectClass: top

[root@vm92 httpd]# ipa trustconfig-mod --fallback-primary-group=admins
---------------------------------
Modified "ad" trust configuration
---------------------------------
  Domain: ipa73.test
  Security Identifier: S-1-5-21-2868430366-4073917800-1504180849
  NetBIOS name: IPA73
  Domain GUID: 9ca0f689-a1eb-40bf-b4e8-f52b5558ca4b
  Fallback primary group: admins
  IPA AD trust agents: vm92.ipa73.test
  IPA AD trust controllers: vm92.ipa73.test

[root@vm92 httpd]# ipa trustconfig-show --type=ad
  Domain: ipa73.test
  Security Identifier: S-1-5-21-2868430366-4073917800-1504180849
  NetBIOS name: IPA73
  Domain GUID: 9ca0f689-a1eb-40bf-b4e8-f52b5558ca4b
  Fallback primary group: admins
  IPA AD trust agents: vm92.ipa73.test
  IPA AD trust controllers: vm92.ipa73.test

[root@vm92 httpd]# ipa trustconfig-show --rights
  Domain: ipa73.test
  Security Identifier: S-1-5-21-2868430366-4073917800-1504180849
  NetBIOS name: IPA73
  Domain GUID: 9ca0f689-a1eb-40bf-b4e8-f52b5558ca4b
  Fallback primary group: admins
  IPA AD trust agents: vm92.ipa73.test
  IPA AD trust controllers: vm92.ipa73.test

[root@vm92 httpd]# ipa trustconfig-show --rights --all --raw
  dn: cn=ipa73.test,cn=ad,cn=etc,dc=ipa73,dc=test
  cn: ipa73.test
  ipantsecurityidentifier: S-1-5-21-2868430366-4073917800-1504180849
  ipantflatname: IPA73
  ipantdomainguid: 9ca0f689-a1eb-40bf-b4e8-f52b5558ca4b
  ipantfallbackprimarygroup: cn=admins,cn=groups,cn=accounts,dc=ipa73,dc=test
  attributelevelrights: {u'cn': u'rscwo', u'objectclass': u'rscwo', u'aci': u'rscwo', u'ipantdomainguid': u'rscwo', u'ipantflatname': u'rscwo', u'ipantfallbackprimarygroup': u'rscwo', u'ipantsecurityidentifier': u'rscwo', u'nsaccountlock': u'rscwo'}
  objectClass: nsContainer
  objectClass: ipaNTDomainAttrs
  objectClass: top

Comment 9 errata-xmlrpc 2016-11-04 05:57:05 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, 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://rhn.redhat.com/errata/RHBA-2016-2404.html