I gone through the attached PR document,
Please, Can you update the PR doc specifically for minor version.

>Points can be added in PR doc-
* If Initialize with other than supported minor version [current supported 
minor version{0,1,2,3}] api should return "SA_AIS_ERR_VERSION"


---

** [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 09:23 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 opensaf-tickets@lists.sourceforge.net 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
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to