Bug 1399133

Summary: Delete option shouldn't be available for hosts applied to view.
Product: Red Hat Enterprise Linux 7 Reporter: Sudhir Menon <sumenon>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED ERRATA QA Contact: Varun Mylaraiah <mvarun>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: mvarun, pvoborni, pvomacka, rcritten
Target Milestone: rc   
Target Release: 7.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.5.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 09:42:02 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-11-28 11:05:44 UTC
Description of problem: Delete option shouldn't be available for hosts applied to view.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Install IPA server
2. Create a view, override local ipa user and add to the view.
3. Apply the view to the host.
4. Now login to UI and navigate to IPA Server --> ID Views --> Select View --> Hosts Tab --> Select Host checkbox to which view is applied.

Actual results:
There is delete button which is activated and when we try to delete the host it gives the below message

Are you sure you want to delete selected entries?
client.testqe.test

Click Delete.

IPA Error 905: CommandError
unknown command 'idview_remove_member'

http_error_log
[Mon Nov 28 16:34:18.954799 2016] [:error] [pid 14146] ipa: INFO: [jsonserver_session] admin: idview_remove_member: CommandError

Expected results:
Fix the error message.


Additional info:

Comment 3 Petr Vobornik 2016-12-02 19:24:01 UTC
ID views are not on RHEL 6, is the version really correct?

But I see some JavaScript error when navigating to the host tab of ID views on RHEL 7.3 and upstream.

Pavel, could you look at it?

Comment 4 Pavel Vomacka 2016-12-05 16:37:17 UTC
The Javascript error is present but not related to the issue. 

Anyway on the Hosts tabs are extra Add and Delete buttons on RHEL 7. But I was not able to reproduce this bug on current upstream master, there these buttons are not present.

Comment 5 Petr Vobornik 2016-12-09 16:52:53 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/6546

Comment 7 Petr Vobornik 2016-12-12 17:39:32 UTC
Impact of the bug: there is "delete" and "add" button displayed incorrectly on IPA Server --> ID Views --> Select View --> Hosts Tab

Neither of them should be there. After testing RHEL 7.3, the other interface buttons on the page actually works as expected.

So it is not that critical as I originally thought.

Comment 9 Sudhir Menon 2017-05-26 09:51:53 UTC
Below error is no more displayed on the UI when host is selected and delete button is clicked. 

"IPA Error 905: CommandError unknown command 'idview_remove_member'" error is no more seen.

Tested on RHEL7.4 using
ipa-server-4.5.0-13.el7.x86_64
krb5-server-1.15.1-8.el7.x86_64
pki-server-10.4.1-6.el7.noarch
389-ds-base-1.3.6.1-15.el7.x86_64
sssd-1.15.2-35.el7.x86_64
selinux-policy-3.13.1-152.el7.noarch

[Fri May 26 05:49:31.765439 2017] [:error] [pid 12153] ipa: INFO: [jsonserver_session] admin: host_remove_managedby(u'client.testrelm.test', all=True, version=u'2.224', host=(u'client.testrelm.test',)): SUCCESS

Comment 10 errata-xmlrpc 2017-08-01 09:42:02 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:2304