[Freeipa-devel] [PATCH] 178+179 Add missing managing hosts filtering options

Martin Kosek mkosek at redhat.com
Thu Jan 26 12:48:47 UTC 2012


On Thu, 2012-01-26 at 00:07 -0600, Endi Sukma Dewata wrote:
> On 12/13/2011 8:13 AM, Martin Kosek wrote:
> >>>> Host object has a virtual attribute "managing" containing all hosts
> >>>> it manages (governed by managedBy attribute). This patch also adds
> >>>> standard membership filtering options:
> >>>> --man-hosts=HOSTS: Only hosts managing _all_ HOSTS are returned
> >>>> --not-man-hosts=HOSTS: Only hosts which do not manage _any_ host
> >>>> in HOSTS are returned
> >>>>
> >>>> https://fedorahosted.org/freeipa/ticket/1675
> >>>
> >>> ACK, it works for me. I'll update the UI to use the new option.
> >>
> >> I take that back. It's NACK.
> >> Patch #178 causes the dnszone-find --forward-only to return the reverse
> >> zone.
> >
> > Good catch, thanks. Fixed.
> 
> Sorry for the delay. I applied 178-2 and rebased 179-2 into 179-3 (patch 
> attached). It works except for one issue, when the host has no 
> managedby, calling host-find with either of these options will generate 
> an internal error.
> 
> # ipa host-add test.example.com --force
> -----------------------------
> Added host "test.example.com"
> -----------------------------
>    Host name: test.example.com
>    Principal name: host/test.example.com at EXAMPLE.COM
>    Password: False
>    Keytab: False
>    Managed by: test.example.com
> 
> # ipa host-remove-managedby test.example.com --hosts=test.example.com
>    Host name: test.example.com
>    Principal name: host/test.example.com at EXAMPLE.COM
> ---------------------------
> Number of members removed 1
> ---------------------------
> 
> # ipa host-find --man-hosts=test.example.com
> ipa: ERROR: an internal error has occurred
> 
> The above command should have returned no hosts.
> 
> # ipa host-find --not-man-hosts=test.example.com
> ipa: ERROR: an internal error has occurred
> 
> The above command should have returned all hosts.
> 

Thanks for the review Endi and a good catch. I rebased the patches and
fixed this issue.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkosek-178-2-fix-ldap2-combine_filters.patch
Type: text/x-patch
Size: 3623 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120126/294d83f6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkosek-179-3-add-missing-managing-hosts-filtering-options.patch
Type: text/x-patch
Size: 10982 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120126/294d83f6/attachment-0001.bin>


More information about the Freeipa-devel mailing list