84 Commits

Author SHA1 Message Date
Joshua Reed
588ed19fa9 Auto-increment chart versions
Enable auto-versioning of helm charts to ensure the FluxCD helm
controller recognizes chart changes.

To guarantee the helm chart version is incremented when a helm chart
change is submitted, the following is implemented:
 - Provide a top level hierarchy for helm charts to differentiate
   between upstream and custom charts: helm-charts/{custom,upstream}
 - Arrange exiting helm chart in appropriate helm-charts location.
   Custom for helm. Charts built and maintained in this repository.
   Upstream for directly used and/or directly used plus patched.
 - stx-APP-helm now contains only manifests and final application
   packaging rules. No custom helm charts should be delivered here.
 - Use StarlingX debian git revcount packaging mechanisms to derive the
   semver PATCH version for custom helm charts. Chart
   version (MAJOR.MINOR.PATCH) is passed to 'helm package' command to
   force the version, where PATCH == 'git revcount'
 - Use StarlingX debian git revcount packaging mechanisms to derive the
   semver BUILD version for upstream helm charts which maintains the
   upstream chart version and adds a versioned BUILD extension.

     <version core> ::= <major> "." <minor> "." <patch>
     <valid semver> ::= <version core> "+" <build>

   Chart version (MAJOR.MINOR.PATCH+STX.REV) is passed to 'helm package'
   command to force the version, where REV == 'git revcount'
 - Establish a new package(s) for the custom or upstream helm chart(s).
 - Enforce a baseline version for all helm charts; eg 'APP-helm'.
    Maintain current rev counts for all new packages, where applicable.
- Update 'stx-APP-helm' to:
   - Update the build dependencies to include the new helm chart package
     and remove dependency on helm
   - Update the rules to remove building the dependency APP helm chart(s) and
     automatically update the chart versions in the FluxCD
     helmrelease.yaml files.

Test Plan:
PASS - Build all packages generating an application tarball verifying
       all versions on the charts and application make sense.
PASS - Introduce temporary chart changes and ensure that the versions
       increment as expected.
PASS - Validate basic application lifecycle operations:
       upload/apply/remove/delete.

Story: 2010929
Task: 49587

Change-Id: I5da2d75e3da13e3419beccf591ff5b97e526ba4c
Signed-off-by: Joshua Reed <joshua.reed@windriver.com>
vf/bookworm vr/stx.9.0
2024-02-28 10:45:27 -07:00
Igor Soares
a0292e8c7c Add minimum Kubernetes version supported
Add the supported minimum Kubernetes version into the application
metadata file.

The minimum Kubernetes version is set to 1.24.4 and should be changed
accordingly for future application updates.

The "supported_k8s_version:minimum" field is optional but it will become
mandatory in the near future.

This also contains a fix to properly trigger the Tox metadata checks.

Test Plan
PASS: build-pkgs && build-image
PASS: Apply application

Story: 2010929
Task: 49502

Change-Id: I34cfd46db920be0eaabc3a47bdb1ad9412203f40
Signed-off-by: Igor Soares <Igor.PiresSoares@windriver.com>
2024-02-06 12:51:15 -03:00
Igor Soares
6917a3f5b2 Application versioning based on build release
This change will automatically adjust versioning of the application
tarball and python plugins to reflect the same version reported by
SW_VERION in /etc/build.info.

Test plan:
PASS: build-pkgs -a & build-image
PASS: Confirm that the tarball version matches the platform version
PASS: Apply application

Story: 2010929
Task: 49351

Change-Id: I62934c3392b36101f99da6ca6be5e6d036b315bb
Signed-off-by: Igor Soares <Igor.PiresSoares@windriver.com>
vf/kernel-6.6
2023-12-29 12:30:54 -03:00
Reed, Joshua
90c26d0125 Update app Zuul Check Jobs.
Modify code to conform to flake8 and pylint.

Jobs are now flake8, pylint, py39 and metadata.

Test Plan
PASS - All zuul jobs pass as expected.

Story: 2010929
Task: 49281

Change-Id: Ic15c987fd4bf083f7483bb14ab80356a194e9dfc
Signed-off-by: Reed, Joshua <Joshua.Reed@windriver.com>
2023-12-18 09:13:07 -07:00
Zuul
3888fc4094 Merge "Use FQDN for MGMT network" 2023-11-02 20:41:19 +00:00
Fabiano Correa Mercer
7b0de8749c Use FQDN for MGMT network
The management network is used extensively for all internal
communication.
Since the original use of the network was a private network before
it was exposed for external communication in a distributed cloud
configuration, it was never designed to be reconfigured.

To support MGMT network reconfiguration the idea is to configure the
applications to use the hostname/FQDN instead of a static MGMT IP
address.

In this way the MGMT network can be changed and the services and
applications will still work since they are using the hostname/FQDN
and the DNS will be responsible to translate to the current MGMT
IP address.

The use of FQDN will be applied for all installation modes: AIO-SX,
AIO-DX, Standard, AIO-PLUS, and DC subclouds. But given the
complexities of supporting the multi-host reconfiguration,
the MGMT network reconfiguration will focus on support for AIO-SX
only.

The DNSMASQ service must start as soon as possible to translate
the FQDN to IP address.

Test plan ( Debian only )
 - AIO-SX and AIO-DX virtualbox installation IPv4/IPv6
 - Standard virtualbox installation IPv6
 - DC virtualbox installation IPv4 ( AIO-SX/DX subclouds )
 - AIO-SX and AIO-DX installation IPv4/IPv6
 - AIO-DX plus installation IPv6
 - DC IPv6 and subcloud AIO-SX
 - AIO-DX host-swact
 - DC IPv4 virtualbox with subcloud AIO-DX and AIO-DX
 - AIO-SX to AIO-DX migration
 - netstat -tupl ( no services are using the MGMT IP address )
 - Ran sanity/regression tests

Story: 2010722
Task: 48468

Depends-On: https://review.opendev.org/c/starlingx/config/+/886208

Change-Id: I10c19b0cb7625e473fc95a36fbddb5f7cc660d6a
Signed-off-by: Fabiano Correa Mercer <fabiano.correamercer@windriver.com>
2023-10-26 15:56:51 -03:00
Agustin Carranza
14d8d43585 Update stx-fm-trap-subagent tag to stx.9.0-v1.0.2
This change updates the stx-fm-trap-subagent image tag to stx.9.0-v1.0.2
due to the fix of the following bug:
https://review.opendev.org/c/starlingx/snmp-armada-app/+/892624

Test Plan:
PASS: Apply snmp app with new tags introduced. Verify pod is up and
running. Describe pod and verify that the new tag is used.

Depends-on: https://review.opendev.org/c/starlingx/root/+/893818
Depends-on: https://review.opendev.org/c/starlingx/fault/+/892710

Closes-bug: 2032844

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: Idaa83357d632944b7ac530d8eea22869a5aabf0f
2023-09-06 16:11:44 -03:00
Agustin Carranza
b9f45f28c4 Add missing fields for Event traps
wrsEventMessage traps are being managed as wrsAlarmMessages.
Events do not contain wrsEventProposedRepairAction and
wrsEventSuppressionAllowedf fields.
They are now receiving a default value generated in FM.
This commits adds those fields in order to format the event traps
like the alarm traps.

Test plan:
PASS: Install snmp application. Generate an event and check that
the trap is specified with the new values.

Partial-bug: 2032844

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I5467b5a7bc6e903c629965f86dfaafd468738c8e
2023-09-04 13:02:35 -03:00
Agustin Carranza
f67c66e1e3 Remove --use-deprecated legacy-resolver flag
The pip team is planning to depreciate the
'--use-deprecated legacy-resolver' install option.

This change removes the option and fixes requirements inconsistencies.

Test Plan:

PASS: Verify that tox runs without issues.
PASS: Build snmp package and install it.
PASS: Upload and apply snmp application and check if pod
      is running.
PASS: Perform snmpget/bulk/walk commands and verify they work.
PASS: Check traps are generated.

Closes-bug: 1966075

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: Ib7fd2cdea5bbd62a7462827971485fd5121ebdce
vf/antelope
2023-07-20 18:09:57 -03:00
Enzo Candotti
c7d206abbf Update Debian base image to version 11
An update on the Debian container specified as 'debian' produced that
some packages like libpython2.7 and postgresql-13 were not found,
causing the daily builds to fail.

This commit specifies the version to be used as a base image in order to
fix that problem.

Test Plan:
PASS: Build stx-snmp, stx-fm-trap-subagent and stx-fm-subagent. Verify
all the containers can be built properly.

Closes-Bug: 2023703

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: Ic4a2c69ea97ecfea3463c09d6de1b5c9dcdde6d3
2023-06-14 00:42:15 -03:00
Davlet Panech
aa5a8ddf0f Fix github mirroring for this repo
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: I2887edda6b37e9808975ba05437f189b052514cd
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2023-04-28 12:38:53 -04:00
Enzo Candotti
3e2653c3f1 Update snmp tags to stx.9.0-v1.0.1
This change updates the snmp image tags to stx.9.0-v1.0.1 as they
need to be updated in order to fix a big number of reported CVEs.

Test Plan:
PASS: Apply snmp app with new tags introduced. Verify pods are up and
running. Describe pods and verify that the new tags are used.

Story: 2010710
Task: 47872

Depends-On: https://review.opendev.org/c/starlingx/root/+/881282

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I83a5f87cbe57a3ca5e5b474858713ac7f57a2c34
2023-04-21 22:10:27 +00:00
Agustin Carranza
196330bfd5 Update stx-fm-subagent image tag to stx.9.0-v1.0.1
This change updates the stx-fm-subagent image tag to stx.9.0-v1.0.1
due to the fix of the following bug:
https://review.opendev.org/c/starlingx/snmp-armada-app/+/879689

Test Plan:
PASS: Apply snmp app with new tags introduced. Verify pod is up and
running. Describe pod and verify that the new tag is used.

Depends-on: https://review.opendev.org/c/starlingx/root/+/880335

Closes-bug: 2015408

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I383a747867a8460702e199c928789638b7257ed6
2023-04-13 14:21:07 -03:00
Agustin Carranza
8a6171fce0 Refresh DB session after swact in fm-subagent
After running a swact command, the snmp pod crashed and generated a
coredump. That behavior was due to an invalid reference for the DB
handler.
This change adds a new function to renew the session after the
first failure (this happens after swact) in the connection.
During the retries, the session in renewed and the reference is
restored. So the coredump is now avoided.

Test plan
PASS: * Deploy a multinode configuration (e.g. AIO-DX).
      * Install the SNMP application.
      * Perform a snmpget/snmpwalk/snmpbulk operation related to FM,
        to the floating IP, e.g. WRS-ALARM-MIB::wrsAlarmActiveAlarmId.1
      * Perform a swact operation.
      * Repeat the snmp operation.
      * Both operations succeed and no coredumps are found in the
        filesystem of all controllers.

Closes-bug: 2015408

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: Idf5e8717c4f9605a3a7c1eaee1eb87e38bc305e4
2023-04-10 11:32:34 -03:00
Zuul
a370f0d288 Merge "Update snmp metadata for upgrade support" 2023-03-27 20:31:42 +00:00
Enzo Candotti
c2c41c11b0 Update snmp metadata for upgrade support
This change updates the metadata of the snmp application
tarball to mark the app as platform managed and eligible for automatic
upgrades. The application framework will now properly upgrade
snmp when a newer version is installed on a system.

Test plan:
PASS: Build and deploy updated snmp
PASS: Patch system to update snmp application, verify that
app is automatically upgraded.

Story: 2010628
Task: 47704

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I3ab7fc772114e1dab09fc44b85cdd01f3b883b25
2023-03-27 20:22:24 +00:00
Fabricio Henrique Ramos
136dc6f8b4 Remove armada
Depends-On: https://review.opendev.org/c/starlingx/config/+/869094

Story: 2010560
Task: 47609

Signed-off-by: Fabricio Henrique Ramos <fabriciohenrique.ramos@windriver.com>
Change-Id: I8de3d7b195c17bc43e9c2b38816c78653edc1b69
2023-03-20 10:44:44 -03:00
Leonardo Fagundes Luz Serrano
7e8fd4a6c4 Updated app tarball version
Currently, the debian build system produces a debian package version
with the format: "1.0-1.stx.<revision>"

The rules file then parses this deb pkg version at build time
to produce the app tarball version, which always comes up to
be "1.0-1" at this time [1]. This commit changes the app tarball
version calculation so that the resulting tarball version will
be "1.0-<revision>" [2].

This correction is necessary because the application framework
cannot update an app between instances with the same version.

This commit is part of a set of commits updating the app tarball
version calculation to all apps based off of [3].

[1]: /usr/local/share/applications/helm/<APPNAME>-1.0-1.tgz
[2]: /usr/local/share/applications/helm/<APPNAME>-1.0-<N>.tgz

[3]: https://review.opendev.org/c/starlingx/cert-manager-armada-app/+/872628

Test Plan:
pass - build-pkg
pass - tarball version updated

Story: 2010542
Task: 47532

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: Icf994e4663349a87ad47690045f2952a74e2c977
2023-03-02 14:51:43 -03:00
Leonardo Fagundes Luz Serrano
bae091977c Standardize app configs
Fixed versioning and adjusted some build files
to bring them as close to a standard as possible.

- Removed centos files
- Added version tracking via GITREVCOUNT
- Fixed mismatch in plugin name, set to python3-k8sapp-<app>
- Standardized plugin debian files (rules, *.install)
- Plugin wheels saved to /plugin instead of /plugin/<app>

Test Plan:
PASS - Build-pkgs -a
PASS - Build-image
PASS - Install, bootstrap, unlock
PASS - app tarball contains wheel file
PASS - wheel versioning updated properly

Story: 2010542
Task: 47178

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: Ie78d5685b973a30bc253068968b46833952c112b
vr/stx.8.0 __v.stx.test2
2023-01-31 14:10:03 -03:00
Al Bailey
e8b3436b1d Update tox.ini to work with tox 4
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

Partial-Bug: #2000399

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I9d181840a5471386675d0fe0bd134da8bda5b2cb
2022-12-27 01:46:37 +00:00
Leonardo Fagundes Luz Serrano
311aef50e0 appfwk: set flux reconciliation interval to 1m
Set reconciliation interval for all flux helm resources to 1m
to allow it to manage resources by itself in a reasonable time
interval.

Test Plan (tested as part of [1]):
PASS: bootstrap
PASS: unlocked enabled available
PASS: apps applied
PASS: inspect flux pod logs for errors
PASS: re-test known trigger for 1996747 and 1995748
PASS: re-test known trigger 1997368

[1] https://review.opendev.org/c/starlingx/config/+/866862

Partial-Bug: 1999032

Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Change-Id: I068bf7268f8e16a3608e095b0e851d366aa7bde6
2022-12-07 19:30:24 +00:00
Yue Tao
8d3f42d796 snmp-armada-app: update debian_iso_image.inc
Move the packages of "snmp-armada-app" from stx-std.lst
to debian_iso_image.inc.

A subsequent commit will be sent to clean up stx-std.lst.

Test Plan:

Pass: build-pkgs -c -a
Pass: build-image
Pass: boot

Story: 2008862
Task: 46933

Signed-off-by: Yue Tao <yue.tao@windriver.com>
Change-Id: Idf25adffc835bf551d540abf96d0db01b29e8c04
2022-11-24 11:26:19 +08:00
Zuul
f557186743 Merge "Fix zuul failures during setup" 2022-11-15 12:31:44 +00:00
Karla Felix
65e2bb9fa7 Decreasing repository update interval for snmp app
There is a FluxCD helmrepository for each kubernetes namespace.
With the previous interval, 60 minutes, of the already existing
kube-system repository does not update until this 60 minutes
interval is over.

This commit changes the update interval from 60 minutes to 5 minutes,
which seems to be reasonable amount and decrease the time necessary to
apply snmp from almost one hour to 6-7 minutes.

Test Plan:

PASS:  Generating new snmp package and upload/apply that
       package(it took 6-7 minutes to fully apply).

Closes-Bug: 1994151
Signed-off-by: Karla Felix <karla.karolinenogueirafelix@windriver.com>
Change-Id: I04735fa64340ff8781e66218924ffb5eb602f1d7
2022-11-08 17:33:29 +00:00
Al Bailey
b4909a8eb1 Fix zuul failures during setup
The ubuntu-jammy nodeset gets selected by default
and is causing problems during setup.

Collecting cffi>=1.1
Failed to build cffi

ubuntu-bionic works if using stein upper-constraints.
ubuntu-focal works if using the debian upper-constraints.

Need to update a file that is monitored by zuul
in order to trigger the failing zuul jobs.

Partial-Bug: 1994843

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I6510dedd0bf67803d280b0164757389335a7aa0e
2022-10-28 19:55:38 +00:00
Agustin Carranza
b74b00fa5f Add legacy control-plane toleration
The node-role.kubernetes.io/master:NoSchedule taint is being
replaced by node-role.kubernetes.io/control-plane:NoSchedule

The legacy toleration had been replaced in this app before but we
need to keep both for a compatibility reason.
So both taints are being supported.

Test plan:
PASS: * Upload and apply the app on a standard configuration lab.
      * Check it runs on the control-plane nodes.
      * Add a "control-plane" taint similar to the existing
        "master" one
      * Ensure that the app containers still run on the control-plane
        nodes.

Story: 2010339
Task: 46671

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: Ib9e7525858756b2b797686eb418ea3a6beb844a8
2022-10-27 10:01:55 -03:00
Agustin Carranza
9f42416c15 Remove orphan node OID definitions from mibs
Apparently the changes introduced by
https://review.opendev.org/c/starlingx/snmp-armada-app/+/814634
requires not only to remove the top node for the TMS MIB structure
but also the child node OID definitions.
If not, several warnings are returned when issuing any tipe of snmp
commands.

Test Plan
PASS: Install mibs on user host.
      Issue snmpget/snmpwalk/snmpgetnext/snmpbulkget commands to a
      deployment with snmp application uploaded and applied.
      No warnings related to OID parent 'TMS' are shown.

Closes-bug: 1992826

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: Ib9553b74e8afcc4b7d40ae8d78158c63cb08618d
2022-10-13 15:22:16 -03:00
Agustin Carranza
7cfa4f2a2a Replace 'node-role.kubernetes.io/master' label
The node-role.kubernetes.io/master label is deprecated for K8s v1.24.
This change provides compatibility to the application for such K8s
version.
This new label is available since K8s v1.20 so it is safe for previous
stx version.

Test plan
PASS: Build the package and install on system with K8s v1.23.
      Upload, apply the application as usual.
      Run snmp commands, the system responds correctly.

Story: 2010339
Task: 46473

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: Ib05e4ebc299d219ef8468b878829631a9506de4b
2022-09-29 16:12:26 -03:00
Enzo Candotti
ac05533d34 Update snmp tags to stx.8.0-v1.0.0
This change updates the snmp image tags to stx.8.0-v1.0.0, due to
the introduction of new debian docker containers in:
https://review.opendev.org/c/starlingx/root/+/856187

Story: 2009831
Task: 46212

Test Plan:
PASS: Apply snmp app with new tags introduced. Verify pods are up and
running. Describe pods and verify that the new tags are used.

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I6217004d8cec1d25fa03ae6e96cd5be9aa8eb5e3
2022-09-07 15:39:11 +00:00
Lucas Cavalcante
bdea182883 Remove snmp armada application build
As part of Armada deprecation we need to remove all Armada application
builds for all applications that have been migrated to FluxCD.

This patch removes the armada app build from centos and debian.

TEST PLAN:
PASS: Build centos
PASS: Build debian
PASS: rpm has no armada tarball
PASS: deb has no armada tarball
PASS: fluxcd tarball is unchanged

Story: 2009138
Task: 46044

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: I42e9f206b3dc5f7562ac81d95f586bf05b14f0fc
2022-08-24 11:40:31 -03:00
Zuul
60be653152 Merge "Add stx-snmp docker image" 2022-08-12 15:56:00 +00:00
Enzo Candotti
50919b751a Add stx-snmp docker image
This change reorganizes the source directories of the stx-snmp
container to be reused by both CentOS and Debian Dockerfiles in order
to build the images having the corresponding OS-specic base.

Test plan:

PASS: Debian - Build Debian docker image and upload/apply snmp app
changing the stx-snmp references to point to the new image.
Verified that the app is applied, and the container is created.
PASS: Verified common snmp scenarios:
 - test snmpwalk for 2c and 3 snmp version
 - test snmpget for 2c and 3 snmp version
 - verified traps are working as expected.

PASS: CentOS - Same tests have been done building a CentOS container.

Story: 2009831
Task: 45732

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I7ecd52c1ad60ab1e82cb50805b71e772e3b93ec4
2022-08-09 03:14:15 +00:00
Enzo Candotti
20148e2003 Add stx-fm-trap-subagent docker image
This change reorganizes the source directories of the stx-fm-subagent
container to be reused by both CentOS and Debian Dockerfiles in order
to build the images having the corresponding OS-specic base.

Test plan:

PASS: Debian - Build Debian docker image and upload/apply snmp-app
changing the stx-fm-trap-subagent references to point to the new image.
Verified that the app is applied, and the container is created.
PASS: Verified common snmp scenarios:
 - test snmpwalk for 2c and 3 snmp version
 - test snmpget for 2c and 3 snmp version
 - verified traps are working as expected.

PASS: CentOS - Same tests have been done building a CentOS container.

Story: 2009831
Task: 45731

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I962a526ad47ce320a0048e591f689453ca15cc23
2022-08-08 20:04:39 +00:00
Enzo Candotti
90a317189a Add stx-fm-subagent docker image
This change reorganizes the source directories of the stx-fm-subagent
container to be reused by both CentOS and Debian Dockerfiles in order
to build the images having the corresponding OS-specic base.

The files Dockerfile.debian for stx-snmp and stx-fm-trap-subagent have
been added with no content in order to work on them on different
reviews.

Test plan:

PASS: Debian - Build Debian docker image and upload/apply snmp-app changing
the stx-fm-subagent references to point to the new image. Verified
that the app is applied, and the container is created.
PASS: Verified common snmp scenarios:
 - test snmpwalk for 2c and 3 snmp version
 - test snmpget for 2c and 3 snmp version
 - verified traps are working as expected.

PASS: CentOS - Same tests have been done building a CentOS container.

Story: 2009831
Task: 45730

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: Idfb46224429061f11493c111588b542cf809b79f
2022-07-29 12:36:46 +00:00
fperez
fabbdda698 Add FluxCD version of snmp app in debian
Add the fluxcd app for snmp to the debian build.

Some code repetitions are intentional to make it easier to remove
armada in the future.

Fluxcd app is set as default.

A bypass in encoding function inside snmp.py was needed
since Debian is using Python3.

Test plan:
PASS: build and install package on Debian.
PASS: build and install package on Centos.
PASS: fluxcd as default in Debian.
PASS: armada app still built.
PASS: deploy snmp -fluxcd- on Debian.
PASS: deploy snmp -fluxcd- on Centos.
PASS: Alarm/event traps tests.

Story: 2009138
Task: 45596

Signed-off-by: fperez <Fabrizio.Perez@windriver.com>
Change-Id: I523c0c9e16551a7897a3008b683e40287c3abde7
vr/stx.7.0
2022-06-10 15:36:46 -03:00
Zuul
ff4dabc2b2 Merge "Update tag for stx-fm-trap-subagent to stx.7.0-v1.0.3" 2022-05-20 00:42:07 +00:00
Takamasa Takenaka
32a32d301e Update tag for stx-fm-trap-subagent to stx.7.0-v1.0.3
Update yaml file with a new tag for stx-fm-trap-subagent, due to
a new fix to add uuid and reason text in snmp trap.

Closes-bug: 1971626

TEST PLAN:
PASS Helm charts in armada tar includes tag stx.7.0-v1.0.3
     in values.yaml for trap subagent
PASS When snmp app is applied, stx-fm-trap-subagent:
     stx.7.0-v1.0.3 is downloaded and running.

Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: Ia29091b4534c851c09b24343db7f6e8ac5ef1f63
2022-05-19 14:15:09 -03:00
Thiago Brito
2e9b48c693 Use fluxcd app by default for snmp
This commit switches snmp to use the fluxcd app by default and also
preserves the armada app on the build for future tests.

TEST PLAN
PASS Build iso and verify apps
PASS Upload
PASS Apply
PASS Verify resources
PASS Remove
PASS Delete

Logs: https://paste.opendev.org/show/bZMwEQnmZqLTAomad46g/

Story: 2009138
Task: 45347

Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: Ib25ce72bbb7f5aabf6f77bfa5737dc1d4f0f7a61
2022-05-12 20:06:00 -03:00
Takamasa Takenaka
a52305a17f Add UUID and ReasonText in SNMP trap
Trap subagent send traps based on the alarm trap information
from FM. But SNMP trap did not include UUID and ReasonText.

This fix is adding UUID and ReasonText in all types of SNMP trap.

Closes-bug: 1971626

TEST PLAN:
PASS: Confirm UUID and ReasonText are included in SNMP trap.
      [Trap type]
      - wrsAlarmCritical
      - wrsAlarmMajor
      - wrsAlarmMinor
      - wrsAlarmWarning
      - wrsAlarmMessage
      - wrsAlarmClear
      - wrsAlarmHierarchicalClear

Depends-On: https://review.opendev.org/c/starlingx/fault/+/840535/
Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: I5c03562a84ae2e4f7ed17e5dd70dcad4c33a4841
2022-05-05 13:03:51 -03:00
Giana Francisco
c309a7df3f Add app support for FluxCD: snmp
Add new manifest files to the snmp app to enable FluxCD support.

Test Plan:
- build, ISO image includes in progress fluxcd commits
- verify the armada app version of snmp
- verify the fluxcd app version of snmp
- test snmpwalk for 2c and 3 snmp version
- debian: build-pkgs -p stx-snmp-helm

Story: 2009138
Task: 45143

Signed-off-by: Giana Francisco <francisco.giana@windriver.com>
Change-Id: I4a895274caeb41d9121c6e5ab9a03565263cc5a9
2022-04-25 15:12:03 -03:00
Francisco Giana
bb7eb2071b Revert "Add app support for FluxCD: snmp"
This reverts commit 81b70ae24af2802e69ea2f0a340756c5ce835f4f.

Reason for revert: broke daily build

Change-Id: I1ca1e8ee2471920e468a5adbea6d79bf0da4d9eb
2022-04-23 13:17:53 +00:00
Giana Francisco
81b70ae24a Add app support for FluxCD: snmp
Add new manifest files to the snmp app to enable FluxCD support.

Test Plan:
- build, ISO image includes in progress fluxcd commits
- verify the armada app version of snmp
- verify the fluxcd app version of snmp
- test snmpwalk for 2c and 3 snmp version
- debian: build-pkgs -p stx-snmp-helm

Story: 2009138
Task: 45143

Signed-off-by: Giana Francisco <francisco.giana@windriver.com>
Change-Id: I14bc6ba4ede2fa4e470d5a6ef64fbca2d7e09ef2
2022-04-21 16:10:59 -03:00
Zuul
fc80862cd7 Merge "Add debian_build_layer.cfg file" 2022-03-29 14:26:13 +00:00
Scott Little
9ac9f7878b fix yum urls for vaulted CentOS 8
CentOS 8 has been vaulted.  We need to fix the yum urls
to continue to use it.

A longer term fix is to migrate to a new/different base image,
but is outside the scope of this fix which only addresses
broken builds.

Closes-bug: 1959694
Signed-off-by: Scott Little <scott.little@windriver.com>
Change-Id: Id8b32ee27a65f74c616b07e37f8f5f2914176264
2022-02-03 13:12:55 -05:00
Enzo Candotti
9913c1ad6c Add master NodeSelector to SNMP pods
SNMP pods should not be installed on worker nodes, since
trap generation will not work as expected.

This change adds a node-role.kubernetes.io/master NodeSelector
in order to force the pods to be Scheduled only on master nodes.

Closes-Bug: 1955571

Test Plan:

PASS: Verify that tolerations and NodeSelector are installed properly.

PASS: Add a NoSchedule taint to master nodes and verify that
pods are not being scheduled on worker nodes.

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I28c279187463cfdc79fd39f40a817be4ee4cf011
2021-12-22 15:35:28 -03:00
Tracey Bogue
6bf825fdcb Add Debian packaging for snmp app
Create Debian packages for python-k8sapp-snmp and stx-snmp-helm.

Test Plan:
* Test Debian build.
* Verify contents of packages.
* Test CentOS build.

Story: 2009101
Task: 43871

Signed-off-by: Tracey Bogue <tracey.bogue@windriver.com>
Change-Id: Iff22c92e491c0783efacd90a36f6589f55702345
2021-12-10 08:32:31 -06:00
Takamasa Takenaka
e9fa90a028 Modify values.yml to match expected format
When system application-apply, the script will download
containers and upload them to the local registry.
(This process includes repository re-written with
system parameter configuration)

Current in values.yaml of snmp armada app, only
stx-snmp container configuration matched to the
expected pattern. So that the script downloaded
only stx-snmp container but no other two containers.

This fix modifies the format in values.xml to
match the expected pattern (No value changes for
repositories nor tags)

Test Plan:
PASS: Apply snmp-armada-app and confirm the followings:
      - Status becomes "applied"
      - All 3 containers download from configured repository
      - All 3 containers are in the local repository

Closes-bug: 1952654

Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: I8b742a2e211717b343f459443b15e947e5c6bd92
vr/stx.6.0
2021-11-29 15:58:40 -03:00
Takamasa Takenaka
ae2128355b Update tag for stx-snmp to stx.6.0-v1.0.1
Update yaml file with a new tag for stx-snmp, due to
a new fix to remove Titianium cloud text from mibs.

Test Plan:
PASS:Apply snmp-armada-app and confirm stx-snmp
     tag is stx.6.0-v1.0.1 by "kubectl describe"

Closes-bug: 1947611

Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: Ifb22164acdc16bb66b56bf02e42eb1b0214e758d
2021-11-10 14:40:52 -03:00
Takamasa Takenaka
2f6c78ef33 Update tag for stx-fm-trap-subagent to stx.6.0-v1.0.2
Update list file with a new tag for stx-fm-trap-subagent, due to
a new fix

Test Plan:
PASS:Apply snmp-armada-app and confirm stx-fm-trap-subagent
     tag is stx.6.0-v1.0.2 by "kubectl describe"

Closes-Bug: 1943612

Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: If8db42e2b43307bac2963f1e30cdc57f5184f1d0
2021-11-10 11:05:58 -03:00
Takamasa Takenaka
ef71ead777 Update tag for stx-fm-subagent to stx.6.0-v1.0.3
Update values.yaml with a new tag for stx-fm-subagent, due to
a new fix to retry to connect alarm/event database if it fails.

Closes-bug: 1949083

Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: I649d6a8e62acf98cf8bca694c41eab0d89170930
2021-11-08 15:32:04 -03:00