Automounter to dump maps
Hi Ian / all,
Is there any way to make automounter dump maps it sees? I was just thinking about it - with files / NIS / program backend it is not much needed but it could be quite helpful with ldap backend - restarting automounter with verbose logging is not too practical in the production environment.
I would imagine either some small standalone program using autofs internals which would dump all (or certain specified) maps or running a second instance of autofs (with some parameter) which would not mount anything and just dump the maps and exits.
Is this a completely misplaced idea or is there a way to achieve this functionality now?
Many thanks,
Ondrej
Quoted 8 lines · Ondrej Valousek
Hi Ian / all,
Is there any way to make automounter dump maps it sees? I was just thinking about it - with files / NIS / program backend it is not much needed but it could be quite helpful with ldap backend - restarting automounter with verbose logging is not too practical in the production environment.
Quoted 7 lines
I would imagine either some small standalone program using autofs internals which would dump all (or certain specified) maps or running a second instance of autofs (with some parameter) which would not mount anything and just dump the maps and exits.
Is this a completely misplaced idea or is there a way to achieve this functionality now?
Well, back in the autofs4 days, when way too much logic was put into the init script, we basically had to do this. ;-) See the --dumpmap switch in v4. I can see that it could be a useful aid for administrators to ensure that their maps look like they think they do, especially with nsswitch and included maps, and those pesky null maps.
Cheers,
Jeff
Ian Kent
maintainerQuoted 7 lines · Ondrej Valousek
Hi Ian / all,
Is there any way to make automounter dump maps it sees? I was just thinking about it - with files / NIS / program backend it is not much needed but it could be quite helpful with ldap backend - restarting automounter with verbose logging is not too practical in the production environment.
No, there isn't but you don't need to restart autofs to change the log level. You can do that for the running deamon by:
automount --set-log-priority debug <master map mount point path>
and set it back to no logging (or another lower level) by:
automount --set-log-priority info <master map mount point path>
Quoted 5 lines
I would imagine either some small standalone program using autofs internals which would dump all (or certain specified) maps or running a second instance of autofs (with some parameter) which would not mount anything and just dump the maps and exits.
Not sure but we would probably do something similar to the log level changing method above.
Quoted 3 lines
Is this a completely misplaced idea or is there a way to achieve this functionality now?
It's not a bad idea but I wonder how useful it really is since what is really useful in trying to sort out problems is the debug log output.
Quoted 8 lines
Many thanks,
Ondrej_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Ian Kent
maintainerQuoted 15 lines · Jeff Moyer
Quoted 13 lines · Ondrej Valousek
Hi Ian / all,
Is there any way to make automounter dump maps it sees? I was just thinking about it - with files / NIS / program backend it is not much needed but it could be quite helpful with ldap backend - restarting automounter with verbose logging is not too practical in the production environment.
I would imagine either some small standalone program using autofs internals which would dump all (or certain specified) maps or running a second instance of autofs (with some parameter) which would not mount anything and just dump the maps and exits.
Quoted 8 lines
Quoted 2 lines
Is this a completely misplaced idea or is there a way to achieve this functionality now?
Well, back in the autofs4 days, when way too much logic was put into the init script, we basically had to do this. ;-) See the --dumpmap switch in v4. I can see that it could be a useful aid for administrators to ensure that their maps look like they think they do, especially with nsswitch and included maps, and those pesky null maps.
Well, there you go.
This sounds like a +1 in favour to me.
Ian
Quoted 5 lines
It's not a bad idea but I wonder how useful it really is since what is really useful in trying to sort out problems is the debug log output.
I agree. This was meant to be good for situations where you know that autofs works fine but say you have multiple ldap servers autofs can connect to and you are unsure whether all are properly synchronized. This way you can make sure that automounter sees the "proper" data immediately without having to read through the detailed debug log. Even with a single ldap server it is often annoying to parse the debug log just to make sure the data is correct.
Quoted 9 lines
Quoted 5 lines
Well, back in the autofs4 days, when way too much logic was put into the
init script, we basically had to do this. ;-) See the --dumpmap switch
in v4. I can see that it could be a useful aid for administrators to ensure that their maps look like they think they do, especially with nsswitch and included maps, and those pesky null maps.Well, there you go.
This sounds like a +1 in favour to me.
So can I hope something like the --dumpmap switch will be implemented even in v5? :-)
Many thanks,
Ondrej
Ian Kent
maintainerQuoted 22 lines · Ondrej Valousek
Quoted 5 lines
It's not a bad idea but I wonder how useful it really is since what is really useful in trying to sort out problems is the debug log output.
I agree. This was meant to be good for situations where you know that autofs works fine but say you have multiple ldap servers autofs can connect to and you are unsure whether all are properly synchronized. This way you can make sure that automounter sees the "proper" data immediately without having to read through the detailed debug log. Even with a single ldap server it is often annoying to parse the debug log just to make sure the data is correct.
Quoted 7 lines
Quoted 1 line
Well, back in the autofs4 days, when way too much logic was put into
the
Quoted 1 line
init script, we basically had to do this. ;-) See the --dumpmap
switch
Quoted 3 lines
in v4. I can see that it could be a useful aid for administrators to ensure that their maps look like they think they do, especially with nsswitch and included maps, and those pesky null maps.
Quoted 7 lines
Quoted 2 lines
Well, there you go.
This sounds like a +1 in favour to me.So can I hope something like the --dumpmap switch will be implemented even in v5? :-)
Maybe but this is a lot harder to do in v5.
Maybe I will look at writing a separate utility but that isn't straight forward either. Not sure yet.
Ian
Created a RFE in the Redhat bugzilla for this one - hope you do not mind :-) Ondrej
Quoted 7 lines
Maybe but this is a lot harder to do in v5.
Maybe I will look at writing a separate utility but that isn't straight forward either. Not sure yet.Ian
Ian Kent
maintainerQuoted 2 lines · Ondrej Valousek
Created a RFE in the Redhat bugzilla for this one - hope you do not mind :-)
No, that's the right thing to do.
I'm still thinking about how to do it, while working on other things. It's a bit hard actually.
Quoted 9 lines
Ondrej
Quoted 7 lines
Maybe but this is a lot harder to do in v5.
Maybe I will look at writing a separate utility but that isn't straight forward either. Not sure yet.Ian
Quoted 6 lines
No, that's the right thing to do.
I'm still thinking about how to do it, while working on other things. It's a bit hard actually.
I think I understand - automounter is demand driven right? So that means that only those indirect maps being used are looked for and loaded. Direct maps is an exception to this - these are always loaded. Anyway - hope you'll eventually find some elegant solution - I appreciate this.....
Ondrej
Ian Kent
maintainerQuoted 7 lines · Ondrej Valousek
Quoted 6 lines
No, that's the right thing to do.
I'm still thinking about how to do it, while working on other things. It's a bit hard actually.
Quoted 5 lines
I think I understand - automounter is demand driven right? So that means that only those indirect maps being used are looked for and loaded. Direct maps is an exception to this - these are always loaded. Anyway - hope you'll eventually find some elegant solution - I appreciate this.....
It's a bit more than that, it's the code structure as well. Something that Jeff has complained about before. Anyway, hopefully I'll come up with something.
Ian
Hi Ian,
I have some free time now so I was thinking about trying to write something on my own here. Have you already started or can I just pick the latest source rpm for RHEL?
Thanks,
Ondrej
P.S.
Just a matter of interest - why are you using double linked list for master map? Isn't a dynamic array better? Love dynamic arrays :-)
Quoted 22 lines · Ian Kent
Quoted 6 lines · Ondrej Valousek
Quoted 6 lines
No, that's the right thing to do.
I'm still thinking about how to do it, while working on other things. It's a bit hard actually.Quoted 6 lines
I think I understand - automounter is demand driven right? So that means that only those indirect maps being used are looked for and loaded. Direct maps is an exception to this - these are always loaded. Anyway - hope you'll eventually find some elegant solution - I appreciate this.....
It's a bit more than that, it's the code structure as well. Something that Jeff has complained about before. Anyway, hopefully I'll come up with something.
Ian