Spec files no longer requires specific remote-clients SDK actions.
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: 30154
Change-Id: I6ed8de0f8ba438088aff27b1d1947c428e79fb4b
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
Issue:
for the alarm_show/alarm_delete/event_show api, if the input UUID
string is not valid, http server side will return error code 500
(Internal Server Error), due to the error code is not set correctly.
Solution:
Correct the error code in server, and add client code to handle
"HTTP 404 - Not Found" error code correctly.
Test:
Run "fm alarm-show/alarm-delete/event-show" with valid/invalid
UUID, and the response is correct. For invalid UUID, response
string will like below. "xxx" for the invalid UUID string.
"Alarm not found: xxx"
"Event log not found: xxx"
Closes-Bug: 1806927
Change-Id: I8d17c5bc55733f269d875ae835ab6295fed4d899
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
All rmon resource monitoring has been moved to collectd.
This update removes rmon from mtce and the load.
Story: 2002823
Task: 30045
Test Plan:
PASS: Build and install a standard system.
PASS: Inspect mtce rpm list
PASS: Inspect logs
PASS: Check pmon.d
Depends-On: https://review.openstack.org/#/c/643739
Change-Id: I7a1833fddbd36c69248b9dc13a9e539239104270
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
fm-rest-api requires cgtsclient, stx-config needed some work
to allow only that to be installed.
Rework installation dir again. Put everything in /usr/local
again, but allow that to be changed to a user-writable dir and
not require sudo.
Depends-on: https://review.openstack.org/641786
Depends-on: https://review.openstack.org/641783
Depends-on: https://review.openstack.org/641699
Change-Id: I37cc8283e8eb93a77088aebacdcc62dfb7e1c75e
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Current FaultAPIs (get_fault/get_faults/get_faults_by_id) cannot
distinguish error and no data case. None will be returned for both
case. To separate these two cases, and implement the code more as
pythonic way, FaultAPIsV2 is added, which will raise exception for
error case.
In order to separate the cases, the C functions called by API are
modified to return FALSE for error, and return None for no data.
Test:
Pass basic deploy test, and "fm alarm-*" cmd work as before.
Use fm_api_test.py/fm_api_v2_test.py to manual trigger API call,
confirm alarm could be created/get/deleted, and value is the same
as "fm alarm-list".
Modify fmManager to simulate error case, confirm exception is
generated for FaultAPIsV2, and behavior is not changed for
FaultAPIs.
Story: 2004859
Task: 29097
Change-Id: Ic1c0a15eb8dfec6c368099b096d6a158da0d3c77
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
* Install build artifacts to a fixed dir rather than attempting
to infer a location based on the Python binary location. That
was intended to work seamlessly in venvs, we'll burn that bridge
when we come to it, for now just put it all in
$DEST/usr/{bin|include|lib}. This also removed the need for
root access for these files to allow the build steps to be performed
on laptops that may not otherwise run DevStack.
* Handle some side-effects of a non-default install location for
the build artifacts.
* Add missing CentOS prereqs for base image builds:
fm-common:
- libuuid-devel
- postgresql-devel
* Add the declarations to settings for the devstack playbook to
handle plugin precedence order properly.
Change-Id: I8ec59f83dff522fcec0be4e0a650e402a2747a98
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
We're changing to upstream master soon, let's start running
on the upstream devstack configuration.
There is an undeclared dependency on cgtsclient in fm-rest-api
so we need to work around that.
Change-Id: If764701fce94fb760edf0a68805753d3804892c0
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Pull binary build steps into separate functions
* Add build.sh to call binary builds without the rest of DevStack
* Add new stx-fault-build job and tox build environment
* Make stx-fault-devstack voting (still only devstack/*)
Change-Id: I6692fc1f75db413860ede2657f4f1501b95c10c0
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
By setting 'hacking' as the dependency, flake8
will include hacking and other checks.
This is the same set used by other openstack
components.
This commit suppresses any of those new checks that
would fail.
H102 Apache 2.0 license header not found
H104 File contains nothing but comments
H105 Don't use author tags
H233 Python 3.x incompatible use of print operator
H236 Python 3.x incompatible __metaclass__
H238 old style class declaration, use new style
H301 one import per line
H306 imports not in alphabetical order
H401 docstring should not start with a space
H403 multi line docstrings should end on a new line
H404 multi line docstring should start without a leading new line
H405 multi line docstring summary not separated with an empty line
H702 Argument to ... must be a string
H903 Windows style line endings not allowed in code
At a later time, additional commits will fix and un-suppress them.
Story: 2004515
Task: 29304
Change-Id: I7f9e36cb605e47338dc5d33c94d1c0b09943a38a
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
Update conf.py for release notes to include the project
variable, set to the project name. This is so the string
above the left nav renders the project name.
Story: 2004900
Task: 29226
Change-Id: Ic64f0e1e45fc2b6fe141193ac9e173fcce17b26b
Signed-off-by: Kristal Dale <kristal.dale@intel.com>
As a result of time spent within stx-fault, there are API reference content
gaps:
- "The API document should be modified to match the description returned from
API query": changed both the name of the desciption.
- "Wrong "links" reference: changed to existing StarlingX stx-fault API
reference.
- Additional: Remove <U+200B> character.
More Information:
- [Starlingx-discuss] API requests: stx-fault [0]
- Etherpad StarlingX APIs Review [1]
[0] http://lists.starlingx.io/pipermail/starlingx-discuss/2018-December/002150.html
[1] https://etherpad.openstack.org/p/stx-apis
Story: 2004877
Task: 29153
Change-Id: Ifb3da9492b74b4ecf7be265294af5d2e604d56e5
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
It is due to out of range access violation. Fix it by checking length
before access.
Closes-Bug: 1807986
Change-Id: Iba2b445f50fd98a74d932c9b3f691fc7145274bb
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Include the optional “expand” option to the get list for alarms and
events so the entire set of data can be returned and not just a
subset. “expand” is and optional parameter and defaults to False.
Story: 2004818
Task: 29096
Change-Id: Ife3b900d90c56564e9aeaa820e57f69d15194eb3
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
change install_non_bb to install due to
I431b733030444185cc51a8b5352492926170a4c3 change
Force to use xenial(nodeset:openstack-single-node-xenial)
Closes-bug: 1812785
Change-Id: I61338a79f09d59b1f1e36a4911ecadad4a3453e8
Signed-off-by: Sun Austin <austin.sun@intel.com>
This patch adds compiler flags to improve the security of STX code.
Flags added:
Format string vulnerabilities: CFLAGS="-Wformat -Wformat-security"
Compiler will treat string format warnings as errors,
so at compiling level, buffer overflow is avoided.
Story: 2004380
Task: 28806
Signed-off-by: Luis Botello <luis.botello.ortega@intel.com>
Reviewed-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
Victor Rodriguez <vm.rod25@gmail.com>
Sugested-by: Victor Rodriguez <vm.rod25@gmail.com>
Erich Cordoba <erich.cordoba.malibran@intel.com>
Change-Id: Ia1ffaf18e7050d9099b80f9023b2bf255b4750fa
doc index.rst:
1. Update intro sentence to read as a complete sentence
2. Remove unused toctree
3. Correct heading levels (impacting side nav and correct rendering of content)
4. Remove "Indices and Tables" section: genindex page not used, search searches
only index (not useful here)
api-ref index.rst:
1. Update intro sentence to read as a complete sentence
2. Update text around search link for consistency (move to follow intro)
3. Add heading before toctree for consistency with other pages
releasenotes index.rst:
1. Standardize page title reST markup
2. Remove search (make consistent with other openstack release note pages)
Change-Id: I57d05e7a37997fa6941852d420cfed7e6c7c5ad6
Signed-off-by: Kristal Dale <kristal.dale@intel.com>
issue: in ~/fm-doc/fm_doc/check_missing_alarms.py, there is
a for-loop iterating the dict "events", however inside this
loop, some elements are being popped out, and elements with
new keys are being added dynamically. This is not safe and
would bring unpredictable behavior with different versions
of Python and "Collections".
check_missing_alarms.py is triggered to run at Build stage
(defined in fm-doc.spec) when generating "fm-doc.*.tis.rpm".
Test for fix:
1. rebuild on "fm-doc.*.tis.rpm" by "# build-pkgs fm-doc"
2. check the rpm build log and assure the code be executed
correctly with expected check results.
3. run this script with different Python versions on other
Linux hosts and assure it works well.
Closes-Bug: 1809064
Change-Id: Ieb07ae944037c2eb33dda414e870702a9d248d83
Signed-off-by: yhu6 <yong.hu@intel.com>
The install target was changed as well as the variables provided
to the makefile.
Story: 2004043
Task: 27544
Change-Id: Id932e2c5cc15be1244c39158b62e6f6f74ce20bc
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
The `install_non_bb` target was changed to `install`, also some
variable names in the Makefile and spec file were changed. There
was a hardcoded path in fmConstants.h and that was updated as well.
Story: 2004043
Task: 27543
Change-Id: I431b733030444185cc51a8b5352492926170a4c3
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
Closes-Bug: 1789979
fm-rest-api returns json format message for the correct api
access. For the invalid api access, the message is with html
format, need add wrap_app to convert it to json format.
Fix:
The implementation code is copied from upstream Ironic API,
and minor modification to pass tox pep8 check.
Also remove "x" attribute for the py file.
Test:
Pass build and multi node deploy test. Confirmed the return
message is json format.
Change-Id: I36fa89b82377d52008a467316c42c06caa65cd90
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
It is "fm-rest-api" in .zuul.yaml. Correct the service name.
Change-Id: Idbac53b74e0eeb5b7da5c83c2526fb3ac7be855e
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This fixes the cleanup for the rest-api since it was missing either '-'
or the '_'.
Change-Id: Id461458c6ba0045f28e9d26de11c318c5c4c51a4
Signed-off-by: Saul Wold <sgw@linux.intel.com>
in function fm_db_util_get_timestamp()
172: char *tstr = strdup(str);
memory obtained from strdup() is done dynamically using malloc().
it should be freed when tstr is no longer in use.
test case:
1. one controller + one compute deploy (virtual)
success to deploy and create an instance.
Closes-Bug: 1794705
Change-Id: I0d0c1e6e4386128d6cb38741d80af22a5f10b770
as for strncpy does not guarantee null terminated of dest string,
but snprintf does.
so change code from
strncpy(buffer, source, sizeof buffer);
to
int n = snprintf(buffer, sizeof buffer, "%s", source);
assert(n >= 0 && n < sizeof buffer);
test case:
1. a simple test about difference between strncpy and snprintf
2. use fmClientCli to create an alarm
mock the init_tables() function so there is no need to
connect to the server.
add code to dump SFmAlarmDataT to check datas return.
3. one controller + one compute deploy (virtual)
success deploy and create an instance.
Closes-Bug: 1794701
Change-Id: I04b4c5c85782ff571e2957e12c47f2f628d2b772
Begin working on a base devstack job for testing stx projects.
We have to pull a lot of stable/pike bits yet let STX services
run from master.
Change-Id: I6eee854888acb27b54c10c25d47e97d98a7f999c
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
The target of install_non_bb was changed to install. The variables
were set to default values inside the makefile. All changes were
updated in the specfile as well.
An issue with an empty PATCH variable was fixed and the StarlingX
was updated.
Story: 2004043
Task: 27546
Change-Id: I5f2f8a0d681b106691f2cbf8b0a7a27977452edc
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
At the moment it just installs and partially configures it.
Depends-On: https://review.openstack.org/610756
Change-Id: If74b81841f583ad6d3850cd12ee337c1b4a1a177
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This update adds hooks to the spec files for the following packages
to generate wheels for the python modules:
- fm-api
- fm-common
- fm-rest-api
- python-fmclient
Change-Id: I0542650b52b9c5b0627023a2ce1996176135411d
Story: 2003907
Task: 27525
Signed-off-by: Don Penney <don.penney@windriver.com>
The new flake8 version 3.6.0 introduces new warnings that cause
the check and gate jobs to fail. Locking down the flake8 version
to avoid these surprises in the future. We can later increment
the flake8 version and fix the new warnings in a controlled
manner.
Change-Id: I6bd40eea0ec8599af5ded99f7696e81d5c64f31e
Partial-Bug: 1799721
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>