Yes, it is correct that the Log AIS says that minor version is ignored and 
should be set to 0x00. This means that to use minor version is in some sense 
NBC but only if you try to set a minor version that is not relevant e.g. 100 as 
in your test case. It is still possible to use version 0x00 and 0x01 as before 
and this should be considered backwards compatible enough since the benefits of 
being able to use minor version is very beneficial. Also note that minor 
version is specified in another way if you look at the Description part of the 
“Initialize” section 3.5.1 in the Log AIS.

Today it’s a problem to report back to the client the correct highest supported 
version because sending this information from the server to the agent is not 
supported by the current version of the protocol between the agent and the 
server and it cannot be added since minor version handling does not work/is 
used. This means that correct information cannot be given to the client since 
there is no information about the highest version supported by the log server. 
In this release minor version checking is implemented in the server meaning 
that if a minor version higher than 0x03 is give a version error is returned to 
the agent. The agent will then set the version[out] to minor version 0x03 and 
return version error to the client.

I strongly recommend that we keep the now implemented behavior and do not 
follow strictly the paragraph saying that minor version shall be ignored.

For more information, see also the updated Log PR document that is currently on 
review, ticket [#2200] (document attached)



Attachments:

- 
[OpenSAF_LOGSv_PR.odt](https://sourceforge.net/p/opensaf/tickets/_discuss/thread/9bf9e8f9/6b97/attachment/OpenSAF_LOGSv_PR.odt)
 (121.1 kB; application/vnd.oasis.opendocument.text)


---

** [tickets:#2336] logsv saLogInitialize() returns SA_AIS_ERR_VERSION for 
invalid minor version**

**Status:** unassigned
**Milestone:** 5.2.RC1
**Created:** Fri Mar 03, 2017 04:35 AM UTC by Ritu Raj
**Last Updated:** Fri Mar 03, 2017 04:35 AM UTC
**Owner:** nobody


#Environment details
OS : Suse 64bit
Changeset : 8634( 5.2.FC)

#Summary
logsv saLogInitialize() returns SA_AIS_ERR_VERSION if values of minor_version 
is other than [0,1,2,3]

#Steps
1. saLogInitialize() with version [A.2.100]
    got return value SA_AIS_ERR_VERSION
---------------------
In case if user provide unsupported minor version it should set highest value 
of the minor version that this implementation can support for the required 
value of releaseCode and the returned value of majorVersion

As per spec "SAI-AIS-LOG-A.02.01" section "3.5.1":
"version - [in/out] As an input parameter, version is a pointer to a structure 
containing
the required Log Service version. In this case, minorVersion is ignored and 
should be
set to 0x00"

If the preceding condition cannot be met, SA_AIS_ERR_VERSION is returned, and
the structure pointed to by the version parameter is set to:
if (implementation supports the required releaseCode)
releaseCode = required releaseCode
else {
if (implementation supports releaseCode higher than the required
releaseCode)
releaseCode = the lowest value of the supported release codes that is
higher than the required releaseCode
else
releaseCode = the highest value of the supported release codes that is
lower than the required releaseCode
}

In following lines I can see some changes:
>> src/log/agent/lga_api.c 

~~~
static bool is_log_version_valid(const SaVersionT *ver) {
        bool rc = false;
        if ((ver->releaseCode == LOG_RELEASE_CODE) &&
            (ver->majorVersion <= LOG_MAJOR_VERSION) &&
            (ver->majorVersion > 0) &&
            (ver->minorVersion <= LOG_MINOR_VERSION)) {
                rc = true;
        }
        return rc;
}
....
....
TRACE("version FAILED, required: %c.%u.%u, supported: %c.%u.%u\n",
                      version->releaseCode, version->majorVersion, 
version->minorVersion,
                      LOG_RELEASE_CODE, LOG_MAJOR_VERSION, LOG_MINOR_VERSION);
                version->releaseCode = LOG_RELEASE_CODE;
                version->majorVersion = LOG_MAJOR_VERSION;
                version->minorVersion = LOG_MINOR_VERSION;
                ais_rc = SA_AIS_ERR_VERSION;
                goto done
~~~

#####Below is the snippet of agent traces::
Mar  2 23:14:00.124164 lga [27362:src/log/agent/lga_api.c:0175] >> 
saLogInitialize
Mar  2 23:14:00.124193 lga [27362:src/log/agent/lga_api.c:0199] TR version 
FAILED, required: A.2.100, supported: A.2.3
Mar  2 23:14:00.124201 lga [27362:src/log/agent/lga_api.c:0322] << 
saLogInitialize: client_id = 0
Mar  2 23:14:00.144561 lga [27406:src/imm/agent/imma_om_api.cc:0165] >> 
saImmOmInitialize
Mar  2 23:14:00.144588 lga [27406:src/imm/agent/imma_om_api.cc:0191] TR OM 
client version A.2.17



---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to