[Orca-dev] Re: orcallator needing to be root (was Re[2]: orca-ing data already in a database? (fwd))

Blair Zajac blair at orcaware.com
Wed Oct 3 17:31:21 PDT 2001


Try running the following program as root and and non-root (this is from the
USERS.MANUAL):

  main()
  {
    printf("MAX_DISK = %d\n", MAX_DISK);
    printf("MAX_IF   = %d\n", MAX_IF);
    printf("MAX_CPU  = %d\n", MAX_CPU);
    printf("MAX_INTS = %d\n", MAX_INTS);
  }

What are the values?

I'm guessing that its picking the wrong sizes.  Since it's probably faster
to let se find these values when it is root, let's patch start_orcallator
to define these values when the uid is not root.

It would also be great if we could get rid of this message:

Warning: Cannot init kvm: Permission denied

Are you running this with -DWATCH_OS?  I've seen the script break when it
can't open a network device (forgot which one).

Best,
Blair

Rusty Carruth wrote:
> 
> I sent this to Blair privately - and he said I might just as well
> send it to the group, so here it is!
> 
> Since I'm now sorta developing on orca, I suppose I should switch this
> discussion to the developers list - I just joined there also and am
> sending this there as well.  Unless informed otherwise, I'll move all
> my discussions about this over to -devel*.
> 
> Anyway:
> 
> Basically, I want to make orcallator work without having to be root.
> 
> Blair Zajac <blair at orcaware.com> wrote:
> > Rusty Carruth wrote:
> > ...
> > > > would be too hard to figure out.  You'll probably add #ifdef 0 #endif
> around
> > > > pieces of code until it doesn't complain.
> > >
> > > Hmm.  Why didn't *I* think of that?  (excuse - because this performance
> > > logging
> > > is a side project ;-)
> > >
> > > I assume you'd like the patches when I'm done?
> >
> > Of course :)
> 
> Now, THIS is strange.  The only reason it won't run as root is because,
> on my Sun 2.5.1 machine, the number of disk devices is wrong.
> 
> Here's the output without my patch:
> 
> Writing data into /export/home/orca/var/orca/orcallator/msfree/
> Starting logging
> Warning: Cannot init kvm: Permission denied
> Fatal: subscript: 2 out of range for: GLOBAL_disk_info
> 
> Now, with my patch:
> 
> Writing data into /export/home/orca/var/orca/orcallator/msfree/
> Starting logging
> Warning: Cannot init kvm: Permission denied
> adding raw disk.  short name: dad0
> adding raw disk.  short name: atapicd2
> adding raw disk.  short name: fd0
> raw disk count is 3, changed to 2
> I is now 0
> I is now 1
> adding raw disk.  short name: fd0
> raw disk count is 3, changed to 2
> I is now 0
> I is now 1
> 
> Other than the junky output, I've simply subtracted one from
> the number of raw disk devices in raw_disk_map!  And it seems to be working.
> 
> I'm going to go over to machines in the other building (about 700 miles
> away!)
> and try them out to see if I can figure out if there are any other
> bad devices...
> 
> > > (And of course it will be fixed so that it uses effective uid to
> > > choose to do those things or not, and not a #ifdef 0! ;-)
> >
> > I would think you would want to patch orcallator/start_orcallator.sh.in
> > and either define or undef a CPP define that would be set to either
> > UID_IS_ROOT=
> >
> > or
> >
> > UID_IS_ROOT=-DUID_IS_ROOT
> >
> > and then pass to se as:
> >
> > se $UID_IS_ROOT orcallator.se
> 
> hmm.  You'd rather not autodetect this?  (ASSUMING that its not going to be
> something that has to be hand-tweaked!)
> 
> rc
> 
> <<  End forwarded message
> 
>                    Yahoo! Groups Sponsor
>                           [Image]
> 
> 



More information about the Orca-dev mailing list