[Freeipa-devel] Re: [PATCH] Add automount plugin port to new LDAP backend.
Rob Crittenden
rcritten at redhat.com
Thu Jun 18 19:38:30 UTC 2009
Pavel Zůna wrote:
> Rob Crittenden wrote:
>> Pavel Zuna wrote:
>>> Patch 0013: Add automount plugin port to new LDAP backend.
>>>
>>> Pavel
>>
>> There are some problems with this port from the old mechanism.
>>
>> I'm ok with renaming the functions I suppose, we'll have to see
>> through usage which one is better.
> Renaming was necessary, because Method to Object association is created
> according to plugin names. If we want an -add method for the
> automountkey object, its name has to start with 'automountkey'.
>
>> But it doesn't seem to actually be working. automount2-tofiles doesn't
>> work at all and automount2-create-indirect doesn't create the maps
>> properly.
> Yeah, looks like I didn't understand correctly how automount entries are
> organized in LDAP.
>
>> I was originally a little worried that when deleting a map you were
>> removing the connection to the parent in the pre callback but it looks
>> like the keys aren't being removed either. I think the parent
>> connection should be removed after the entry is removed.
>>
>> Can you take another look?
>>
>> rob
> I did an updated version. I also renamed the -create methods to -add,
> but forgot about -delete before making the commit. I will rename those
> later, the plugin name had to stay suffixed with 2 for now anyway.
>
> Pavel
>
Ok, better but not quite there yet. There is a typo in a variable name:
--- a/ipalib/plugins/automount2.py
+++ b/ipalib/plugins/automount2.py
@@ -302,7 +302,7 @@ class automount2_tofiles(Command):
automountmapname=info
)
if keys_tmp:
- keys[info] += keys_tmps
+ keys[info] += keys_tmp
return (maps, keys)
I can add an indirect map now and show maps the way they would look in
files but it seems to show the maps multiple times, at least auto.master:
$ ./ipa automount2-tofiles
/etc/auto.master:
/- /etc/auto.direct
/stuf /etc/auto.master
/things /etc/auto.things
---------------------------
/etc/auto.direct:
---------------------------
/etc/auto.master:
/- auto.direct
/stuf auto.master
/things auto.things
---------------------------
/etc/auto.things:
/somewhere rw
Also, automuntkey2-delete seems broken. I ran it and let it hang for a
couple of minutes, not seeming to do anything. The DS logs have a lot of
repeated searches:
[18/Jun/2009:15:38:09 -0400] conn=951 op=180016 SRCH
base="automountkey=/place2,automountmapname=auto.stuff,cn=automount,dc=example,dc=com"
scope=1 filter="(objectClass=*)" attrs=""
[18/Jun/2009:15:38:09 -0400] conn=951 op=180016 RESULT err=0 tag=101
nentries=0 etime=0 notes=U
[18/Jun/2009:15:38:09 -0400] conn=951 op=180017 SRCH
base="automountkey=/place2,automountmapname=auto.stuff,cn=automount,dc=example,dc=com"
scope=1 filter="(objectClass=*)" attrs=""
[18/Jun/2009:15:38:09 -0400] conn=951 op=180017 RESULT err=0 tag=101
nentries=0 etime=0 notes=U
[18/Jun/2009:15:38:09 -0400] conn=951 op=180018 SRCH
base="automountkey=/place2,automountmapname=auto.stuff,cn=automount,dc=example,dc=com"
scope=1 filter="(objectClass=*)" attrs=""
rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090618/1dd79324/attachment.bin>
More information about the Freeipa-devel
mailing list