wrsEventMessage traps are being managed as wrsAlarmMessages.
Events do not contain wrsEventProposedRepairAction and
wrsEventSuppressionAllowed fields, so they need to generate a default
value in FM.
This commit adds those fields in order to create the event traps
with the same format as the alarm traps.
Depends-on: https://review.opendev.org/c/starlingx/snmp-armada-app/+/892624
Partial-bug: 2032844
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I58577406cc75c597f6f430015ddd51d0029d4539
With sphinx version update, it is raised a warning (treated as
error) with the 'language = None' configuration. The default value is
'language = en' which has the same behavior.
Test plan
PASS: Run tox and check it ends successfully.
Closes-bug: 2033412
Related-Bug: #1976377
Change-Id: Ie003c0a02fcfc6f237ae5b3efb259de6748077ad
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
400.001 and 400.002 alarms are tagged for openstack but should be
starlingx.
This change tags them to starlingx so the documentation scripts are
able to classify them correctly.
Test plan
PASS: Check the parsing scripts end successfully.
Closes-bug: 2028379
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I8f5966d5b0a7b82198e4bc2e735fa4536a4cdd0a
This story shall update the README file of a few most used StarlingX
repos.
Test Plan: N/A
Story: 2010814
Task: 48379
Change-Id: I98483245931c5d764c662f5283c59da0b2d69efe
Signed-off-by: Roger Ferraz <rogerio.ferraz@encora.com>
Since the alarm documentation has been automated and the events.yaml
file is taken as source of truth for it, it is required to link
the alarms proposed repair action with a direct link to the
documentation for the users.
This change modifies the mentions of documentation to a proper link,
using Sphinx placeholder that are interpreted by the documentation
language.
Test plan
PASS:
* Build fm-doc package. Check that all parsing checks were run and
package was built successfully.
Closes-bug: 2022104
Change-Id: Iccb34e42ed80634d73cf7549e9230976579deef7
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
The 250.002 alarm has been deprecated long time ago.
This change deletes it from the alarm list.
Test plan:
PASS:
* Build fm-doc and fm-api packages.
* Check that all parsing checks were run and package was built
successfully.
Depends-on: https://review.opendev.org/c/starlingx/distcloud/+/886001
Closes-bug: 2024010
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I0180bd5addc1feae6e3e45edd24c1f50d6622e2c
Some alarms reference to "System Administration Manual" but this
document does not exist. It was changed to a generic documentation
reference.
The 800.103 alarm has been deprecated so it is deleted from the
events.yaml file.
Test plan
Pass:
* Build fm-doc package. Check that all parsing checks were run and
package was built successfully.
Closes-bug: 2022104
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I4723d05e77983796a0f64c7242f5c2bcf4699763
yaml.load will report a warning in pyyaml 5 and an error
in pyyaml 6 if it is called without a Loader argument.
The no-member pylint error was being suppressed due to
legacy http code, so now that is un-suppressed globally
and the yaml.load is replaced with yaml.safe_load
Test Plan:
PASS: tox
PASS: yaml.load('events.yaml') returns the same content
as yaml.safe_load('events.yaml')
Story: 2010642
Task: 48157
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ibac118cd9555f3334251b10a6b3e0a5986285854
This change adds a parsing check to ERROR if Context field is Empty.
Until now there had not been a requirement of non empty fields, so in
case this is needed in the future for other key/values, a collection is
created.
Test plan
PASS: * Add/modify an alarm/log in events.yaml file with Context field
set to <Empty>.
* Run the checkEventYaml script and check it fails.
PASS: * Check that all the events in events.yaml file have the Context
field set to a non empty value.
* Run the checkEventYaml script and check it ends successfully.
Closes-bug: 2020381
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: Ia267886dd49099525751165975fb5d291c0c6f82
System config update alarms are 900.6xx series
The new alarms are originated by a new type of vim strategy
orchestrating configuration update.
The new alarms are similar in numbering and wording as the
kube upgrade auto apply 900.4xx series alarms and logs.
System config update in-progress alarm is 900.010.
System config update aborted alarm is 900.011.
Story: 2010719
Task: 47947
Change-Id: Ieb6e68adf359ac7b0489d15bb33cb4b4a9f3ef3f
Signed-off-by: Yuxing Jiang <Yuxing.Jiang@windriver.com>
Product Documentation is missing the alarm 900.007 'Kubernetes upgrade
in progress.'
That alarm has the Context field set to none. In order to be included
in stx documentation, it has to be set to Context: starlingx.
Test plan:
PASS: Run documentation generating scripts and check the alarm is now
included.
Closes-bug: 2019146
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I4d4867e5299e3fb1eb37c9bcd3e53447d4f08ba5
This commit is intended to update the 260.002 alarm. As the 'severity'
is set to 'minor', it is desired to classify it as
non-management-affecting by adjusting its Management_Affecting_Severity
value to 'none'.
Test Plan:
PASS: Build and install Debian package.
Story: 2010719
Task: 47938
Change-Id: Ie228191ebdda5f2651dab1309b929ae06bc1f7f6
Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
This commit adds a new alarm id and definition for resources
that has INSYNC=False.
The alarm will be raised when a resource is not
synchronized during a process of update. It will be cleared when
the resource is synchronized again.
Test Plan:
- Verify successful tox test and package build
- Verify the alarm can be raised using FmClientCli
Story: 2010719
Task: 47910
Change-Id: I24a976ed4beaa8248df25fd97eeee27f5754b969
Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Updating the rsa ssh host key based on:
https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/
Note: In the future, StarlingX should have a zuul job and
secret setup for all repos so we do not need to do this
for every repo.
Needed to rename the secret, because zuul fails if like-named
secrets have diffent values in different branches of the same
repo.
Partial-Bug: #2015246
Change-Id: Id0caa3ad6efbaed9fff904c6fab8ba35472ee6f5
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Some documentation generating scripts were introduced in order to avoid
manual intervention every time an alarm/log is changed/added/removed.
Those scripts required a way to know where the alarm/log belongs to.
For that requirement, the field Context was introduced in previous
commits. During that development, it was taken the current
classification at that time in the docs as source of truth, but it was
outdated.
This commits modifies the values that were detected as wrong/outdated.
The scripts also require the value 'none' in the Context field for when
an alarm/log should not be included in the documentation but still be
defined in the events.yaml file. So the Context value is updated for
that case too.
Context incorrectly tagged as openstack and changed to starlingx:
* 900.006
Context incorrectly tagged as starlingx and changed to openstack:
* 100.105
* 100.112
* 100.113
* 300.001
* 300.002
Closes-bug: 2012981
Test plan
PASS: Since the Context field does not have impact in functionality,
build and install fm-doc package successfully.
Check the file in the filesystem contains this change.
PASS: Trigger random alarms and check FM functionality.
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I16f858bbb712349f08b2ceca33152e365b0ed733
Currently, there is no alarm for Restore in progress.
Because of this, the system is shown as healthy,
before restore has been completed.
This new alarm will prevent the system from being healthy
until restore has properly been completed.
TEST PLAN
PASS: On any available system, the following commands can
be triggered at anytime:
* Run "system restore-start" to trigger alarm
* Run "system restore-complete" to clear alarm
Story: 2010117
Task: 47689
Signed-off-by: Joshua Kraitberg <joshua.kraitberg@windriver.com>
Change-Id: I292b5c8083c08b68ac757fe5a650989178eb819f
When a 800-Series alarm occurs, users refer to the documentation to
know what kind of error is shown. But sometimes that is not enough
information.
The output of some commands can be useful information and could
save time when solving issues related to the storage alarms.
Closes-bug: 2004601
Test plan
PASS: * Build fm packages and deploy an ISO containing new fm
packages.
* Trigger alarms that were modified by this commit,
(e.g. shutdown a controller).
* Run fm alarm-list --uuid and copy the uuid of a 800-series
alarm.
* Run fm alarm-show <uuid> and check that the field
has changed.
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I94e2719b55b4fc14b692439526b5b47204460ac7
Added in the following tox targets for fm-rest-api:
- bandit
- flake8 / pep8
- pylint (suppressing most of the codes)
All the tox targets run on python3
The test-requirements.txt have been updated
The StarlingX Debian upper constraints are utilized.
The spec-lint (rpm) job is removed from Zuul.
Zuul runs pylint for sub directories
Bandit exclusions are updated.
Included a change to a .py file to trigger
the bandit zuul job.
Test Plan (for fm-rest-api)
PASS: tox -e bandit
PASS: tox -e coverage
PASS: tox -e flake8
PASS: tox -e pylint
Story: 2010531
Task: 47575
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I7ecaf1c90495b283c26e02e3b481bfe4c77c3939
The checkEventYaml script verifies if all contents
are properly populated for the events.yaml file.
This change ensures that check is done by zuul, rather
than during the build.
yaml.load after version 5.1 requires a Loader argument.
The yaml.load in fm-doc are now updated to use safe_load
intead
Test Plan:
PASS: tox -e linters
PASS: remove 'context' field from an alarm and observe
that tox -e linters reports a failure.
PASS: build-pkgs -p fm-doc
Story: 2010531
Task: 47549
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I369ffe4c74fcaf5fe4a916822fed18a78ead8ff8
Removal of stale alarm 270.001(Host compute service failure)
is raised by the vim. This might be an old reference to nova.
It’s likely not in use since stx.
Test Plan:
PASS: Verify with a load without the changes (removal of alarm)
and the event log in platform.log shows an entry for 270.001 alarm.
PASS: Verify with a load with changes of alarm removal and
the event log in platform.log does not show an entry for 270.001 alarm.
Closes-Bug: 2004744
Change-Id: I47a9f5cede2cfade4a16c63a2dc1bcfd563e88cf
Signed-off-by: Vanathi.Selvaraju <vanathi.selvaraju@windriver.com>
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
The python2.7 jobs will no longer be executed as part
of the zuul check and gate.
This also removed the unused devstack job for stx/fault
Story: 2010531
Task: 47304
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I308a067e6ca23e45b7f5539853d7bb28f31bb7f5
For dynamic bash completion, instead of using the legacy
/etc/bash_completiond.d, the current bash-completion can use a
dynamic mechanism in which the customized completion is called
upon completion activation.
The new location that is already pointed by the .bashrc file,
also engaged by the /etc/bash_completion, is
/usr/share/bash-completion/completions.
However, the bash file was placed under a subfolder with the
name of the command which is not necessary since the file already
contains the command name.
Also, the proper file name shall contain .bash extension.
Closes-Bug: 2001553
Test Plan:
PASS: Build python-fmclient package.
PASS: Build Debian image and install it successfully.
Verify fm.bash is installed under /usr/share/bash-completion/completions
PASS: Verify bash completion is working as expected:
Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I3b796d26633459b98d7555e48e0bf5ea01c630d3
This change will allow this repo to pass zuul now
that this has merged:
https://review.opendev.org/c/zuul/zuul-jobs/+/866943
Tox 4 deprecated whitelist_externals.
Replace whitelist_externals with allowlist_externals
Removed the 'build' target from zuul which just invokes
the devstack script which is un-supported.
Partial-Bug: #2000399
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I59bd7c82c297e12969e31b5de9ac02d2a47834a6
The Zuul upper-constraints env variable declaration needed
to be added to tox.ini otherwise an older constraints
was being used which does not work with newer
versions of python.
Partial-Bug: #1997255
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ie912dc7ae3f9f1639311f0c1f5cf62070f44909d
Move the packages of "fault" from stx-std.lst to debian_iso_image.inc
Test Plan:
Pass: build-pkgs -c -a
Pass: build-image
Pass: boot
Story: 2008862
Task: 46841
Signed-off-by: Yue Tao <yue.tao@windriver.com>
Change-Id: Ic58349d7b1adce50fb28c6c843967da8c908dd02
The events.yaml file contains every alarm and log used by platform and
openstack. There is no way to know which one relates to one or
the other.
In order to know that, it is required an additional field as part of
each record to differential between platform and openstack.
Story: 2010143
Task: 46723
Test plan
PASS: Build the fm-api and fm-doc packages.
Install fm-api first and then fm-doc.
No errors are found during build and installation process.
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I8598afc77d27d107c4f9a108dd46b2ebc79b30a1
This change reorganizes the source directories of the stx-fm-rest-api
container to be reused by both CentOS and Debian Dockerfiles in order
to build the images having the corresponding OS-specic base.
As part of this, the fm-api, fm-rest-api, fm-common and
python-fmclient packages have been ported in order to generate deb
files that contain .whl.
Test plan:
PASS: Build debian iso and perform fresh install. Verify fm commands are
working as expected.
PASS: Build python3 wheels tarball on Debian. Verify fm, fm_api, fm_core
and fmclient .whl files are added.
PASS: Build Debian-based container and push it to a public registry.
Apply openstack application and update the fm-rest-api url to pull
this new image. Verify that:
- pods are up and running with the new image/tag specified.
- the container is running on Debian.
- from inside the container, fm querys are working as expected.
Story: 2009831
Task: 46634
Depends-On: https://review.opendev.org/c/starlingx/config/+/862498
Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I2b35139f8775141e39f97a5a6037c5de2b4d5d76
The CLI error messages for users with reader role were not clear to the
operator and this change fixes this.
Test Plan:
PASS: In an AIO-SX with this change present, create a new openstack user
with reader role and through this user execute the commands:
fm alarm-list
fm alarm-delete <uuid>
fm event-suppress --alarm_id <alarm_id>
and check that the "alarm-list" command is executed without errors and
that the error message of the other commands changes from:
"HTTP Client Error (HTTP 403) (Request-ID: req-<req_id>)"
to:
"Error: Forbidden."
Story: 2010149
Task: 46620
Signed-off-by: Joao Victor Portal <Joao.VictorPortal@windriver.com>
Change-Id: I45007a7f5319ef0a0238a07d671a859b5081660a
When compute services remain healthy:
- listing alarms shall not refer to the below Obsoleted alarm
- 200.012 alarm hostname controller function has an in-service failure
This update deletes definition of the obsoleted alarm and any references
200.012 is removed in events.yaml file
Also updated any reference to this alarm definition.
Need to also raise a Bug to track the Doc change.
Test Plan:
Verify on a Standard configuration no alarms are listed for hostname
controller in-service failure
Code (removal) changes exercised with fix prior to ansible bootstrap
and host-unlock and verify no unexpected alarms
Regression:
There is no need to test the alarm referred here as they are obsolete
Closes-Bug: 1991531
Signed-off-by: Girish Subramanya <girish.subramanya@windriver.com>
Change-Id: I255af68155c5392ea42244b931516f742fa838c3
The fmClientCli binary can create and delete alarms freely on the
system, so the access to this binary should be restricted to Linux admin
users.
Test Plan:
PASS: Deploy an AIO-SX using a Debian image containing this change and
check that the permissions for file "/usr/local/bin/fmClientCli" is
"-rwxr-x---" and the owner:group is root:root.
PASS: Repeat the test above using a CentOS image.
Closes-Bug: 1991118
Signed-off-by: Joao Victor Portal <Joao.VictorPortal@windriver.com>
Change-Id: I0375ddc68ae1b5967447a326780272f77695793a
Remove the fm-rest-api preset file since it will
be managed centrally going forward and not on per-package basis.
Test Plan
Build Package
Build ISO
Install ISO
Check for non-existant
/etc/system/system-preset/fm-reset-api.preset
Story: 2009968
Task: 46406
Depends-On: https://review.opendev.org/c/starlingx/integ/+/853653
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: Ic3ec52bfb985c9e06d654476e6913ab897b67eb2