[ofa-general] Re: Error message in OSM log when cached op file doesn't exist

Hal Rosenstock halr at voltaire.com
Mon May 14 07:21:53 PDT 2007


Hi Yevgeny,

On Mon, 2007-05-14 at 10:07, Yevgeny Kliteynik wrote:
> Hi Hal.
> 
> [snip]
> > Date:   03/30/2007 12:24:12 AM
> > OpenSM: Handle conf file open failures better
> >     
> > diff --git a/osm/opensm/osm_subnet.c b/osm/opensm/osm_subnet.c
> > index 46315a5..746fbd1 100644
> > --- a/osm/opensm/osm_subnet.c
> > +++ b/osm/opensm/osm_subnet.c
> > @@ -732,7 +732,7 @@ subn_dump_qos_options(
> >  
> >  /**********************************************************************
> >   **********************************************************************/
> > -void
> > +ib_api_status_t
> >  osm_subn_rescan_conf_file(
> >    IN osm_subn_opt_t* const p_opts )
> >  {
> > @@ -751,7 +751,7 @@ osm_subn_rescan_conf_file(
> >    
> >    opts_file = fopen(file_name, "r");
> >    if (!opts_file)
> > -    return;
> > +    return IB_ERROR;
> [/snip]
> 
> This patch was applied a month and a half ago (master).
> It handles opening cached options file, and prints error messages
> when OSM failed opening such file.
> 
> I actually don't like this thing, because now every time you run
> OpenSM on the machine that doesn't have any cached options file
> (which is usually the case) you get an error message.

Perhaps error is too severe as one can run just fine without this file
and there is no requirement to have it. Should it be some other type of
message instead ?

> There's no point checking whether the file exists, because osm runs
> as root, and if it fails opening this file, it means that the file
> doesn't exist or is inaccessible (broken mount, etc).

That's the most common use case (running OpenSM as root, but not the
only one).

> In any case, user gets info in stdout whether or now OpenSM is using
> cached options file.

Is there always a message in the log as well indicating this ?

-- Hal

> Do you agree? Should I issue a patch?
> 
> -- Yevgeny




More information about the general mailing list