Commit Graph

26 Commits

Author SHA1 Message Date
Al Bailey 60ab3f6b45 Update debian package versions to use git commits
The Debian packaging has been changed to reflect all the
git commits under the directory, and not just the commits
to the metadata folder.

This ensures that any new code submissions under those
directories will increment the versions.

All packages have a higher version than before the change.

Test Plan:
  PASS: build-pkgs -c -p fm-api
  PASS: build-pkgs -c -p fm-common
  PASS: build-pkgs -c -p fm-doc
  PASS: build-pkgs -c -p fm-mgr
  PASS: build-pkgs -c -p fm-rest-api
  PASS: build-pkgs -c -p python-fmclient

Story: 2010550
Task: 47226

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I65e881ba96512d2eaba25c44332d5ae82efea502
2023-02-09 18:06:57 +00:00
Dan Voiculeasa 4df485a754 debian: Fix fm bootstrap
This work is part of Debian integration effort.
This fixes issues seen during bootstrap.
This work unifies and enhances:
https://review.opendev.org/c/starlingx/fault/+/833935
https://review.opendev.org/c/starlingx/fault/+/834950

Package binary to correct location.
Fix configuration file ownership.
Let debhelper install the services. Add systemd preset.

Tests on Debian:
PASS: build-pkgs && build-image
PASS: install iso && check the 2 services
PASS: bootstrap with fm workarounds
PASS: unlock

Depends-On: https://review.opendev.org/c/starlingx/fault/+/836660
Story: 2009101
Task: 44321
Co-authored-by: Chuck Short <charles.short@windriver.com>
Co-authored-by: aoliveir <adriano.oliveira@windriver.com>
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: I7d460bb7a3ffba429fce42e6dab72fc88e2bc885
2022-04-09 17:51:12 +00:00
Dan Voiculeasa be2ceec7a9 Rework fm-mgr Makefile and spec
Move service installation out of the Makefile.
This will let Debian build system control the service installation.

Test on CentOS:
PASS: build-pkgs && build-iso
PASS: install iso & fminit service exists
PASS: bootstrap & unlock

Story: 2009101
Task: 44321
Change-Id: I244c078b19fb0817fcd9ac3c2b026a32024dd1c9
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
2022-04-09 16:32:24 +00:00
Joao Victor Portal 7fd26e0d15 Fault Management API request audit logging
Here is added a hook to the WSGI compliant Pecan server that receives
the Fault Management API requests. This hook logs the needed request
data to "/var/log/fm-api.log". All requests are logged except the
ones of "GET" type.

The code is a port from the same hook that exists in
"starlingx/config" repository, also called "AuditLogging".

Note: there are no "POST" or "PUT" requests available in Fault
Management API v1.

Test Plan:

PASS: Successfully deploy an AIO-SX and verify that the logs of
"fm-api" service are present in file "/var/log/fm-api.log".
PASS: In the deployed AIO-SX, execute command "fm alarm-list" and
check that no GET requests was logged in "fm-api.log".
PASS: In the deployed AIO-SX, execute command "fm alarm-delete 1111"
and check that a "DELETE /v1/alarms/1111" request was logged in
"fm-api.log" with status "404".
PASS: In the deployed AIO-SX, execute command
"fm event-suppress --alarm_id <alarm_id>" and check that a
"PATCH /v1/event_suppression/<uuid>" request was logged in
"fm-api.log" with status "200".
PASS: Successfully build all packages of this repository as Debian
packages: fm-api, fm-common, fm-doc, fm-mgr, fm-rest-api and
python-fmclient.

Story: 2009824
Task: 44468

Depends-On: https://review.opendev.org/c/starlingx/config-files/+/828200
Signed-off-by: Joao Victor Portal <Joao.VictorPortal@windriver.com>
Change-Id: I25bf662ed9e792b30ae1f90329bd35b918f0a5f7
2022-02-18 00:39:43 -03:00
Tracey Bogue 3c943a5a78 Add Debian packaging for fm-mgr and fm-rest-api
Story: 2009101
Task: 43369

Signed-off-by: Tracey Bogue <tracey.bogue@windriver.com>
Change-Id: I6631aeb142ce2c9ccfb78cdc8e340c98b9115ce0
2021-10-20 06:22:36 -05:00
Eric MacDonald 581495082a Make small modification to fm's logrotation configuration file
This update makes the following changes to the fm logrotation config file

 - add 'create' with permissions to each tuple
 - add 'delaycompress' as a local setting to each log entry
 - remove 'nodateext' global and local setting

Test Plan:

PASS: Verify fm logs rotation behavior
PASS: Verify fm logs delaycompress setting behavior
PASS: Verify log permissions after rotate

Change-Id: Ibe8bd8107501df947b5091e928de202378ef4ea8
Partial-Bug: 1918979
Depends-On: https://review.opendev.org/c/starlingx/config-files/+/784943
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2021-04-09 09:15:40 -04:00
Teresa Ho 679475b06f Add auto-versioning to starlingx/fault packages
This update changed the TIS_PATCH_VER to use the PKG_GITREVCOUNT
variable to auto-version the packages.

Adds an upper constraint to fm-rest-api to pass zuul.

Story: 2006740
Task: 39842

Change-Id: I4a180f1395ff9764ecc9d617a514e265db670b9c
Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
2020-05-27 15:19:34 -04:00
Sharath Kumar K c63ad80c23 De-branding in starlingx/fault: Titanium Cloud -> StarlingX
1. Rename Titanium Cloud to StarlingX for .spec files
2. Rename Titanium Cloud to StarlingX for .service file

Test:
After the de-brand change, bootimage.iso has built in the flock layer
and installed on the dev machine to validate the changes.

Please note, doing de-brand changes in batches, this is batch2 changes.

Change-Id: I63ab8cda38c45240198f37d1f30c95e0b02da3e1
Story: 2006387
Task: 36204
Signed-off-by: Sharath Kumar K <sharath.kumar@intel.com>
2020-04-03 08:24:26 +02:00
Erich Cordoba d235681165 Add missing Requires to fault components for opensuse
Some of the fault components rely on having all the dependencies
installed in the StarlingX ISO so having missing dependencies listed
in the spec files is not an issue. However, when we take those compo-
nents and run them in a non StarlingX installation these problems
started to arise.

This patch is the result of the analysis of all imports and a manual
execution of the fault components in opensuse. This is a summary of
the findings:

- fm-api: This component imports `fm_core` which is provided by
          `fm-common` but not listed in the dependencies. Same
          case for `six` module.
- fm-mgr: `fmManager` links to `libfmcommon` but is not listed in the
          requirements. Also, it expects to find the `/etc/fm/events.yaml`
          file which is provided by `fm-doc`.
- fm-rest-api: A set of imports that are missing. This component also
               depends on other StarlingX compoments.
- python-fmclient: Missing python imports.

Story: 2006684
Task: 36971

Change-Id: I6719ab8a8d9a35d105be1c6f7dac57b855da543e
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-10-08 18:24:30 -05:00
Erich Cordoba 61d9addb2c Delete _service files from git.
These files are part of OBS infrastructure and shouldn't be part of
this repository.

Story: 2006508
Task: 36862

Change-Id: I8cc056a49a888352d8dbb03b2a55e86549e6a45a
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-09-30 13:27:21 -05:00
Zuul c0c901620a Merge "Adding rpmlintrc files for opensuse building" 2019-09-30 15:51:07 +00:00
Erich Cordoba 6da9811491 Set version to 1.0.0 in opensuse specfiles
All opensuse version are being standardize with the same format,
this requires that all components will change from 1.0 to 1.0.0.

Story: 2006508
Task: 36811

Change-Id: I301759895e4ed816633daa6595d5f60f2f1d59c7
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-09-25 15:35:15 -05:00
Erich Cordoba c9755220c3 Adding rpmlintrc files for opensuse building
The rpmlintrc files helps to configure the behavior of the rpm linter
executed by the opensuse build system. This patch adds the rpmlintrc
files that were defined in the opensuse build system.

Story: 2006508
Task: 36799

Change-Id: If75264e809bb78bbcff1dd474b1a5fc1819ac193
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-09-25 06:16:04 -05:00
Erich Cordoba 6f0ec9c4fc Change %autosetup for opensuse specfiles
As the tarballs are now created by the _service definition in the
opensuse build system, it requires now to include the specfiles
within the tarballs. This means that the `-n` option needs to be
set for `%autosetup`.

Story: 2006508
Task: 36780

Change-Id: Ib89a440d4911200ead2a3a35d731564e86b0b447
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-09-24 15:17:28 -05:00
Erich Cordoba 79b32861f0 Change tarball extension from xz to gz in opensuse specfiles.
In the opensuse build system (OBS) the `_service` files are being
standardized to generate tarballs with gz compression. The fault's
specfiles were created before this decision, therefore an update
in the extension is required.

Story: 2006508
Task: 36670

Change-Id: I96cb185a9a0e089e4f8e184e8fdeaa709f77915e
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-09-17 17:30:00 -05:00
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 eb8601d6ee Merge "Add files for fm-mgr deb packaging" 2019-06-13 14:46:41 +00: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
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
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
Luis Botello 845f41a85c Improve security by avoiding buffer overflows
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
2019-01-08 09:55:07 -06:00
Erich Cordoba 81dccc9b83 Stardardize makefile for fm-mgr
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>
2018-12-05 15:24:28 -06:00
Tao Liu 80afa6133f Update the License in FM packages
The fm-rest-api setup.py and fm-mgr spec file have incorrect
License.

This update changes the license to Apache-2.0 in setup.py and
and the spec file.

Change-Id: Id923baac0c54fb1feb38069dad73dfd13dbf1d39
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2018-09-05 21:35:07 -04:00
Tao Liu c8159ea6cb Decouple Fault Management from stx-config
Create fault management REST API service
Create fault management client and CLI shell
Add a python extension for fault management application APIs
Update fault management python APIs to use the python extension
Update fault manager to retrieve the SNMP configuration from the config file

Story: 2002828
Task: 22747

Depends-On: https://review.openstack.org/#/c/592176/
Change-Id: I888d8d23edf75d05d51594ccca55570ae366c848
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2018-08-16 13:23:33 -04:00
Sen Yang 028996cd56 Update Logrotate rules
Change size of fm-event.log to 100M.

Change-Id: Ibed791cd41d202a8470d7de573e992d527f41406
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2018-06-29 09:04:21 -04:00
Dean Troyer 6cd8940170 StarlingX open source release updates
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-05-31 07:36:00 -07:00