Bug 1430674

Summary: batch param compatibility is incorrect
Product: Red Hat Enterprise Linux 7 Reporter: Jaroslav Reznik <jreznik>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: urgent Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: urgent    
Version: 7.3CC: ipa-maint, jcholast, jreznik, ksiddiqu, ndehadra, pvoborni, rcritten, tscherf
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.4.0-14.el7_3.7 Doc Type: Bug Fix
Doc Text:
Previously, the batch API command definition used an incorrect data type, which prevented compatibility with previous Identity Management (IdM) versions. Consequently, all batch command calls failed on Red Hat Enterprise Linux (RHEL) 7.3 clients when they were connected to an IdM server running on RHEL 7.2 or an earlier version. This patch fixes the problem, and IdM clients now work as expected in the mentioned scenario.
Story Points: ---
Clone Of: 1428472 Environment:
Last Closed: 2017-04-12 12:37:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1428472    
Bug Blocks:    

Description Jaroslav Reznik 2017-03-09 09:38:31 UTC
This bug has been copied from bug #1428472 and has been proposed
to be backported to 7.3 z-stream (EUS).

Comment 3 Petr Vobornik 2017-03-10 09:30:40 UTC
master:
    19060db1b8fa9d1d3e8f3ac3fcd1f387e9a39c94 compat: fix Any params in batch and dnsrecord

Comment 9 Nikhil Dehadrai 2017-03-17 09:46:11 UTC
IPA server version:  ipa-server-4.4.0-14.el7_3.7

Verified the bug on the basis of following step:

[root@ipaserver73 ~]# rpm -q ipa-server
ipa-server-4.4.0-14.el7_3.7.x86_64

[root@ipaserver73 ~]# ipa host-show test.example.com
ipa: ERROR: test.example.com: host not found


[root@ipaserver73 ~]# cat test_batch.py 
from ipalib import api
from ipalib import errors

api.bootstrap(context='cli')
api.finalize()
api.Backend.rpcclient.connect()

batch = [{u'params': [(u'test.example.com',), {u'force': u'True'}], u'method': u'host_add'}]

res = api.Command.batch(batch)

[root@ipaserver73 ~]# python test_batch.py 

[root@ipaserver73 ~]# ipa host-show test.example.com
  Host name: test.example.com
  Principal name: host/test.example.com
  Principal alias: host/test.example.com
  Password: False
  Keytab: False
  Managed by: test.example.com

Thus on the basis of above steps, marking the status of bug to "VERIFIED"

Comment 10 Jan Cholasta 2017-03-20 07:12:59 UTC
Nikhil, this needs to be tested against a pre-4.4 IPA server, otherwise the relevant code path is not executed.

Moving back to ON_QA.

Comment 11 Nikhil Dehadrai 2017-03-21 09:30:36 UTC
IPA server version:  ipa-server-4.4.0-14.el7_3.7

Verified the bug on the basis of following steps performed on IPA-server setup on pre4.4 version and IPA-client on latest version:

IPA-Master:
======================
[root@auto-hv-01-guest10 ~]# ### THIS is IPA-Server
[root@auto-hv-01-guest10 ~]# rpm -q ipa-server
ipa-server-4.2.0-15.el7_2.19.x86_64
[root@auto-hv-01-guest10 ~]# ipa host-show test.example.com
ipa: ERROR: test.example.com: host not found
[root@auto-hv-01-guest10 ~]# hostname
auto-hv-01-guest10.testrelm.test
[root@auto-hv-01-guest10 ~]# ipactl status
Directory Service: RUNNING
krb5kdc Service: RUNNING
kadmin Service: RUNNING
named Service: RUNNING
ipa_memcached Service: RUNNING
httpd Service: RUNNING
pki-tomcatd Service: RUNNING
ipa-otpd Service: RUNNING
ipa-dnskeysyncd Service: RUNNING
ipa: INFO: The ipactl command was successful
[root@auto-hv-01-guest10 ~]#
 
 
IPA-Client:
=====================
[root@auto-hv-01-guest04 ~]# rpm -q ipa-server
ipa-server-4.4.0-14.el7_3.7.x86_64
[root@auto-hv-01-guest04 ~]# ipactl status
IPA is not configured (see man pages of ipa-server-install for help)
[root@auto-hv-01-guest04 ~]# kinit admin
Password for admin:
[root@auto-hv-01-guest04 ~]# hostname
auto-hv-01-guest04.testrelm.test
[root@auto-hv-01-guest04 ~]# ipa host-show test.example.com
ipa: ERROR: test.example.com: host not found
[root@auto-hv-01-guest04 ~]# cat test_batch.py
from ipalib import api
from ipalib import errors
 
api.bootstrap(context='cli')
api.finalize()
api.Backend.rpcclient.connect()
 
batch = [{u'params': [(u'test.example.com',), {u'force': u'True'}], u'method': u'host_add'}]
 
res = api.Command.batch(batch)
[root@auto-hv-01-guest04 ~]# python test_batch.py
[root@auto-hv-01-guest04 ~]# ipa host-show test.example.com
  Host name: test.example.com
  Principal name: host/test.example.com
  Password: False
  Keytab: False
  Managed by: test.example.com
[root@auto-hv-01-guest04 ~]#

Thus on the basis of above steps, marking the status of bug to "VERIFIED"

Comment 17 errata-xmlrpc 2017-04-12 12:37:46 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://access.redhat.com/errata/RHBA-2017:0925