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

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Mon May 14 07:07:26 PDT 2007


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.

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

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

Do you agree? Should I issue a patch?

-- Yevgeny



More information about the general mailing list