Commit Graph

165 Commits

Author SHA1 Message Date
Saul Wold
59aa18cf57 Add openSUSE spec files
This commit adds the RPM specfile that supports openSUSE, these
include the _service file which creates the tarball, the changes
files and specfile itself.

These are all built via the OpenBuildService (OBS) and can be
found here:

https://build.opensuse.org/project/show/Cloud:StarlingX:2.0

Change-Id: I676aae8cb9554eab2740232fd0dd77e0ed876506
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-06-20 15:53:29 -07:00
Zuul
eeb2dee902 Merge "Add an overview about FM service" 2019-06-14 14:17:44 +00:00
Mario Alfredo Carrillo Arevalo
0c7f8f2ce6 Add an overview about FM service
This commit documents an overview in order to give a general idea
about what is Fault Management service and what is the role in
StarlingX project.

Story: 2005863
Task: 33669

Change-Id: Id58385cabc9c656aa03132a42f39d9663a6be08e
Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
2019-06-13 21:30:07 +00:00
Zuul
61b41926be Merge "Use StarlingX mail list as Package Maintainer for Debian" 2019-06-13 20:47:47 +00:00
Zuul
bc4a5ef2f9 Merge "fm-rest-api: Fix LICENSE Permissions" 2019-06-13 20:47:42 +00:00
Saul Wold
04e2c32864 fm-rest-api: Fix LICENSE Permissions
Change-Id: Ifaf3ea9af03105685e26622d01cc9a7c280842d9
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-06-13 10:25:41 -07:00
Zuul
3441cdbee7 Merge "fault: Clean-up /usr/bin/env instances" 2019-06-13 14:54:03 +00:00
Zuul
eb8601d6ee Merge "Add files for fm-mgr deb packaging" 2019-06-13 14:46:41 +00:00
Saul Wold
85f6ec6ea3 fault: Clean-up /usr/bin/env instances
The dependency resolver for RPM relies on the shebang to have the
interperter that will be used in order to get things right, so
change shebang to /usr/bin/python.

In other cases, the shebang is not needed at all as these are not
really executable python files, they are part of the python package.
RPMLINT finds these and complains that a non-executable has a shebang.

Change-Id: Ie90a846d6addffca1225e59fd8b6f3753d2991a4
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-06-12 15:28:41 -07:00
Marcela Rosales
428d3c6f0f Add files for fm-mgr deb packaging
Add control and rules files to generate fm-mgr deb following
StarlingX/MultiOS/Debian Wiki.

Change-Id: I00d5684373c863e8b891816f1228c96b51641f61
Story: 2004792
Task: 33570
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
2019-06-12 15:05:14 -05:00
Marcela Rosales
8e6f88198f Use StarlingX mail list as Package Maintainer for Debian
The Maintainer was change from a proper name to the StarlingX
project as it can be confusing the responsibilities of the person.

Change-Id: I32faf658388bc38e248362c71589f70f8f22ad4d
Story:2004792
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
2019-06-12 12:06:38 -05:00
Eric Barrett
8142803bfd Enable Python3 Compatibility
Flake8 currently ignores the following errors:
H233: Python 3.x incompatible use of print operator
H236: Python 3.x incompatible __metaclass__
H238: Old style class declaration, use new style
Enable them for python3 compability

Change-Id: I8959f3a78ce683eb93a16234908662189dd7c8a5
Story: 2004515
Task: 29304
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-06-07 13:35:58 +00:00
Zuul
5e84b8a614 Merge "Add files for fm-common deb packaging" 2019-06-07 12:17:03 +00:00
Zuul
15c9c0a6e1 Merge "Add files for fm-api deb packaging" 2019-06-06 20:12:06 +00:00
Marcela Rosales
ef43979d39 Add files for fm-common deb packaging
Add control, rules and install files to generate fm-common deb
following StarlingX/MultiOS/Debian Wiki.

Change-Id: Ic86a610aeef02a849faaec985579862e5b317db7
Story: 2004792
Task: 33569
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
2019-06-06 12:38:40 -05:00
Marcela Rosales
8520ae7d80 Add files for fm-rest-api deb packaging
Add control and rules files to generate fm-rest-api deb following
StarlingX/MultiOS/Debian Wiki.

Change-Id: Iad365e637269029cf7a371e29362dda0648a1ba9
Story: 2004792
Task: 33571
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
2019-06-06 12:34:12 -05:00
Marcela Rosales
ddd5f9ff9a Add files for fm-api deb packaging
Add control and rules files to generate fm-api deb following
StarlingX/MultiOS/Debian Wiki.

Change-Id: I5a113e070c73273754efb8c4846d05ba6a25e19f
Story: 2004792
Task: 33572
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
2019-06-06 12:27:42 -05:00
Zuul
41b8202508 Merge "fm-mgr: Add missing dependency - logrotate" 2019-06-06 14:41:02 +00:00
Zuul
5bc349fa44 Merge "Add PUT/POST methods to FM restful API" 2019-06-05 14:30:27 +00:00
Mario Alfredo Carrillo Arevalo
1e2d8dc04c Add PUT/POST methods to FM restful API
This commit implements the methods PUT and POST in order
to insert and update alarms.

Story: 2004008
Task: 30270

Change-Id: I773e651165b3654684b95463167fc565aef1ffa4
Co-authored-by: Sun Austin <austin.sun@intel.com>
Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
Signed-off-by: Sun Austin <austin.sun@intel.com>
2019-06-05 08:57:36 +08:00
Kristine Bujold
e5803f2a5d Fix alarms issues on non-UTC systems
This fixes two issues
-Alarm clear time incorrectly reported on non-UTC systems.
-Paused instances do not display the correct alarm timestamp in
non-UTC systems.

The mktime call that's made in fm_db_util_get_timestamp uses the local
tz in it's calculation. It assumes the incoming time is also in the
local time. When mktime is provided with a value in UTC we see the error
presented in this bug.

Change-Id: Iaf8d097e2dfdfae585b6976e02a85b9e2f1b19f9
Closes-Bug: 1828448
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2019-05-31 10:14:32 -04:00
Zuul
edb50f3398 Merge "Use DevStack's setup_*() functions for Python packages" 2019-05-30 22:23:21 +00:00
Saul Wold
9f9ce4d8ba fm-mgr: Add missing dependency - logrotate
Since fm-mgr uses logrotate servce, it should be a dependency.

Build Tested and confirmed that logrotate was a Required by both
inspection of SRPM and via rpm -q fm-mgr-1.0-6.tis.x86_64.rpm --requires

Change-Id: I55d005d3071ee0511a7404c5e7fd0389a92b2d0c
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-05-24 14:39:05 -07:00
Zuul
0de5931685 Merge "Add Required-Start and Required-Stop to fminit header" 2019-05-23 22:17:42 +00:00
Zuul
7e2e25b8ea Merge "for module boolean item, change fields to bool_to_none" 2019-05-22 18:21:52 +00:00
Dean Troyer
91fb95eae5 Use DevStack's setup_*() functions for Python packages
These functions do a number of things, specifically they handles the
DevStack USE_PYTHON3 switch transparently so we can run both major
Python versions.

The new setup.cfg files are only used by setup_*() right now, making
the switch to use pbr is beyond what I want to do here.

Change-Id: Ib9753119235b1ce23030a2b3de0169ed6f8819e0
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-05-17 13:11:58 -05:00
Marcela Rosales
7c535566af Add Required-Start and Required-Stop to fminit header
It is required for the fminit header to be compliant with LSB in
order to build on OBS infrastructure.

Story: 2003736
Task: 31057

Change-Id: I70555ce7b1245c940d56a04aa98bd1a5c17dc04e
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
2019-05-16 11:14:57 -05:00
Zuul
83c2fe2132 Merge "Fix fm-rest-api.spec missing buildreq" 2019-05-13 13:31:02 +00:00
Sun Austin
e10ef72a8e for module boolean item, change fields to bool_to_none
Test has been done on Simplex. the fm alarm-list can run
successfully.

Story: 2004008
Task: 30916

Change-Id: I993a52aa97ee8a21a8d04697b690f371d2a3bad5
Signed-off-by: Sun Austin <austin.sun@intel.com>
2019-05-11 08:53:12 +08:00
VictorRodriguez
81eea299f5 Fix fm-rest-api.spec missing buildreq
Without python-devel as build req in the spec if it is build in a mock
transparent build system ussing the CENGN repos:

http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/latest_build/
	outputs/RPMS/std/
	inputs/RPMS/

And upstream centos: http://mirror.centos.org/centos/7/os/x86_64/

The specfile is incomplete in build req and fails with:

+ %py2_build_wheel /var/tmp/rpm-tmp.XE1zff: line 32: fg: no job control

This patch fix the issue in the specfile 

Closes-Bug: 1828284
Change-Id: I2842d3dd3761d6827e7d1f9563ec92ebe02e10a5
Signed-off-by: VictorRodriguez <vm.rod25@gmail.com>
2019-05-10 17:34:52 +00:00
Zuul
b250555f96 Merge "Add PyMySQL to fm-rest-api docker image" 2019-05-09 19:58:45 +00:00
Sun Austin
53ddc3285a add migrate.cfg to wheel package to install image
Change-Id: If2d256aa56a9b278f7fecae76d1a1efd3a6a0444
Story: 2004008
Task: 30682
Signed-off-by: Sun Austin <austin.sun@intel.com>
2019-05-02 07:58:58 +08:00
Mario Alfredo Carrillo Arevalo
865db5aec6 Add PyMySQL to fm-rest-api docker image
PyMySQL is required by oslo_db as database
backend.

Story: 2004008
Task: 30661

Change-Id: Ia8e364511081daf4511b75b234cd35b307844503
Suggested-by: Sun Austin <austin.sun@intel.com>
Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
2019-04-29 17:33:42 +00:00
Zuul
2441aededf Merge "Remove references to infra in FM doc" 2019-04-22 16:55:04 +00:00
Dean Troyer
cd5693bc48 Followup opendev cleanup and test jobs
Because we are in a deadly embrace with the config plugin after
the OpenDev work the config plugin is being forced off in this job
to remove one of the dependencies.

Ultimately extracting cgts-client to be installable stand-alone
is a better solution to allow other plugins to install directly.

Depends-On: https://review.opendev.org/653961
Change-Id: I47f1d0df404fc40a9d514c1b0689b5457dbc3f87
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-20 20:26:25 -05:00
OpenDev Sysadmins
ae72f4deec OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:52:34 +00:00
Teresa Ho
8c015878d0 Remove references to infra in FM doc
Replace the references of infra network or interface with cluster-host.

Story: 2004273
Task: 30582

Change-Id: I9c6212f95adfba1a2bb0ea250723370690ab0345
Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
2019-04-18 09:31:46 -04:00
Zuul
8421d623d9 Merge "Protect FM API shared data with thread locking" 2019-04-10 20:02:48 +00:00
Eric MacDonald
7ae75e24c8 Protect FM API shared data with thread locking
Collectd runs all its python plugins concurrently.

With the expansion of collectd python plugins due
to the obsolesence of rmon collectd core dumps are
being reported during collectd startup when the FM
service on the controller is not running.

Debug of the issue revealed that the core dumps are
due to having no mutex around FM API's shared data.

The required mutex is provided by this update by
adding a while locked expression to the start of
each API.

Also fixed 3 pep8 errors.

Closes-Bug: 1819473

Test Plan:
PASS: Test before and after cases to confirm that without
      the change we see core dumps but with the change the
      API and collectd plugin behavior is correct without
      the core dumps.
PASS: System install with current collectd plugins and fm's
      python API enhanced with locking.
PASS: Have sm stop managing the fmManager process, kill it
      and then restart collectd over and over.
      Should not see any collectd core dumps.
PASS: Verify nfv alarming still works

Change-Id: I3d5ef0bd9cb774299b4c0f3b9e33cddb7c0f776c
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2019-04-09 20:32:26 +00:00
Zuul
7491c25ef4 Merge "[DevStack] Remove old job definition" 2019-04-04 21:24:11 +00:00
Don Penney
313b56d479 Remove pike/master files
This update removes pike and master wheel and/or image files,
as these have been replaced with stable/dev.

Change-Id: I9e1c98c5e5e5e6c0832ed443ad0a35aa4fb30282
Story: 2005248
Task: 30323
Signed-off-by: Don Penney <don.penney@windriver.com>
2019-04-03 16:41:26 -04:00
Dean Troyer
1e73fcfd0d [DevStack] Remove old job definition
I believe the last of the job updates has merged, this can go away now.

If that turns out to be not the case, this is easy to revert...

Change-Id: I5e1feb53d8b7857d4d8c69553de91bab32d0977c
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-03 14:18:56 -05:00
Zuul
079490ac6c Merge "[DevStack] WSME doesn't always get installed, force it" 2019-04-03 18:21:00 +00:00
Zuul
efac1b7e0b Merge "Switch to new DevStack base job" 2019-04-03 18:20:59 +00:00
Zuul
ba6f1625b1 Merge "[DevStack] Fix fm-rest-api start/stop" 2019-04-03 18:20:59 +00:00
Dean Troyer
d07d41fee3 [DevStack] WSME doesn't always get installed, force it
The jobs are working here but stx-nfv devstack fails in fm-rest-api,
what fun it is to find a transient dependency!  fm-rest-api has
apparently never started correctly but we did not properly detect
that until getting the stx-nfv plugin up.

Add requirements.txt and test-requirements.txt, only
test-requirements.txt is directly used by DevStack but WSME
is not a test-only dependency...

Cleanup to follow:
* properly get the dependencies of the service documented for pip
* properly detect when fm-rest-api fails to start under systemd

Change-Id: I91236d2bbb785c75264e8c4772d4ad6dfa45562c
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-02 23:27:27 +00:00
Zuul
b7e7f911e5 Merge "Add PTP monitoring to collectd" 2019-04-02 15:55:55 +00:00
Dean Troyer
456615539f Switch to new DevStack base job
Rename stx-fault-devstack to flock-devstack-fault
and inherit from flock-devstack-base

The old job definition must remain until no other plugins
are using it.

Change-Id: I736594c44fb45fd31a4920ca81298b2c2c1217a1
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-01 15:21:04 -05:00
Dean Troyer
1b5d82dd1d [DevStack] Fix fm-rest-api start/stop
Use the correct service name in start_fault() and stop_fault()

Change-Id: I881b8e4cbcca3219e7a18fa6f60afc1e442b41f4
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-01 14:39:53 -05:00
Shuicheng Lin
622ad8d87c Fix clear_fault/clear_all in FaultAPIsV2 raise exception when alarm is
not found

For the all 6 APIs in FaultAPIsV2, will treat alarm non-exist as normal
case, and exception will not be raised. Exception is raised only if
there is operation failure, such as fmclient fail to connect fmManager,
failure in memory allocation, failure in internal structure parse, etc.

Test:
Run each 6 APIs from FaultAPIs and FaultAPIsV2 with below case:
1. with correct alarm id
2. with wrong alarm id
3. with fmManager cannot be connected (Modify fmManager listen port to
   simulate it)
Confirm FaultAPIs's behavior is not changed.
And FaultAPIsV2 raises exception for operation failure only.
Check Events Suppression function in horizon GUI, it works correctly.

Closes-Bug: 1821112

Change-Id: I8ba122b19964613d90e9d0bf4a25134ff60e5c19
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2019-04-01 01:31:49 +08:00