Commit 742b7394 authored by Scott Vokes's avatar Scott Vokes
Browse files

Merge branch 'develop' into develop_eliminate_sender

parents ad793852 456b6c33
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -101,17 +101,19 @@ makedirs:

all: default json test system_tests test_internals run examples

clean: makedirs update_git_submodules
clean: makedirs
	rm -rf ./bin/*.a ./bin/*.so ./bin/kinetic-c-util $(DISCOVERY_UTIL_EXEC)
	rm -rf ./bin/**/*
	rm -f ./bin/*.*
	rm -f $(OUT_DIR)/*.o $(OUT_DIR)/*.a *.core *.log
	bundle exec rake clobber
	if rake --version > /dev/null 2>&1; then if bundle --version > /dev/null 2>&1; then bundle exec rake clobber; fi; fi
	cd ${SOCKET99} && make clean
	cd ${LIB_DIR}/threadpool && make clean
	cd ${LIB_DIR}/bus && make clean
	if [ -f ${JSONC}/Makefile ]; then cd ${JSONC} && make clean; fi;

config: makedirs update_git_submodules

update_git_submodules:
	git submodule update --init

@@ -306,12 +308,12 @@ update_simulator:
	cp vendor/kinetic-java/kinetic-simulator/target/*.jar vendor/kinetic-java-simulator/

start_sims:
	./vendor/kinetic-simulator/startSimulators.sh
	./scripts/startSimulators.sh

start_simulator: start_sims

stop_sims:
	./vendor/kinetic-simulator/stopSimulators.sh
	./scripts/stopSimulators.sh

stop_simulator: stop_sims

@@ -437,9 +439,9 @@ run: $(UTIL_EXEC)
	exec $(UTIL_EXEC) --noop
	exec $(UTIL_EXEC) --put
	exec $(UTIL_EXEC) --get
	exec $(UTIL_EXEC) --getnext key ""
	exec $(UTIL_EXEC) --getprevious key ""
	exec $(UTIL_EXEC) --delete
	exec $(UTIL_EXEC) --getnext --key ""
	exec $(UTIL_EXEC) --getprevious --key "zzzzzzzzzzzzzzzzz"
	exec $(UTIL_EXEC) --delete --host 127.0.0.1
	exec $(UTIL_EXEC) --getlog
	@echo
	@echo Test Utility integration tests w/ kinetic-c lib passed!
+38 −30
Original line number Diff line number Diff line
@@ -24,12 +24,16 @@ Prerequisites
            * `> brew install openssl`
* [json-c](https://github.com/json-c/json-c) for JSON-formatted ACL definition files
    * Installation
        * via package manager
            * Linux (using apt-get)
                * `> sudo apt-get install json-c`
            * Linux (using yum)
                * `> sudo yum install json-c`
            * OSX (using [Homebrew](http://brew.sh/))
                * `> brew install openssl`
        * via Git submodule (from bundled source)
            * `> make json`
            * `> sudo make install_json`
            
A release of OpenSSL that provides TLS 1.1 or newer is required.

@@ -44,25 +48,25 @@ Getting Started

    > git clone --recursive https://github.com/seagate/kinetic-c.git
    > cd kinetic-c
    > bundle install # ensure you have all RubyGems at the proper versions

**Update to the latest version (previously cloned)**

    > git pull
    > make clean
    > make config # ensures all git submodules are up to date

**Build and install static library**

    > make
    > sudo make install

**Clean and uninstall old versions**
**Clean and uninstall any old versions**

    > make clean
    > sudo make uninstall

**Build example utility and run tests against Kinetic Device simulator**

    > make start_sims # starts bundled kinetic-java simulators for testing
    > make all # this is what Travis-CI build does does for regression testing

API Documentation
@@ -75,7 +79,7 @@ API Documentation
    * The ByteArray and ByteBuffer types are used for exchanging variable length byte-arrays with kinetic-c
        * e.g. object keys, object value data, etc.

**NOTE: Configuration structures `KineticClientConfig` and `KineticSessionConfig` should be initialized per C99 struct initialization or memset to 0 prior to use in order to ensure backwards compatibility!**
**NOTE: Configuration structures `KineticClientConfig` and `KineticSessionConfig` should be initialized per C99 struct initialization or memset to 0 prior to use in order to ensure forward/backward compatibility upon changes to these structure definitions!**

Client Test Utility
===========================
@@ -85,35 +89,39 @@ Code examples are included for reference as part of a test utility. The source c
* `kinetic-c-util` builds/links against Kinetic C static library (.a)
* `kinetic-c-util.x.y.z` builds/links against Kinetic C dynamic library (.so)

The project Makefile can be used as a reference for developing a Makefile for building for a new custom Kinetic C client.

Options
-------

* `--host [HostName/IP]` or `-h [HostName/IP]` - Set the Kinetic Device host

Operations
Usage
----------

* `kinetic-c-util [--host|-h hostname|123.253.253.23] [noop] [put] [get] [delete] [instanterase]`
    * `./bin/kinetic-c-util noop`
        * Execute a NoOp (ping) operation to verify the Kinetic Device is ready
    * `./bin/kinetic-c-util put`
        * Execute a Put operation to store a key/value entry
    * `./bin/kinetic-c-util get`
        * Execute a Get operation to retrieve a key/value entry
    * `./bin/kinetic-c-util delete`
        * Execute a Delete operation to destroy a key/value entry
    * `./bin/kinetic-c-util instanterase` *INCOMPLETE*
        * Execute an InstantSecureErase operation to erase ALL content from the device
    $ cd bin
    $ ./kinetic-c-util --help
    Usage: ./kinetic-c-util --<cmd> [options...]
    ./kinetic-c-util --help
    ./kinetic-c-util --noop [--host <ip|hostname>] [--port <port>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --put [--key <key>] [--value <value>] [--host <ip|hostname>] [--port <port>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --get [--key <key>] [--host <ip|hostname>] [--port <port>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --getnext [--key <key>] [--host <ip|hostname>] [--port <port>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --getprevious [--key <key>] [--host <ip|hostname>] [--port <port>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --delete [--key <key>] [--host <ip|hostname>] [--port <port>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --setclusterversion <--newclusterversion <newclusterversion>> [--host <ip|hostname>] [--tlsport <tlsport>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --seterasepin <--pin <oldpin>> <--newpin <newerasepin>> [--host <ip|hostname>] [--tlsport <tlsport>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --instanterase <--pin <erasepin>> [--host <ip|hostname>] [--tlsport <tlsport>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --secureerase <--pin <erasepin>> [--host <ip|hostname>] [--tlsport <tlsport>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --setlockpin <--pin <oldpin>> <--newpin <newpin>> [--host <ip|hostname>] [--tlsport <tlsport>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --lockdevice <--pin <lockpin>> [--host <ip|hostname>] [--tlsport <tlsport>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --unlockdevice <--pin <lockpin>> [--host <ip|hostname>] [--tlsport <tlsport>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --setacl <--file <acl_json_file>> [--host <ip|hostname>] [--tlsport <tlsport>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --getlog [--type <utilization|temperature|capacity|configuration|message|statistic|limits> [--host <ip|hostname>] [--tlsport <tlsport>] [--clusterversion <clusterversion>]
    ./kinetic-c-util --updatefirmware <--file <file>> [--host <ip|hostname>] [--port <port>] [--clusterversion <clusterversion>] [--pin <pin>]

Kinetic C Client I/O Examples
=============================

* [`blocking_put_get`](src/examples/blocking_put_get.c) - Blocking put w/get.
* [`blocking_put_delete`](src/examples/blocking_put_delete.c) - Blocking put w/delete.
* [`put_nonblocking`](src/examples/put_nonblocking.c) - Single thread, single connection, nonblocking put operation.
* [`get_nonblocking`](src/examples/get_nonblocking.c) - Single thread, single connection, nonblocking get operation.
* [`get_key_range`](src/examples/get_key_range.c) - Query a range of keys from a device.
* [`write_file_blocking`](src/examples/write_file_blocking.c) - Single thread, single connection, blocking operation.
* [`write_file_blocking_threads`](src/examples/write_file_blocking_threads.c) - Multiple threads, single connection, blocking operations.
* [`write_file_nonblocking`](src/examples/write_file_nonblocking.c) - Single thread, single connection, multiple non-blocking operations
* [`write_file_blocking_threads`](src/examples/write_file_blocking_threads.c) - Multiple threads, single connection, multiple non-blocking operations.
* [`get_key_range`](src/examples/get_key_range.c) - Query a range of keys from a device.
+29 −11
Original line number Diff line number Diff line
v0.12.0 (kinetic-protocol 3.0.5)
--------------------------------
* Added new KineticAdminClient API (see include/kinetic_admin_client.h)
* `KineticSession` is now supplied as an opaque instance pointer from `KineticClient_CreateSession`
    * Passed `KineticClientConfig` is now deep copied and can be discarded after session creation.
* Updated `KineticClient_Put` to allow storing an object with an empty value with a NULL data pointer supplied.
* Added new `KineticAdminClient` API (see `include/kinetic_admin_client.h`)
    * Reloacted existing admin methods to admin API
        * KineticClient_InstantSecureErase => KineticAdminClient_InstantErase/KineticAdminClient_SecureErase
        * KineticClient_GetLog => KineticAdminClient_GetLog
        * KineticClient_FreeDeviceInfo -> KineticAdminClient_LogInfo
* Added `KINETIC_STATUS_NOT_AUTHORIZED` to KineticStatus enum.
* Added KineticAdminClient_SetACL command.
* KineticSession is now supplied as an opaque instance pointer from KineticClient_CreateSession
    * Passed KineticClientConfig copied and can be discarded after session creation
* *KNOWN ISSUES*
    * KineticAdminClient_UpdateFirmware is incomplete
        * `KineticClient_InstantSecureErase` => `KineticAdminClient_InstantErase`/`KineticAdminClient_SecureErase`
        * `KineticClient_GetLog` => `KineticAdminClient_GetLog`
        * `KineticClient_FreeDeviceInfo` => `KineticAdminClient_LogInfo`
* Updated `kinetic-c-util` to support new Admin API. Still need to add support for printing info returned from `KineticAdminClient_GetLog`
* Changed `kinetic-c-util` API to use `getopt_long` for operations in addition to parameters and added usage info via `--help`/`-?` option.
* Fixed potential memory leak when logging protocol buffers.
* Fixed potential imbalance in concurrent operations semaphore.
* Status code changes
    * Changed
        * `KINETIC_STATUS_HMAC_EMPTY` => `KINETIC_STATUS_HMAC_REQUIRED`
    * Added
        * `KINETIC_STATUS_MISSING_PIN`
        * `KINETIC_STATUS_SSL_REQUIRED`
        * `KINETIC_STATUS_DEVICE_LOCKED`
        * `KINETIC_STATUS_ACL_ERROR`
        * `KINETIC_STATUS_NOT_AUTHORIZED`
        * `KINETIC_STATUS_INVALID_FILE`

v0.11.2 (kinetic-protocol 3.0.5)
--------------------------------
* Changed all threads to be block indefinitely and be fully event-driven.
* Changed all threads to block indefinitely and be fully event-driven.
* Added logging of all assertions to provide debugging info in the absence of debug symbols.
* Fixed race condition in message bus listener which could lead to data corruption.
* Fixed race condition that could cause more than the max number of thread pool threads to be created.
* Fixed potential buffer overrun in logger.
* Fixed bug with mishandling of unsolicited status responses from the drive prior to drive terminating connection.
* Removed ruby/rake as non-development build prerequisites.
* Added make json, json_install and json_uninstall tasks for json-c.

v0.11.1 (kinetic-protocol 3.0.5)
--------------------------------

cleanhouse.diff

deleted100644 → 0
+0 −2582

File deleted.

Preview size limit exceeded, changes collapsed.

+4 −4
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ PROJECT_NAME = kinetic-c
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER           = "v0.11.2-beta"
PROJECT_NUMBER           = "v0.12.0-beta"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -415,7 +415,7 @@ EXTRACT_ALL = YES
# be included in the documentation.
# The default value is: NO.

EXTRACT_PRIVATE        = NO
EXTRACT_PRIVATE        = YES

# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
# scope will be included in the documentation.
@@ -427,7 +427,7 @@ EXTRACT_PACKAGE = NO
# included in the documentation.
# The default value is: NO.

EXTRACT_STATIC         = NO
EXTRACT_STATIC         = YES

# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO
@@ -443,7 +443,7 @@ EXTRACT_LOCAL_CLASSES = NO
# included.
# The default value is: NO.

EXTRACT_LOCAL_METHODS  = NO
EXTRACT_LOCAL_METHODS  = YES

# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
Loading