All of lore.kernel.org
 help / color / mirror / Atom feed
* Automounter to dump maps
@ 2009-11-12 13:21 Ondrej Valousek
  2009-11-12 13:43 ` Jeff Moyer
  2009-11-12 14:52 ` Ian Kent
  0 siblings, 2 replies; 11+ messages in thread
From: Ondrej Valousek @ 2009-11-12 13:21 UTC (permalink / raw)
  To: autofs

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-12 13:21 Automounter to dump maps Ondrej Valousek
@ 2009-11-12 13:43 ` Jeff Moyer
  2009-11-12 14:58   ` Ian Kent
  2009-11-12 14:52 ` Ian Kent
  1 sibling, 1 reply; 11+ messages in thread
From: Jeff Moyer @ 2009-11-12 13:43 UTC (permalink / raw)
  To: Ondrej Valousek; +Cc: autofs

Ondrej Valousek <webserv@s3group.cz> writes:

> 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?

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-12 13:21 Automounter to dump maps Ondrej Valousek
  2009-11-12 13:43 ` Jeff Moyer
@ 2009-11-12 14:52 ` Ian Kent
  2009-11-12 17:08   ` Ondrej Valousek
  1 sibling, 1 reply; 11+ messages in thread
From: Ian Kent @ 2009-11-12 14:52 UTC (permalink / raw)
  To: Ondrej Valousek; +Cc: autofs

Ondrej Valousek wrote:
> 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>

> 
> 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.

> 
> 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.

> 
> Many thanks,
> Ondrej
> 
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-12 13:43 ` Jeff Moyer
@ 2009-11-12 14:58   ` Ian Kent
  0 siblings, 0 replies; 11+ messages in thread
From: Ian Kent @ 2009-11-12 14:58 UTC (permalink / raw)
  To: Jeff Moyer; +Cc: autofs

Jeff Moyer wrote:
> Ondrej Valousek <webserv@s3group.cz> writes:
> 
>> 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?
> 
> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-12 14:52 ` Ian Kent
@ 2009-11-12 17:08   ` Ondrej Valousek
  2009-11-17  7:55     ` Ian Kent
  0 siblings, 1 reply; 11+ messages in thread
From: Ondrej Valousek @ 2009-11-12 17:08 UTC (permalink / raw)
  To: autofs


> 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.

> > 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-12 17:08   ` Ondrej Valousek
@ 2009-11-17  7:55     ` Ian Kent
  2009-11-18 13:56       ` Ondrej Valousek
  0 siblings, 1 reply; 11+ messages in thread
From: Ian Kent @ 2009-11-17  7:55 UTC (permalink / raw)
  To: Ondrej Valousek; +Cc: autofs

Ondrej Valousek wrote:
> 
>> 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.
> 
>> > 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? :-)

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-17  7:55     ` Ian Kent
@ 2009-11-18 13:56       ` Ondrej Valousek
  2009-11-18 14:12         ` Ian Kent
  0 siblings, 1 reply; 11+ messages in thread
From: Ondrej Valousek @ 2009-11-18 13:56 UTC (permalink / raw)
  To: Ian Kent; +Cc: autofs

Created a RFE in the Redhat bugzilla for this one - hope you do not mind :-)
Ondrej
> 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
>
>   

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-18 13:56       ` Ondrej Valousek
@ 2009-11-18 14:12         ` Ian Kent
  2009-11-18 14:31           ` Ondrej Valousek
  0 siblings, 1 reply; 11+ messages in thread
From: Ian Kent @ 2009-11-18 14:12 UTC (permalink / raw)
  To: Ondrej Valousek; +Cc: autofs

Ondrej Valousek wrote:
> 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.

> Ondrej
>> 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
>>
>>   
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-18 14:12         ` Ian Kent
@ 2009-11-18 14:31           ` Ondrej Valousek
  2009-11-18 14:41             ` Ian Kent
  0 siblings, 1 reply; 11+ messages in thread
From: Ondrej Valousek @ 2009-11-18 14:31 UTC (permalink / raw)
  To: Ian Kent; +Cc: autofs


> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-18 14:31           ` Ondrej Valousek
@ 2009-11-18 14:41             ` Ian Kent
  2010-01-12  9:18               ` Ondrej Valousek
  0 siblings, 1 reply; 11+ messages in thread
From: Ian Kent @ 2009-11-18 14:41 UTC (permalink / raw)
  To: Ondrej Valousek; +Cc: autofs

Ondrej Valousek wrote:
> 
>> 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.....

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Automounter to dump maps
  2009-11-18 14:41             ` Ian Kent
@ 2010-01-12  9:18               ` Ondrej Valousek
  0 siblings, 0 replies; 11+ messages in thread
From: Ondrej Valousek @ 2010-01-12  9:18 UTC (permalink / raw)
  To: Ian Kent; +Cc: autofs

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 :-)

Ian Kent wrote:
> Ondrej Valousek wrote:
>   
>>> 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.....
>>     
>
> 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
>
>   

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-01-12  9:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-12 13:21 Automounter to dump maps Ondrej Valousek
2009-11-12 13:43 ` Jeff Moyer
2009-11-12 14:58   ` Ian Kent
2009-11-12 14:52 ` Ian Kent
2009-11-12 17:08   ` Ondrej Valousek
2009-11-17  7:55     ` Ian Kent
2009-11-18 13:56       ` Ondrej Valousek
2009-11-18 14:12         ` Ian Kent
2009-11-18 14:31           ` Ondrej Valousek
2009-11-18 14:41             ` Ian Kent
2010-01-12  9:18               ` Ondrej Valousek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.