summary |
shortlog | log |
commit |
commitdiff |
review |
tree
first ⋅ prev ⋅ next
Petri Ovaska [Thu, 15 Apr 2021 08:08:13 +0000 (11:08 +0300)]
Multiple DBAAS Redis Sentinel groups
Added support to have one or more Redis Sentinel DB groups. The DB groups can
be used to spread out SDL DB operations to different DB instances. The new
DBAAS_CLUSTER_ADDR_LIST environment variable is used for Sentinel DB service
addresses configuration. The selection of DB instance is done based on the
calculation of crc32 value from the namespace string and return modulo hash
value of number of addresses in the list.
Issue-ID: RIC-699
Change-Id: I8bb3a78680cedfba4a39f06f7e2f8cdd60d26949
Signed-off-by: Petri Ovaska <petri.ovaska@nokia.com>
Petri Ovaska [Thu, 15 Apr 2021 05:22:56 +0000 (08:22 +0300)]
New namespace (--ns) option in sdltool test-get-set -command
Added a new '--ns' option to change namespace string in
sdltool test-get-set -command:
--ns arg (=sdltoolns) namespace to use
Issue-ID: RIC-699
Change-Id: I4c36ead029c78b488dc32003c285e18ae92534d6
Signed-off-by: Petri Ovaska <petri.ovaska@nokia.com>
Timo Tietavainen [Tue, 16 Jun 2020 16:57:49 +0000 (19:57 +0300)]
Rephrase release notes introduction
Remove release name from introduction section to make it
unaltered for release changes.
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I14e4df712efbf189726f65908fe2dd6669f98bbc
Timo Tietavainen [Thu, 21 May 2020 08:27:40 +0000 (11:27 +0300)]
Rename ci Docker file
SDL Continuous Integration (ci) tests are not anymore run on a docker
but instead directly on the Jenkins minion (virtual machine). That's
why remove unnecessary ci directory with its docker files and move the
files to docker_test directory. Docker can be used for local testing
purposes.
Change-Id: Iac527243927c925b35a03fcbaef36972bafa4488
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Timo Tietavainen [Sat, 16 May 2020 16:45:23 +0000 (19:45 +0300)]
Rename rpm and Debian makefile targets
Current makefile targets build_rpm and build_deb are not well named
targets. Rename targets to rpm-pkg and deb-pkg.
Also update CI Dockerfile to utilize rpm-pkg and deb-pkg makefile
targets.
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: Ib8509e5d19abbef8c1199d1f42c0edbddbbc3728
Timo Tietavainen [Fri, 15 May 2020 17:28:58 +0000 (20:28 +0300)]
Increment version number
Version number was forgot to increment in previous commit,
increment it now to 1.1.2.
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I9847e9e95b2a414365ad2d0d22327734e6a9aeb1
Timo Tietavainen [Fri, 15 May 2020 08:10:54 +0000 (11:10 +0300)]
Add rpm and Debian makefile targets
Add configuration options to enable rpm or Debian package building and
to specify the output directory where to create package files:
configure --with-rpm-dir=DIR
configure --with-deb-dir=DIR
Add makefile targets to build rpm and Debian packages:
make build_rpm
make build_deb
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: If40ee4b0a78e2b77e6980103a0b1f94dcb76db6d
Timo Tietavainen [Mon, 11 May 2020 08:48:39 +0000 (11:48 +0300)]
Add unit test code coverage (gcov) make target
Add autotool configure option to enable coverage analysis
and to specify location of coverage result (*.gcov) files:
configure --with-gcov-report-dir=DIR
Add a new make target to run unit test and collect code coverage
analysis reports (*.gcov):
make test_gcov
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I40edf53ad4abe599a86e963326b338d27f3c002f
Timo Tietavainen [Thu, 9 Jan 2020 05:53:15 +0000 (07:53 +0200)]
Add public helper classes for UT mocking
Helper classes provide simple implementation for SDL public
APIs. These classes can be used in SDL clients as base
classes for SDL API mock implementations instead of deriving
mock implementations from pure virtual API classes. This way
mock implementations do not need to be changed every time
SDL APIs change (if the change does not affect UT cases).
Fixed also broken Doxygen include path and macro expansion.
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: Idf62b1397b049b4f56b8ed90c57b53ed615cd67c
Timo Tietavainen [Fri, 20 Dec 2019 08:52:49 +0000 (10:52 +0200)]
Add SDL developer and user guides
Add the first versions of SDL Developer and User guides, which will
be published on the ORAN SC documentation page (under RIC project):
https://docs.o-ran-sc.org.
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: Ic23568b44a1560ba59a5466aef2993f95d723894
Rolf Badorek [Thu, 5 Dec 2019 09:41:23 +0000 (11:41 +0200)]
Update PackageCloud.io release file
Updated release file to trigger new LF Jenkins release jobs once.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: I0529d610d45b5a162951081a7169e6f33881b0e6
Rolf Badorek [Thu, 28 Nov 2019 12:44:18 +0000 (14:44 +0200)]
Add PackageCloud.io release file
Version 1.0.4-1 will be released for RIC Amber release.
Packages, which will be now released, were pushed to staging area
by this Jenkins job execution:
https://jenkins.o-ran-sc.org/job/ric-plt-sdl-docker-ci-pc-merge-master/5/
Package releasing instructions for reference:
https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/jjb/lf-release-jobs.html#packagecloud-release-files
Additionally, improved README.md file instructions based on received
feedback.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: Ibc3cda11d127e877b5a97c83c377139e91f2a013
Timo Tietavainen [Thu, 28 Nov 2019 07:55:22 +0000 (09:55 +0200)]
Add extra line about src files are part of RIC platform project
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: Idf0de8c3b3c8133847f14d0d0b1b38a68fcb2c67
Timo Tietavainen [Thu, 14 Nov 2019 10:18:14 +0000 (12:18 +0200)]
Fix copyright statement of SDL documentation
Nokia has a copyright for the source code located under riv-plt/sdl
repository of the ORAN SC Linux Foundation. Updated SDL documentation
and package.sh script copyright statement to be in line with source
code copyright statement.
Removed also one trailing white space character at the end of
the line of the release-notes document.
Change-Id: I14da95f916c3e64b8d0f1c5c7a48001ceafbed0d
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Rolf Badorek [Tue, 12 Nov 2019 16:19:37 +0000 (18:19 +0200)]
Add PackageCloud.io publishing to CI scripts
CI build scripts updated to publish SDL packages in PackageCloud.io
RPM and Debian packages are available currently.
Changed base image, because eariler one did have Boost libraries built
from source. Debian package building tools will see Boost as missing
dependency if not installed via apt.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: Id5409489415ec26c051366546c5355d6bdb8efcd
Timo Tietavainen [Wed, 13 Nov 2019 10:18:55 +0000 (10:18 +0000)]
Merge "Add documentation files"
Timo Tietavainen [Wed, 13 Nov 2019 05:59:50 +0000 (07:59 +0200)]
Add documentation files
Added mandatory documentation files for the RIC Amber release.
Change-Id: I8d2b1a9ca9bd01f18082e338cbfd2e044c96b334
Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Aric Gardner [Fri, 8 Nov 2019 16:01:56 +0000 (16:01 +0000)]
Automation adds INFO.yaml
Change-Id: I2e7c45791ba2e6560682972835f8f4d6418f7277
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Rolf Badorek [Fri, 8 Nov 2019 09:44:00 +0000 (11:44 +0200)]
Remove AX_PTHREAD autoconf macro
Due the incompatible license, removed AX_PTHREAD autoconf macro.
This macro generates '$(PTHREAD_CFLAGS)' and '$(PTHREAD_LIBS)'
variables for Makefile. This makes program porting easier to
different UNIX/POSIX systems.
Only 'libgmock' and 'libgtest' really needed those Makefile variables,
added required linker options directly to Makefile. Currently used
'-lpthread' linker option should be fine for all Linux base images
which will be used in RIC, if not then some workaround (e.g. a new
configure option) will be added later.
Other usages (other than above mentioned libraries) were a leftover
of former database discovery implementation, which was not imported
to RIC. Removed these unnecessary variable usages from Makefile.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: I895d8ce1581665b4b4816e97e782523d154a74c3
Rolf Badorek [Mon, 4 Nov 2019 15:28:21 +0000 (15:28 +0000)]
Merge "Add CI Dockerfile"
Rolf Badorek [Wed, 9 Oct 2019 07:24:58 +0000 (10:24 +0300)]
Add CI Dockerfile
First version of CI Dockerfile.
Contains only compilation and unit test execution as a verification.
Publishing RPM and Debian packages to PackageCloud.io will be added
as a separate merge request later. Also functional tests will be added
later.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: I6399069e772ba3e9144f83868269ad6554d46776
Rolf Badorek [Wed, 9 Oct 2019 07:58:22 +0000 (10:58 +0300)]
Improve installation instructions
Added two additional clarifications/tips to README.md file:
1) If SDL API is not installed to system default path, then
'PKG_CONFIG_PATH' needs to be adjusted.
2) In some cases dynamic linker cache needs to refreshed manually
after SDL API has been re-installed.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: Ib1b657e6e714c2c81b18a4ede7dfb01f539b29ca
Rolf Badorek [Wed, 2 Oct 2019 14:22:45 +0000 (17:22 +0300)]
Add standard stream logger
Added and activated logger implementation, which will write logs to
stdout and stderr.
This way SDL logs are included to 'kubectl logs' command output
of containerized application which is using SDL library.
SDL logs starts with "shareddatalayer: " prefix.
RIC has own logging library, which will be taken into use later as
a separate commit / merge request.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: I1b2d4085aa3112b02c4a2161e371712ea5ba2cb5
Rolf Badorek [Tue, 1 Oct 2019 15:33:58 +0000 (18:33 +0300)]
Add Sentinel configuration reading
Added reading Sentinel configuration from environment variables.
Sentinel address is configured via 'DBAAS_SERVICE_HOST' and
'DBAAS_SERVICE_SENTINEL_PORT' environment variables.
Sentinel master name is configured via 'DBAAS_MASTER_NAME' environment
variable.
Sentinel support is now activated.
Using Sentinel is optional. If Sentinel related environment variables
are not set, then static address for Redis server is used as before
(i.e. this change is backward compatible).
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: I34031ac56268673996c6fecb00eeed6e5dda8b9a
Rolf Badorek [Mon, 23 Sep 2019 11:14:56 +0000 (14:14 +0300)]
Add Sentinel change notification handling logic
When new Redis master has been promoted, Sentinel publishes
notification to '+switch-master' channel.
Refer to below web page for further details:
https://redis.io/topics/sentinel
'AsyncSentinelDatabaseDiscovery' will now subscribe notifications for
above mentioned channel. Notification contains information of new Redis
master, which is parsed from message and sent to upper layer via
'StateChangedCb' callback (if callback is set).
When notifications are subscribed from Redis (from Sentinel this case),
connection will go to "subscribed state", and only some pub/sub related
commands are allowed.
Due the above reason, we have two connections (command dispatchers).
One to subscribe notifications and the other for Sentinel commands,
like master inquiry.
Refer to below web page for further details:
https://redis.io/topics/pubsub
In case that subscriber connection goes down, subscription for
notifications is renewed once connection to Sentinel is working again.
Extra master inquiry will be made because we might be missed
notifications during connection cut. Latest master address is refreshed
via 'StateChangedCb', even if has not changed compared to last informed
address. This could be optimized, but as being very rare situation
was not seen worth of extra logic.
In case that the other connection (used for Sentinel commands) is cut,
the related command dispatcher will re-connect in the background.
Possible Sentinel commands during connection cut will fail and trigger
retry after short delay (per already existing implementation).
If some notifications are missed due some other reason than connection
cut, SDL might go to the state that operations will made to Redis slave.
In this situation write operations will fail with a new internal
'AsyncRedisCommandDispatcherErrorCode::WRITING_TO_SLAVE' error code,
which is mapped to 'shareddatalayer::Error::BACKEND_FAILURE'. Recovery
instructions adjusted a bit, so that re-creating SDL API instance is
not optional recovery step (it is the only way to recover from above
mentioned situation currently).
Sentinel support is still disabled, missing implementation will be
added soon as a separate commit(s).
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: I1bb9e121985ee22278e780e50ab13f88acdc65c5
Rolf Badorek [Fri, 20 Sep 2019 11:20:05 +0000 (14:20 +0300)]
Use boolean expects in unit tests
Certain gcc versions will give (per my understanding false positive)
warning when 'EXPECT_EQ' macro is used so that other argument is
'true' or 'false'.
For example, Ubuntu 16.04 has by default such a gcc version.
See some related discussion below:
https://github.com/google/googletest/issues/322
We have defined all compiler warning to be treated as errors, thus
above issue will lead to compilation error.
Simple fix is to use 'EXPECT_TRUE' or 'EXPECT_FALSE' instead. Those are
more readable, and thus better choice anyway.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: Ib0f3841c1b6fe2cf95eac3e4dc0cbcba9c3c8268
Rolf Badorek [Tue, 17 Sep 2019 13:47:20 +0000 (16:47 +0300)]
Add Redis Sentinel based database discovery
This is first step to support forthcoming Redis HA (Sentinel) DBaaS
deployment.
If sentinel-based database discovery is used (currently still disabled
by configure option), current master is asked from Sentinel.
In case that Sentinel can't be connected, re-try will be triggered
after one second delay. If reply parsing fails, it is considered as
non-recoverable bug and execution is aborted.
Currently, Sentinel address and Redis master name are still hard coded,
will be made configurable in a separate commit soon. Also ordering
change notifications from Sentinel will be implemented separately.
Added new discovery type "SENTINEL" to 'sdltool test-connectivity'
command output.
Refactoring for 'AsyncStorageImpl' class unit tests, so that those will
use database discovery mock implementation. Earlier implementation did
have assumptions for database discovery behavior, which were not
fulfilled any more when sentinel database discovery is used.
Added option to 'AsyncCommandDispatcher' which defines if commands
will be sent to Redis or to Sentinel. In latter case existence checking
for Redis module extension commands is skipped.
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Change-Id: Id7507844c9b74115e52d6f8eaf9cb18198c5dc63
Rolf Badorek [Tue, 20 Aug 2019 08:17:15 +0000 (11:17 +0300)]
Add first version
First version of C++ SDL API.
Refer README file for instructions how to generate API documentation.
Current version will find database via environment variables, thus RIC
DBaaS service must be up and running before starting the application
pod which uses SDL C++ API.
Change-Id: Ia3c95ac856b293827b680a9f6451a229f69f35f9
Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com>
Andrew Grimberg [Thu, 21 Mar 2019 23:55:44 +0000 (23:55 +0000)]
Initial empty repository