Browse Source

Remove wrs-guest-heartbeat SDK Module

With the StarlingX move to supporting pure upstream OpenStack, the
majority of the SDK Modules are related to functionality no longer
supported. The remaining SDK Modules will be moved to StarlingX
documentation.

Story: 2005275
Task: 30545
Depends-On: https://review.openstack.org/#/c/653521

Change-Id: I842596dab79bff79313671e3e0b7aa7e4a93c493
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
changes/47/653147/3
Kristine Bujold 3 years ago
parent
commit
3102f5cfc5
  1. 1
      .zuul.yaml
  2. 4
      centos_guest_image.inc
  3. 4
      centos_guest_image_rt.inc
  4. 1
      centos_pkg_dirs
  5. 54
      devstack/lib/stx-nfv
  6. 5
      devstack/settings
  7. 202
      guest-client/LICENSE
  8. 12
      guest-client/PKG-INFO
  9. 3
      guest-client/centos/build_srpm.data
  10. 92
      guest-client/centos/guest-client.spec
  11. 202
      guest-client/guest-client-3.0.1/LICENSE
  12. 136
      guest-client/guest-client-3.0.1/Makefile
  13. 72
      guest-client/guest-client-3.0.1/README
  14. 296
      guest-client/guest-client-3.0.1/README.build
  15. 385
      guest-client/guest-client-3.0.1/README.usage
  16. BIN
      guest-client/guest-client-3.0.1/TiS-Guest-Heartbeat-Service.doc
  17. BIN
      guest-client/guest-client-3.0.1/TiS-Guest-Heartbeat-Service.pdf
  18. 84
      guest-client/guest-client-3.0.1/guest_client/Makefile
  19. 183
      guest-client/guest-client-3.0.1/guest_client/scripts/guest-client.init
  20. 57
      guest-client/guest-client-3.0.1/guest_client/scripts/guest-client.service
  21. 171
      guest-client/guest-client-3.0.1/guest_client/scripts/guest-client.systemd
  22. 116
      guest-client/guest-client-3.0.1/guest_client/scripts/guest_heartbeat.conf
  23. 165
      guest-client/guest-client-3.0.1/guest_client/scripts/sample_event_handling_script
  24. 42
      guest-client/guest-client-3.0.1/guest_client/scripts/sample_health_check_script
  25. 95
      guest-client/guest-client-3.0.1/guest_client/src/Makefile
  26. 351
      guest-client/guest-client-3.0.1/guest_client/src/guest_channel.c
  27. 95
      guest-client/guest-client-3.0.1/guest_client/src/guest_channel.h
  28. 312
      guest-client/guest-client-3.0.1/guest_client/src/guest_child_death.c
  29. 79
      guest-client/guest-client-3.0.1/guest_client/src/guest_child_death.h
  30. 67
      guest-client/guest-client-3.0.1/guest_client/src/guest_client.c
  31. 163
      guest-client/guest-client-3.0.1/guest_client/src/guest_config.c
  32. 73
      guest-client/guest-client-3.0.1/guest_client/src/guest_config.h
  33. 146
      guest-client/guest-client-3.0.1/guest_client/src/guest_debug.c
  34. 102
      guest-client/guest-client-3.0.1/guest_client/src/guest_debug.h
  35. 55
      guest-client/guest-client-3.0.1/guest_client/src/guest_limits.h
  36. 375
      guest-client/guest-client-3.0.1/guest_client/src/guest_process.c
  37. 50
      guest-client/guest-client-3.0.1/guest_client/src/guest_process.h
  38. 410
      guest-client/guest-client-3.0.1/guest_client/src/guest_script.c
  39. 75
      guest-client/guest-client-3.0.1/guest_client/src/guest_script.h
  40. 254
      guest-client/guest-client-3.0.1/guest_client/src/guest_selobj.c
  41. 83
      guest-client/guest-client-3.0.1/guest_client/src/guest_selobj.h
  42. 129
      guest-client/guest-client-3.0.1/guest_client/src/guest_signal.c
  43. 63
      guest-client/guest-client-3.0.1/guest_client/src/guest_signal.h
  44. 203
      guest-client/guest-client-3.0.1/guest_client/src/guest_stream.c
  45. 104
      guest-client/guest-client-3.0.1/guest_client/src/guest_stream.h
  46. 82
      guest-client/guest-client-3.0.1/guest_client/src/guest_time.c
  47. 68
      guest-client/guest-client-3.0.1/guest_client/src/guest_time.h
  48. 323
      guest-client/guest-client-3.0.1/guest_client/src/guest_timer.c
  49. 99
      guest-client/guest-client-3.0.1/guest_client/src/guest_timer.h
  50. 47
      guest-client/guest-client-3.0.1/guest_client/src/guest_types.c
  51. 54
      guest-client/guest-client-3.0.1/guest_client/src/guest_types.h
  52. 331
      guest-client/guest-client-3.0.1/guest_client/src/guest_unix.c
  53. 94
      guest-client/guest-client-3.0.1/guest_client/src/guest_unix.h
  54. 137
      guest-client/guest-client-3.0.1/guest_client/src/guest_utils.c
  55. 70
      guest-client/guest-client-3.0.1/guest_client/src/guest_utils.h
  56. 62
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/Makefile
  57. 318
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat.c
  58. 55
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat.h
  59. 235
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_config.c
  60. 78
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_config.h
  61. 118
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_disabled_state.c
  62. 81
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_disabled_state.h
  63. 698
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_enabled_state.c
  64. 81
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_enabled_state.h
  65. 211
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_enabling_state.c
  66. 81
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_enabling_state.h
  67. 204
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_event_script.c
  68. 73
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_event_script.h
  69. 369
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_fsm.c
  70. 105
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_fsm.h
  71. 124
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_health_script.c
  72. 71
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_health_script.h
  73. 112
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_initial_state.c
  74. 81
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_initial_state.h
  75. 1400
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_mgmt_api.c
  76. 83
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_mgmt_api.h
  77. 1212
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_msg.c
  78. 150
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_msg.h
  79. 132
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_types.c
  80. 114
      guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_types.h
  81. 77
      guest-client/guest-client-3.0.1/guest_client/src/test/Makefile
  82. 316
      guest-client/guest-client-3.0.1/guest_client/src/test/guest_test.c
  83. 54
      guest-client/guest-client-3.0.1/guest_client/src/test/guest_test.h
  84. 189
      guest-client/guest-client-3.0.1/guest_client/src/test/guest_test_cli.c
  85. 60
      guest-client/guest-client-3.0.1/guest_client/src/test/guest_test_cli.h
  86. 68
      guest-client/guest-client-3.0.1/guest_client/src/test/guest_test_client.c
  87. 264
      guest-client/guest-client-3.0.1/guest_client/src/test/guest_test_process.c
  88. 50
      guest-client/guest-client-3.0.1/guest_client/src/test/guest_test_process.h
  89. 123
      guest-client/guest-client-3.0.1/guest_client_api/Makefile
  90. 138
      guest-client/guest-client-3.0.1/guest_client_api/guest_api_debug.c
  91. 101
      guest-client/guest-client-3.0.1/guest_client_api/guest_api_debug.h
  92. 185
      guest-client/guest-client-3.0.1/guest_client_api/guest_api_stream.c
  93. 92
      guest-client/guest-client-3.0.1/guest_client_api/guest_api_stream.h
  94. 46
      guest-client/guest-client-3.0.1/guest_client_api/guest_api_types.c
  95. 53
      guest-client/guest-client-3.0.1/guest_client_api/guest_api_types.h
  96. 204
      guest-client/guest-client-3.0.1/guest_client_api/guest_api_unix.c
  97. 73
      guest-client/guest-client-3.0.1/guest_client_api/guest_api_unix.h
  98. 748
      guest-client/guest-client-3.0.1/guest_client_api/guest_heartbeat_api.c
  99. 330
      guest-client/guest-client-3.0.1/guest_client_api/guest_heartbeat_api.h
  100. 360
      guest-client/guest-client-3.0.1/guest_client_api/sample_guest_app.c
  101. Some files were not shown because too many files have changed in this diff Show More

1
.zuul.yaml

@ -110,7 +110,6 @@
fm-api: true
fm-rest-api: true
fm-mgr: true
guest-client: true
nfv-common: true
nfv-vim: true
nfv-client: true

4
centos_guest_image.inc

@ -5,7 +5,3 @@
#
# guest extensions
#
# guest-client
guest-client

4
centos_guest_image_rt.inc

@ -5,7 +5,3 @@
#
# guest extensions
#
# guest-client
guest-client

1
centos_pkg_dirs

@ -1,4 +1,3 @@
nova-api-proxy
guest-client
nfv
mtce-guest

54
devstack/lib/stx-nfv

@ -4,6 +4,8 @@
#
# Copyright (C) 2019 Intel Corporation
#
# Copyright (c) 2019 Wind River Systems, Inc.
#
# lib/stx-nfv
@ -35,11 +37,6 @@ MTCE_GUEST_DIR=$STXNFV_DIR/mtce-guest
MTCE_GUEST_CONF=$STXNFV_SYSCONFDIR/mtc
MTCE_GUEST_OCF_DIR=$STXNFV_OCF_ROOT/resource.d/platform
# guest-client
GUEST_CLIENT_VERSION="3.0.1"
STX_SDK_DEPLOY_DIR=${STX_SDK_DEPLOY_DIR:-/opt/deploy/cgcs_sdk}
# STX_INST_DIR should be a non-root-writable place to install build artifacts
STX_INST_DIR=${STX_INST_DIR:-/usr/local}
STX_BIN_DIR=$STX_INST_DIR/bin
@ -61,16 +58,6 @@ function cleanup_guest_agent {
sudo rm -rf $STXNFV_SYSCONFDIR/logrotate.d/guestAgent.logrotate
}
function cleanup_guest_client {
$STX_SUDO rm -rf $STX_INST_DIR/include/guest-client
sudo rm -rf $STX_SDK_DEPLOY_DIR
sudo rm -rf $STXNFV_SYSCONFDIR/systemd/system/guest-client.service
sudo rm -rf $STXNFV_SYSCONFDIR/guest-client
$STX_SUDO rm -rf $STX_INST_DIR/bin/guest-client
$STX_SUDO rm -rf $STX_INST_DIR/lib/libguest_common_api.so.$GUEST_CLIENT_VERSION
$STX_SUDO rm -rf $STX_INST_DIR/lib/libguest_heartbeat_api.so.$GUEST_CLIENT_VERSION
}
function cleanup_guest_server {
sudo rm -rf $MTCE_GUEST_CONF/guestServer.ini
$STX_SUDO rm -rf $STX_INST_DIR/bin/guestServer
@ -105,10 +92,6 @@ function cleanup_nfv {
cleanup_nova_api_proxy
fi
if is_service_enabled guest-client; then
cleanup_guest_client
fi
if is_service_enabled guest-agent || is_service_enabled guest-server; then
pushd $MTCE_GUEST_DIR/src
make clean
@ -291,36 +274,6 @@ function install_guest_agent {
popd
}
function install_guest_client {
pushd $STXNFV_DIR/guest-client/guest-client-$GUEST_CLIENT_VERSION
make clean
make build sysconfdir=$STXNFV_SYSCONFDIR
make sample
make tar ARCHIVE_NAME=wrs-guest-heartbeat-$GUEST_CLIENT_VERSION
find build
# Sudo Install for guest-client package
$STX_SUDO install -m 755 -d $STX_INST_DIR/include/guest-client
$STX_SUDO install -m 644 -p -D guest_client/src/heartbeat/guest_heartbeat_msg_defs.h $STX_INST_DIR/include/guest-client/guest_heartbeat_msg_defs.h
sudo install -d $STX_SDK_DEPLOY_DIR
sudo install -m 640 build/wrs-guest-heartbeat-$GUEST_CLIENT_VERSION.tgz $STX_SDK_DEPLOY_DIR
# Systemd services
sudo install -m 644 -p -D guest_client/scripts/guest-client.service $STXNFV_SYSCONFDIR/systemd/system/guest-client.service
sudo install -m 744 -p -D guest_client/scripts/guest-client.systemd $STXNFV_SYSCONFDIR/guest-client/guest-client.systemd
sudo install -m 750 -d $STXNFV_SYSCONFDIR/guest-client/heartbeat
sudo install -m 755 -p -D guest_client/scripts/guest_heartbeat.conf $STXNFV_SYSCONFDIR/guest-client/heartbeat/guest_heartbeat.conf
sudo install -m 755 -p -D guest_client/scripts/sample_event_handling_script $STXNFV_SYSCONFDIR/guest-client/heartbeat/sample_event_handling_script
sudo install -m 755 -p -D guest_client/scripts/sample_health_check_script $STXNFV_SYSCONFDIR/guest-client/heartbeat/sample_health_check_script
$STX_SUDO install -m 640 -p -D build/guest-client $STX_INST_DIR/bin/guest-client
$STX_SUDO install -m 640 -p -D build/libguest_common_api.so.$GUEST_CLIENT_VERSION $STX_INST_DIR/lib/libguest_common_api.so.$GUEST_CLIENT_VERSION
$STX_SUDO install -m 640 -p -D build/libguest_heartbeat_api.so.$GUEST_CLIENT_VERSION $STX_INST_DIR/lib/libguest_heartbeat_api.so.$GUEST_CLIENT_VERSION
popd
}
function install_guest_server {
pushd $MTCE_GUEST_DIR/src
@ -354,9 +307,6 @@ function install_nfv {
if is_service_enabled nova-api-proxy; then
install_nova_api_proxy
fi
if is_service_enabled guest-client; then
install_guest_client
fi
if is_service_enabled guest-agent || is_service_enabled guest-server; then
install_mtce_guest_common

5
devstack/settings

@ -4,6 +4,8 @@
#
# Copyright (C) 2019 Intel Corporation
#
# Copyright (c) 2019 Wind River Systems, Inc.
#
# Devstack settings
@ -38,10 +40,9 @@ fi
# prereqs are not configured?
if is_service_enabled guest-agent || is_service_enabled guest-server; then
# These guest- services require additional prerequisites
# guest-client: to install guest_heartbeat_api_msg_defs.h
# stx-metal: to install mtce_common header files and libraries
# fm-common: to install fmcommon library
local req_services="guest-client stx-metal fm-common"
local req_services="stx-metal fm-common"
for srv in $req_services;do
if ! is_service_enabled "$srv"; then
die $LINENO "$srv should be enabled for guestAgent/guestServer"

202
guest-client/LICENSE

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

12
guest-client/PKG-INFO

@ -1,12 +0,0 @@
Metadata-Version: 1.1
Name: guest-client
Version: 3.0.1
Summary: Titanium Cloud Platform Guest-Client Heartbeat Package
Home-page:
Author: Windriver
Author-email: info@windriver.com
License: Apache-2.0
Description: Guest-Client with heartbeat functionality.
Platform: UNKNOWN

3
guest-client/centos/build_srpm.data

@ -1,3 +0,0 @@
SRC_DIR="$PKG_BASE/guest-client-3.0.1"
COPY_LIST="$PKG_BASE/LICENSE"
TIS_PATCH_VER=6

92
guest-client/centos/guest-client.spec

@ -1,92 +0,0 @@
Summary: Guest-Client
Name: guest-client
Version: 3.0.1
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
%define cgcs_sdk_deploy_dir /opt/deploy/cgcs_sdk
%bcond_without systemd
%if %{with systemd}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: systemd
%endif
%package -n %{name}-devel
Summary: Guest-Client - Development files
Group: devel
Provides: guest-client-dev(x86_64) = 3.0.1-r1.0
%package -n %{name}-cgts-sdk
Summary: Guest-Client - SDK files
Group: devel
BuildRequires: json-c-devel
%description
Guest-Client with heartbeat functionality.
%description -n %{name}-devel
Guest-Client with heartbeat functionality. This package contains symbolic
links, header files, and related items necessary for software development.
%description -n %{name}-cgts-sdk
Guest-Client SDK files
%prep
%setup
# Build for guest-client package
make build sysconfdir=%{_sysconfdir}
make sample
make tar ARCHIVE_NAME=wrs-guest-heartbeat-%{version}
# Install for guest-client package
%install
make install \
prefix=%{buildroot}/usr \
includedir=%{buildroot}%{_includedir} \
SDK_DEPLOY_DIR=%{buildroot}%{cgcs_sdk_deploy_dir} \
unitdir=%{buildroot}%{_unitdir} \
sysconfdir=%{buildroot}%{_sysconfdir}
%files
%defattr(755,root,root,-)
%{_sysconfdir}/guest-client/heartbeat/guest_heartbeat.conf
%{_sysconfdir}/guest-client/heartbeat/sample_event_handling_script
%{_sysconfdir}/guest-client/heartbeat/sample_health_check_script
%defattr(644,root,root,-)
/usr/local/lib/libguest_common_api.so.%{version}
/usr/local/lib/libguest_heartbeat_api.so.%{version}
%attr(744,-,-) /usr/local/bin/guest-client
%if %{with systemd}
%{_unitdir}/guest-client.service
%attr(744,-,-) %{_sysconfdir}/guest-client/guest-client.systemd
%endif
%preun
%if %{with systemd}
/usr/bin/systemctl stop guest-client >/dev/null 2>&1
%systemd_preun guest-client.service
systemctl reload
%endif
%post
%if %{with systemd}
%systemd_post guest-client.service
systemctl reload
/usr/bin/systemctl enable guest-client >/dev/null 2>&1
%endif
%files -n guest-client-devel
%defattr(644,root,root,-)
/usr/include/guest-client/guest_heartbeat_msg_defs.h
%files -n %{name}-cgts-sdk
%{cgcs_sdk_deploy_dir}/wrs-guest-heartbeat-%{version}.tgz

202
guest-client/guest-client-3.0.1/LICENSE

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

136
guest-client/guest-client-3.0.1/Makefile

@ -1,136 +0,0 @@
#
# Copyright(c) 2013-2016, Wind River Systems, Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Wind River Systems nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
SHELL = /bin/sh
VERSION := 3.0.1
## Configuration Directory Variables
prefix := /usr
exec_prefix := $(prefix)
sysconfdir := /etc
includedir := $(prefix)/include
libdir := $(exec_prefix)/lib
bindir := $(exec_prefix)/bin
unitdir := /usr/lib/systemd/system
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))
PARENT_DIR := $(patsubst %/,%,$(dir $(CURRENT_DIR)))
BUILD_DIR := $(CURRENT_DIR)/build
PACKAGE_DIR := $(BUILD_DIR)/package
PACKAGE_ROOT_DIR := $(PACKAGE_DIR)/rootdir
SDK_DEPLOY_DIR := /opt/deploy/cgcs_sdk
ARCHIVE_NAME := wrs-guest-client-3.0.1
ARCHIVE_PKG_NAME := wrs-guest-client-3.0.1_pkg
INIT_TYPE := sysv
.PHONY: all build sample clean distclean tar package install uninstall
all: build
build:
mkdir -p --mode 755 $(BUILD_DIR)
@(cd guest_client_api; make --no-print-directory build \
sysconfdir=$(sysconfdir) BUILD_DIR=$(BUILD_DIR))
@(cd guest_client; make --no-print-directory build \
sysconfdir=$(sysconfdir) BUILD_DIR=$(BUILD_DIR))
tar:
@(mkdir -p --mode 755 $(BUILD_DIR))
@(ln -sf $(CURRENT_DIR) $(BUILD_DIR)/$(ARCHIVE_NAME))
@(cd $(BUILD_DIR); tar -pczf $(ARCHIVE_NAME).tgz \
$(ARCHIVE_NAME)/Makefile \
$(ARCHIVE_NAME)/LICENSE \
$(ARCHIVE_NAME)/README \
$(ARCHIVE_NAME)/README.build \
$(ARCHIVE_NAME)/README.usage \
$(ARCHIVE_NAME)/TiS-Guest-Heartbeat-Service.pdf \
$(ARCHIVE_NAME)/packaging \
$(ARCHIVE_NAME)/include \
$(ARCHIVE_NAME)/guest_client \
$(ARCHIVE_NAME)/guest_client_api \
--exclude $(ARCHIVE_NAME)/guest_client/build \
--exclude $(ARCHIVE_NAME)/guest_client/src/test \
--exclude $(ARCHIVE_NAME)/guest_client_api/build \
--directory $(BUILD_DIR))
sample:
mkdir -p --mode 755 $(BUILD_DIR)
@(cd guest_client_api; make --no-print-directory sample \
sysconfdir=$(sysconfdir) BUILD_DIR=$(BUILD_DIR))
@(cd guest_client; make --no-print-directory sample \
sysconfdir=$(sysconfdir) BUILD_DIR=$(BUILD_DIR))
clean:
@-(cd guest_client_api; make --no-print-directory clean BUILD_DIR=$(BUILD_DIR))
@-(cd guest_client; make --no-print-directory clean BUILD_DIR=$(BUILD_DIR))
distclean: clean
package:
@(mkdir -p --mode 755 $(PACKAGE_DIR))
@(mkdir -p --mode 755 $(PACKAGE_ROOT_DIR))
@(ln -sf $(PACKAGE_DIR) $(BUILD_DIR)/$(ARCHIVE_PKG_NAME))
@(echo "Packaging guest-client.pkg in $(PACKAGE_DIR)")
@(cp $(CURRENT_DIR)/packaging/guest-client.pkg $(PACKAGE_DIR)/guest-client.pkg)
@(chmod 755 $(PACKAGE_DIR)/guest-client.pkg)
@-(cd guest_client_api; make --no-print-directory package BUILD_DIR=$(BUILD_DIR) \
PACKAGE_DIR=$(PACKAGE_DIR) prefix=$(prefix) exec_prefix=$(exec_prefix) \
sysconfdir=$(sysconfdir) includedir=$(includedir) libdir=$(libdir) \
bindir=$(bindir))
@-(cd guest_client; make --no-print-directory package BUILD_DIR=$(BUILD_DIR) \
PACKAGE_DIR=$(PACKAGE_DIR) prefix=$(prefix) exec_prefix=$(exec_prefix) \
sysconfdir=$(sysconfdir) includedir=$(includedir) libdir=$(libdir) \
bindir=$(bindir))
@(cd $(BUILD_DIR); tar -pczf $(ARCHIVE_PKG_NAME).tgz \
$(ARCHIVE_PKG_NAME)/* --directory $(PACKAGE_DIR))
install:
install -m 750 -d $(prefix)
install -m 750 -d $(includedir)
install -m 750 -d $(includedir)/guest-client
install -m 640 -p -D guest_client/src/heartbeat/guest_heartbeat_msg_defs.h $(includedir)/guest-client/guest_heartbeat_msg_defs.h
install -m 755 -d $(SDK_DEPLOY_DIR)
install -m 640 build/wrs-guest-heartbeat-$(VERSION).tgz $(SDK_DEPLOY_DIR)
install -m 644 -p -D guest_client/scripts/guest-client.service $(unitdir)/guest-client.service
install -m 744 -p -D guest_client/scripts/guest-client.systemd $(sysconfdir)/guest-client/guest-client.systemd
install -m 750 -d $(sysconfdir)/guest-client/heartbeat
install -m 755 -p -D guest_client/scripts/guest_heartbeat.conf $(sysconfdir)/guest-client/heartbeat/guest_heartbeat.conf
install -m 755 -p -D guest_client/scripts/sample_event_handling_script $(sysconfdir)/guest-client/heartbeat/sample_event_handling_script
install -m 755 -p -D guest_client/scripts/sample_health_check_script $(sysconfdir)/guest-client/heartbeat/sample_health_check_script
install -m 640 -p -D build/guest-client $(prefix)/local/bin/guest-client
install -m 640 -p -D build/libguest_common_api.so.$(VERSION) $(prefix)/local/lib/libguest_common_api.so.$(VERSION)
install -m 640 -p -D build/libguest_heartbeat_api.so.$(VERSION) $(prefix)/local/lib/libguest_heartbeat_api.so.$(VERSION)
uninstall: package
@(echo "Uninstalling ...")
@(cd $(PACKAGE_DIR); ./guest-client.pkg uninstall $(INIT_TYPE) $(DESTDIR))

72
guest-client/guest-client-3.0.1/README

@ -1,72 +0,0 @@
Copyright(c) 2013-2017, Wind River Systems, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Wind River Systems nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------
TITANIUM CLOUD - GUEST HEARTBEAT SDK
===========================================
DESCRIPTION
===========
Titanium Cloud Guest-Client provides a heartbeat service to monitor the
health of guest application(s) within a VM running under WindRiver's
Titanium Cloud. Loss of heartbeat will result in a corrective action
being taken against the VM. The heartbeat interval and corrective action
is specified by the VM.
Titanium Cloud Guest-Client also provides guest application(s) within
a VM running under WindRiver's Titanium Cloud, the ability to receive
notification of and vote to accept or reject actions about to be performed
against the VM. On notifications, the guest application within the VM can
take this opportunity to cleanly shut down or transfer its service to a
peer VM.
+-------- Virtual Machine ------------------------+
| |
| VM-Health-Check-Script |
| / |
| / Guest-Application-1 |
Titanium Cloud <----> TiS-Guest-Client <-----> ... |
| \ Guest-Application-8 |
| \ |
| VM-Event-Script |
| |
+-------------------------------------------------+
See also:
README.build - building and installing.
README.usage - configuring and using the heartbeat, notification
and voting functionality.
DELIVERY
========
Titanium Cloud Guest-Client is delivered as source in a compressed
tarball, wrs-guest-client-v3.0.0.tgz, such that it can be compiled for
the applicable VM Linux distribution.

296
guest-client/guest-client-3.0.1/README.build

@ -1,296 +0,0 @@
Copyright(c) 2013-2017, Wind River Systems, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Wind River Systems nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------
This file contains instructions for building and installing the Titanium Cloud
Guest-Client.
REQUIREMENTS
============
The Guest-Client uses the SIGIO functionality of the virtio-serial device
to track host connection up, down and port unplug events. This functionality
requires a kernel version equal to or greater than 2.6.37.
Compilation:
Linux OS ## Same architecture as the VM.
gnu make
gcc compiler
development libraries and headers for:
libc ## C library
rt ## Real-Time library
json-c ## JSON-C library
VM Runtime:
Linux OS
runtime libraries:
libc ## C library
rt ## Real-Time library
json-c ## JSON-C library
COMPILE
=======
Extract the tarball contents ...
tar -xvf wrs-guest-heartbeat-v3.0.0.tgz
To compile, simply run ...
cd wrs-guest-heartbeat-3.0.0
make
This will create a build output directory called "build" in the
wrs-guest-heartbeat-3.0.0 directory. The build output directory
contains the following relevant files:
libguest_common_api.so.3.0.0
libguest_heartbeat_api.so.3.0.0
guest-client
The libguest_common_api library contains all the common code for
the Guest-Client API libraries.
The libguest_heartbeat_api library contains the heartbeat, voting,
and notification functionality to interact with the Guest-Client.
A guest application wanting to use this functionality needs to link
in the libguest_common_api and libguest_heartbeat_api libraries.
The guest-client executable is the Guest-Client daemon that heartbeats
guest applications, and orchestrates votes on and notifications of
pending actions against the VM. The Guest-Client reports the health,
notification and voting results of guest application(s) to the
Titanium Cloud.
The following variables are available to change the build output
directory and where the system configuration files will be located:
BUILD_DIR - used to change the build output directory, defaults
to the wrs-guest-heartbeat-3.0.0/build directory.
prefix - used to construct other variables below, defaults to
the /usr/local directory.
sysconfdir - directory for configuration files, set to
$(prefix)/etc
Note: all directory variables must specify an absolute path.
Usage: make <variable-name>=<variable-value>
To compile the sample-guest-app, simply run ...
cd wrs-guest-heartbeat-3.0.0
make sample
The sample-guest-app executable is for demonstration purposes only.
It demonstrates how a guest application can use the guest heartbeat
library, libguest_heartbeat_api, to interact with the Guest-Client.
To compile with a different compiler, simply run ...
cd wrs-guest-heartbeat-3.0.0
make CC=/x86_64/buildroot/host/usr/bin/x86_64-buildroot-linux-uclibc-cc
PACKAGE
=======
To build a tar package for installation, simply run ...
cd wrs-guest-heartbeat-3.0.0
make package
This will create a tar file called wrs-guest-heartbeat-3.0.0_pkg.tgz
in the wrs-guest-heartbeat-3.0.0 build directory.
If you changed the build output directory during compile, the BUILD_DIR
variable will have to be specified on the make package. Also if you
specified a different system configuration directory, the sysconfdir
variable, during compile, it will also have to be specified on the
make package.
The following package configuration variables are available to customize
the package for installation:
prefix - used to construct other variables below, defaults to
the /usr/local directory.
exec_prefix - used to construct other executable variables, set to
the 'prefix' variable.
sysconfdir - directory for configuration files, set to
$(prefix)/etc
includedir - directory for installing header files, set to
$(prefix)/include
libdir - directory for installing libraries, set to
$(exec_prefix)/lib
bindir - directory for installing executable programs, set to
$(exec_prefix)/bin
Note: all directory variables must specify an absolute path.
Usage: make package <variable-name>=<variable-value> ...
INSTALL
=======
To install from source directories, simply run ...
cd wrs-guest-heartbeat-3.0.0
make install
This will install the default configuration file, include files,
compiled libraries and executable into the following directories:
guest_heartbeat.conf --> /etc/guest-client/heartbeat
guest_api_types.h --> /usr/include/
guest_heartbeat_api.h --> /usr/include
libguest_common_api.so.3.0.0 --> /usr/local/lib
libguest_heartbeat_api.so.3.0.0 --> /usr/local/lib
guest-client --> /usr/local/bin
If you changed the build output directory during compile, the BUILD_DIR
variable will have to be specified on the make install. Also if you
specified a different system configuration directory, the sysconfdir
variable, during compile, it will also have to be specified on the
make install.
The following install configuration variables are available to customize
installation:
INIT_TYPE - the type of initialization the OS is using, one of
( systemd or sysv ). Default to sysv.
DESTDIR - prepended to each install target file, used to provide
an alternate environment to install in (i.e. support
for staged installs).
prefix - used to construct other variables below, defaults to
the /usr/local directory.
exec_prefix - used to construct other executable variables, set to
the 'prefix' variable.
sysconfdir - directory for configuration files, set to
$(prefix)/etc
includedir - directory for installing header files, set to
$(prefix)/include
libdir - directory for installing libraries, set to
$(exec_prefix)/lib
bindir - directory for installing executable programs, set to
$(exec_prefix)/bin
unitdir - directory for installing systemd unit files, set by
default to /usr/lib/systemd/system
SDK_DEPLOY_DIR - directory to store the cgcs sdk file.
Note: all directory variables must specify an absolute path.
Usage: make <install | uninstall> <variable-name>=<variable-value> ...
To install from a tar package file, simply run ...
tar -xvf wrs-guest-heartbeat-v3.0.0_pkg.tgz
cd wrs-guest-heartbeat-v3.0.0_pkg
guest-client.pkg install
This will install the default configuration file, include files,
compiled libraries and executable into the following directories:
guest_heartbeat.conf --> /usr/local/etc/guest-client/heartbeat
guest_api_types.h --> /usr/local/include
guest_heartbeat_api.h --> /usr/local/include
libguest_common_api.so.3.0.0 --> /usr/local/lib
libguest_heartbeat_api.so.3.0.0 --> /usr/local/lib
guest-client --> /usr/local/bin
To uninstall: guest-client.pkg uninstall
The following install configuration variables can be provided to
customize installation:
INIT_TYPE - the type of initialization the OS is using, one of
( systemd, sysv ). Optional parameter, defaults to
sysv.
DESTDIR - prepended to each install target file, used to provide
an alternate environment to install in (i.e. support
for staged installs). Optional parameter.
Note: all directory variables must specify an absolute path.
guest-client.pkg <install | uninstall> <systemd | sysv> [DESTDIR]
POST-INSTALL
============
Running in the VM:
Test if your platform is using systemd. First look for the systemd
process and then verify that the systemctl tool is available
ps -ef | grep systemd
systemctl --version
In this case use the systemd instructions, otherwise the sysv
instructions.
systemd:
As the root user,
systemctl daemon-reload
systemctl start guest-client.service
systemctl enable guest-client.service
sysv:
As the root user,
chkconfig --add guest-client
/etc/init.d/guest-client start
Building into the VM Image:
systemd:
No post install steps required.
sysv:
ln -s /etc/init.d/guest-client /etc/rc#.d/K##guest-client
ln -s /etc/init.d/guest-client /etc/rc#.d/S##guest-client
... and build the VM image.

385
guest-client/guest-client-3.0.1/README.usage

@ -1,385 +0,0 @@
Copyright(c) 2013-2017, Wind River Systems, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Wind River Systems nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------
This file contains instructions for using the Titanium Cloud Guest-Client.
Titanium Cloud Setup
=====================
The following steps are required to setup the Titanium Cloud to heartbeat
a VM.
1. Create and modify a Flavor for your VM.
A flavor extraspec, 'Guest Heartbeat', is used to indicate
that VMs of this flavor support Titanium Cloud Guest Heartbeat.
The default value is 'False'.
If support is indicated, then as soon as the VM's Titanium Cloud
Guest-Client daemon registers with the Titanium Cloud Compute
Services on the worker node host, heartbeating will be enabled.
a) Create a new flavor:
via dashboard ...
- Select 'Admin->Flavors' to bring up the list of flavors
- Select '+ Create Flavor' in the upper right.
- Fill in the fields as desired
- Select 'Create Flavor'
via command line ...
- nova flavor-create ...
b) Modify the newly created flavor or an existing flavor:
via dashboard ...
- Select 'Admin->Flavors' to bring up the list of flavors
- Choose a flavor to modify.
- Select the <flavor-name> to go to the Flavor Detail page
- Select the Extra Specs TAB
- Select '+ Create'
- Select 'Guest Heartbeat' from pull-down Extra Spec menu
- Check the 'Guest Heartbeat' checkbox
- Select 'Create'
via command line ...
- nova flavor-key <flavor-name> set sw:wrs:guest:heartbeat=True
Note: already running instances that were launched with this
flavor are NOT affected.
2) Launch a new instance of your VM.
3) Verify your VM is running with Guest Heartbeat enabled.
Log into the VM.
Guest-Client logs are written to syslog's 'daemon' facility, which
are typically logged by the syslog service to /var/log/daemon.log.
Please refer to syslog for details on log settings in order to
determine location of logged Guest-Client messages.
Guest-Client logs are easy to identify. The logs always contain the
string 'Guest-Client'. A recursive grep of /var/log is one way to
determine where your syslog is sending the Guest-Client logs.
LOG=`grep -r -l 'Guest-Client' /var/log`
echo $LOG
/var/log/daemon.log
A successful connection can be verified by looking for the
following log.
grep "Guest-Client" $USER_LOG | grep "heartbeat state change"
Guest-Client heartbeat state change from enabling to enabled
VM Setup
========
Configuring Guest-Client Initialization/Start Scripts
-----------------------------------------------------
The Titanium Cloud communicates with the Guest-Client through a character
device. The packaged initialization/startup scripts need to be updated to
specify the character device exposed by QEMU to the VM.
+-- Virtual Machine ---+
| |
| |
Titanium Cloud <-------------------> QEMU <------------> Guest-Client |
unix-stream-socket char-device |
| |
+----------------------+
The variable that needs updating in the initialization/start scripts is
called GUEST_CLIENT_DEVICE.
Also the location of the Guest-Client binary needs to be updated in the
initialization/start scripts. The variable that needs updating is called
GUEST_CLIENT.
Configuring Guest Heartbeat & Application Health Check
------------------------------------------------------
The Guest-Client within your VM will register with the Titanium Cloud
Compute Services on the worker node host. Part of that registration
process is the specification of a heartbeat interval and a corrective
action for a failed/unhealthy VM. The values of heartbeat interval and
corrective action come from the guest_heartbeat.conf file and is located
in /etc/guest-client/heartbeat directory by default.
Guest heartbeat works on a challenge response model. The Titanium
Server Compute Services on the worker node host will challenge the
Guest-Client daemon with a message each interval. The Guest-Client
must respond prior to the next interval with a message indicating good
health. If the Titanium Cloud Compute Services does not receive a valid
response, or if the response specifies that the VM is in ill health, then
corrective action is taken.
The mechanism can be extended by allowing additional VM resident application
specific scripts and processes, to register for heartbeating. Each script
or process can specify its own heartbeat interval, and its own corrective
action to be taken against the VM as a whole. On ill health the Guest-Client
reports ill health to the Titanium Cloud Compute Services on the worker node
host on the next challenge, and provoke the corrective action.
This mechanism allows for detection of a failed or hung QEMU/KVM instance,
or a failure of the OS within the VM to schedule the Guest-Client process
or to route basic IO, or an application level error/failure.
Configuring the Guest-Client Heartbeat & Application Health Check ...
The heartbeat interval defaults to every second and can be overridden
by the VM in the guest_heartbeat.conf.
/etc/guest-client/heartbeat/guest_heartbeat.conf:
## This specifies the interval between heartbeats in milliseconds between the
## guest-client heartbeat and the Titanium Cloud Compute Services on the
## worker node host.
HB_INTERVAL=1000
The corrective action defaults to 'reboot' and can be overridden by the
VM in the guest_heartbeat.conf.
/etc/guest-client/heartbeat/guest_heartbeat.conf:
## This specifies the corrective action against the VM in the case of a
## heartbeat failure between the guest-client and Titanium Cloud Compute
## Services on the worker node host and also when the health script
## configured below fails.
##
## Your options are:
## "log" Only a log is issued.
## "reboot" Issue a reboot against this VM.
## "stop" Issue a stop against this VM.
##
CORRECTIVE_ACTION="reboot"
A health check script can be registered to run periodically to verify
the health of the VM. This is specified in the guest_heartbeat.conf.
/etc/guest-client/heartbeat/guest_heartbeat.conf:
## The Path to the health check script. This is optional.
## The script will be called periodically to check for the health of the VM.
## The health check interval is specified in seconds.
HEALTH_CHECK_INTERVAL=30
HEALTH_CHECK_SCRIPT="/etc/guest-client/heartbeat/sample_health_check_script"
Configuring Guest Notifications and Voting
------------------------------------------
The Guest-Client running in the VM can be used as a conduit for
notifications of VM lifecycle events being taken by the Titanium Cloud that
will impact this VM. Reboots, pause/resume and migrations are examples of
the types of events your VM can be notified of. Depending on the event, a
vote on the event maybe required before a notification is sent. Notifications
may precede the event, follow it or both. The full table of events and
notifications is found below.
Titanium Action Event Name Vote* Pre-notification Post-notification Timeout
--------------- ----------------- ---- ---------------- ----------------- -------
stop stop yes yes no shutdown
reboot reboot yes yes no shutdown
pause pause yes yes no suspend
unpause unpause no no yes resume
suspend suspend yes yes no suspend
resume resume no no yes resume
resize resize_begin yes yes no suspend
resize_end no no yes resume
live-migrate live_migrate_begin yes yes no suspend
live_migrate_end no no yes resume
cold-migrate cold_migrate_begin yes yes no suspend
cold_migrate_end no no yes resume**
* voting has its own timeout called 'vote' that is event independent.
** after VM reboot and reconnection which is subject to the 'restart' timeout.
Notifications are an opportunity for the VM to take preparatory actions
in anticipation of the forthcoming event, or recovery actions after
the event has completed. A few examples
- A reboot or stop notification might allow the application to stop
accepting transactions and cleanly wrap up existing transactions.
- A 'resume' notification after a suspend might trigger a time
adjustment.
- Pre and post migrate notifications might trigger the application
to de-register and then re-register with a network load balancer.
If you register a notification handler, it will receive all events. If
an event is not of interest, it should return immediately with a
successful return code.
A process may only register a single notification handler. However
multiple processes may independently register handlers. Also a script
based handler may be registered via the guest_heartbeat.conf. When
multiple processes and scripts register notification handlers, they
will be run in parallel.
Notifications are subject to configurable timeouts. Timeouts are
specified by each registered process and in the guest_heartbeat.conf.
The timeouts in the guest_heartbeat.conf govern the maximum time all
registered notification handlers have to complete.
While pre-notification handlers are running, the event will be delayed.
If the timeout is reached, the event will be allowed to proceed.
While post-notification handlers are running, or waiting to be run,
the Titanium Cloud will not be able to declare the action complete.
Keep in mind that many events that offer a post notification will
require the VM's Guest-Client to reconnect to the worker host, and
that may be further delayed while the VM is rebooted as in a cold
migration. When post-notification is finally triggered, it is subject
to a timeout as well. If the timeout is reached, the event will be
declared complete.
NOTE: A post-event notification that follows a reboot, as in the
cold_migrate_end event, is a special case. It will be triggered as
soon as the local heartbeat server reconnects with the worker host,
and likely before any processes have a chance to register a handler.
The only handler guaranteed to see such a notification is a script
directly registered by the Guest-Client itself via guest_heartbeat.conf.
In addition to notifications, there is also an opportunity for the VM
to vote on any proposed event. Voting precedes all notifications,
and offers the VM a chance to reject the event the Titanium Cloud wishes
to initiate. If multiple handlers are registered, it only takes one
rejection to abort the event.
The same handler that handles notifications also handles voting.
Voting is subject to a configurable timeout. The same timeout applies
regardless of the event. The timeout is specified when the Guest-Client
registers with compute services on the host. The timeout is specified in
the guest_heartbeat.conf file. This timeout governs the maximum time all
registered voting handlers have to complete the vote.
Any voters that fail to vote within the timeout are assumed to have agreed
with the proposed action.
Rejecting an event should be the exception, not the rule, reserved for
cases when the VM is handling an exceptionally sensitive operation,
as well as a slow operation that can't complete in the notification timeout.
An example
- an active-standby application deployment (1:1), where the active
rejects a shutdown or pause or ... due to its peer standby is not
ready or synchronized.
A vote handler should generally not take any action beyond returning its
vote. Just because you vote to accept, doesn't mean all your peers
will also accept (i.e. the event might not happen). Taking an action
against an event that never happens is almost certainly NOT what you want.
Instead save your actions for the notification that follows if no one
rejects. The one exception might be to temporarily block the initiation of
any new task that would cause you to vote to reject an event in the near
future. The theory being that the requester of the event may retry in
the near future.
The Titanium Cloud is not required to offer a vote. Voting may be
bypassed on certain recovery scenarios.
Configuring Guest-Client Notification and Voting ...
## The overall time to vote in seconds regardless of the event being voted
## upon. It should reflect the slowest of all expected voters when in a sane
## and healthy condition, plus some allowance for scheduling and messaging.
VOTE=8
## The overall time to handle a stop or reboot notification in seconds.
## It should reflect the slowest of all expected notification handlers
## when in a sane and healthy condition, plus some allowance for scheduling
## and messaging.
SHUTDOWN_NOTICE=8
## The overall time to handle a pause, suspend or migrate-begin notification
## in seconds. It should reflect the slowest of all expected notification
## handlers when in a sane and healthy condition, plus some allowance for
## scheduling and messaging.
SUSPEND_NOTICE=8
## The overall time to handle an unpause, resume or migrate-end notification
## in seconds. It should reflect the slowest of all expected notification
## handlers when in a sane and healthy condition, plus some allowance for
## scheduling and messaging. It does not include reboot time.
RESUME_NOTICE=13
## The overall time to reboot, up to the point the guest-client heartbeat
## starts in seconds. Allow for some I/O contention.