194 Commits

Author SHA1 Message Date
Andre Mauricio Zelak
3e5e76abf1 Update ptp-notification service image tags
Update notificationservice-base and notificationservice-base-v2
image tags to versions stx.11.0-v2.2.5 and stx.11.0-v2.3.1
respectively.

The image were tagged in the following commit:
https://review.opendev.org/c/starlingx/root/+/941132

This update is to pick recent fix for RabbitMQ endpoint, cause
of crashes at pod startup. The fix was delivered in the
following commit:
fc05f7fb44

Test plan:
Pass: Deploy app with new image and validate basic ptp-notification
    functionality

Closes-bug: 2097136

Change-Id: I42f428d17acf332bd8b0d2386694d906497b9751
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
vf/stx.trixie vf/trixie
2025-02-11 15:31:38 -03:00
Zuul
89ee353cc1 Merge "Fix RabbitMQ endpoint" 2025-02-07 19:19:02 +00:00
Andre Mauricio Zelak
fc05f7fb44 Fix RabbitMQ endpoint
Only the IPv6 addresses must be enclosed in square brackets,
the IPv4 adresses and hostname can't be enclosed.

Test plan:
Pass:	Verify ptp-notification in IPv4 and IPv6 system.
Pass:	Verify ptp-notification operations (pull status,
subscribe, list, delete)
Pass:	Verify both ptp-notification V1 and V2 operations

Closes-bug: 2097136

Change-Id: I7792b2648bd609ca49fbec840eaf7e687ae25c7d
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2025-02-07 15:54:23 -03:00
Tara Subedi
7d5b3b4f39 Disable management plugin for ptp-notification rabbitmq image
The rabbitmq docker images for ptp-notification are currently using
the version with the "-management" tag, which enables the rabbitmq
management interface i.e. web gui on port 15672, with default admin
password.

This commit disables this management interface by transitioning to
the standard rabbitmq image that does not have the functionality
enabled. PTP notification functionality is not based upon the
management interface, so there won't be any effect.

TEST PLAN:
PASS: PTP pull/push notifications for both v1/v2 versions
PASS: Port 15672 is not open on rabbitmq consisting pod.
      "curl http://<POD IP>:15672" won't work
      "rabbitmqctl status" does not show 15672 port

Story: 2011332
Task: 51630

Change-Id: Ib55a2217f643a031e1f65e1efcf8fc19e0bed21c
Signed-off-by: Tara Nath Subedi <tara.subedi@windriver.com>
2025-01-29 16:41:32 -05:00
Tara Nath Subedi
19841dd96f Rework RabbitMQ credential configuration
PTP Notification deploys two separate rabbitmq instances: registration
and notification-broker, with a default user/password of admin/admin.

This commit enables PTP notification to function with an user-defined
name, password and also AMQP port for both instances.

TEST PLAN:
PASS: PTP pull/push notifications with default notification/registration
      user/password/port (without helm override for these)

PASS: PTP pull/push notifications with changing notification/registration
      user/password/port (with helm overide for these)
      system helm-override-update ptp-notification ptp-notification \
      notification --values ~/notification-override.yaml
      registration:
        endpoint:
          port: 5673
          user: admin-reg
          pass: Registration1234

     notification:
        endpoint:
          port: 5674
          user: admin-noti
          pass: Notification1234

Story: 2011332
Task: 51620

Signed-off-by: Tara Nath Subedi <tara.subedi@windriver.com>
Change-Id: Id98c2ae68a1adb5b17f1a336ac609cd57fe3a026
2025-01-28 13:41:48 -05:00
Cole Walker
a5bb2dc260 Fix for rabbitmq address format
A package update sometime after the notificationclient 2.3.0 release has
changed the behaviour of oslo_messaging.

In rpc_helper.py get_transport(), the oslo_messaging.get_rpc_transport()
now errors out when passed an ipv4 address wrapped in "[]". This was not
previously the case.

Updated the parsing for the broker_host variable so that it is only
wrapped in brackets when it is ipv6.

Testing:
Pass: Verify operation on ipv4 systems
Pass: Verify operation on ipv6 systems

Closes-bug: 2093125

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I7211d0d4c2769547233ecc1dae0416327a19c32c
2025-01-16 14:24:38 -05:00
Cole Walker
ec7cf92b65 Update api-ref for ptp-notification
This commit updates the REST API documentation for PTP notification.

Closes-bug: 2089035

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I961cac0ef33b7509bd71359e84de7f4359e3b3ba
vr/stx.10.0
2024-12-02 17:29:06 -05:00
Cole Walker
a2973c7db6 Update image tag for notificationservice-base-v2
Update ptp-notification image tag for
notificationservice-base-v2:stx.10.0-v2.3.0

Test plan:
Pass: Deploy app with new image and validate basic ptp-notification
functionality

Depends-on: https://review.opendev.org/c/starlingx/root/+/935971
Partial-bug: 2089035

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I2518d9394ed7a7854ac84ef3fcc4c213c7670630
2024-11-21 15:24:12 -05:00
Cole Walker
bbeef95744 Rework notification messages to remove instance tags
Rework the pull status and subscription notification to remove the top
level instance tags that were returned with the notification. These tags
were originally introduced to identify which PTP instance a given
notification was associated with. Updates to the ORAN standard have
clarified that the instance identification should instead be included in
the Resource Address field.

This commit includes the following changes:
- Update notification format to place instance identifier in Resource
  Address instead of a top level tag (default behaviour)
- Provide a helm override to enable legacy notification format with top
  level instance tags for compatibility. This can be enabled by setting
  the override "notification_format=legacy"
- Ensure GM clockClass is correctly reported for both BC and GM configs
- Changes result in new images for notificationclient-base and
  notificationservice-base-v2
- Pull status notifications are now delivered as a list of dicts when
  there are multiple instances in a request. The "overall sync status"
  message is delivered as a dict because it only ever has a single
  notification
- Push notifications are delivered as individual dicts for each
  notification, this behaviour remains the same

Test plan:
Pass: Verify ptp-notification builds and deploys
Pass: Verify container image builds
Pass: Verify ptp-notification operations (pull status, subscribe, list,
delete)
Pass: Verify standard and legacy format output for each notification
type

Partial-bug: 2089035

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Ied6674a02b41ed31079a291fc9bace74d95d467a
2024-11-20 09:15:35 -05:00
Cole Walker
c027954e2a Update image tags in helm charts
Update tags for:
notificationservice-base
notificationservice-base-v2
to stx.10.0-v2.2.4

Test plan:
Pass: Pull images and deploy ptp-notification
Pass: Verfiy basic app functionality (get, subscribe, list, delete)

Story: 2011056
Task: 51065

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

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I6b1393863d7843b2815a3303a7508f047e48f8d7
vf/caracal
2024-09-23 14:43:46 -04:00
Zuul
4a9f089600 Merge "Handle incomplete pmc results" 2024-09-20 19:29:53 +00:00
Cole Walker
eb1e16685d Handle incomplete pmc results
Improve the logic for handling incomplete results when a pmc query
returns empty data.

There are intermittent instances where a pmc command returns an empty
result. The previous logic would result in ptp-notification considering
the ptp state to be in Freerun, but this could lead to undesirable
results where incorrect notifications are delivered.

This update allows ptp-notification to retry the pmc commands on the
next cycle and only updates the ptp status when the results are
complete. Additional logging has been added to indicate which pmc
results are missing.

Test plan:
Pass: Verify container image builds
Pass: Verify ptp-notification deployment
Pass: Verify basic operations (get, subscribe, list, delete)
Pass: Verify that ptp-notification does not deliver incorrect freerun
notifications when pmc results are incomplete
Pass: Verify that ptp-notification delivers a notification when ptp lock
is actually lost

Story: 2011056
Task: 51049

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Ic473fcb44e16db629f12208e581a92abc3558480
2024-09-20 12:26:05 -04:00
Andre Mauricio Zelak
a63f4d31a2 Handle old NMEA serial port name format
During an upgrade, or due a missconfiguration the ts2phc NMEA port
can be configured in the old name format, tty_GNSS_xxxx_x. Handling
the old name format to avoid crashes an ptp-notification missbehavior.

A new unit test case was created to cover this case.

Test plan:
PASS: Verify helm chart and container build
PASS: Verify ptp-notification deployment using old configuration.
PASS: Verify ptp-notification deployment and basic operation
using new configuration.
PASS: Verify unit tests.

Story: 2011056
Task: 51051

Change-Id: I5bc28cb04241684de52834e9819e8401677f05dd
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2024-09-19 21:48:48 -03:00
Andre Mauricio Zelak
b8fa66daa5 Update image tags for ptp-notification images
Update the following image tags:

notificationservice-base
stx.10.0-v2.2.3

notificationservice-base-v2
stx.10.0-v2.2.3

locationservice-base
stx.10.0-v2.2.3

Story: 2011056
Task: 50979

Change-Id: Idc17762e6d6ad09beb7ea6e87e40e2dec770c373
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2024-09-06 12:38:48 -03:00
Cole Walker
76d515c290 Handle missing sysfs path for in-tree ice driver
The in-tree ice driver version 6.6.40-stx.2 does not provide the debugfs
path used for monitoring the GNSS state. This commit provides the
following changes to support this driver:

1: Update the k8s daemonset to mount the /sys/kernel/debug path instead
   of /sys/kernel/debug/ice. The "ice" directory is not present using
   the in-tree driver, so mounting the parent directory allows the
   containers to be properly started and can then check if the "ice"
   directory is present at runtime
2: Update the startup script for the v2 container to check for the
   existence of the ice debugfs directory. If it is not present, disable
   GNSS tracking in ptp-notification
3: Update the path used by GNSS monitoring to match the changed mount
   path in the daemonset so that GNSS monitoring can proceed when the
   path is present

Currently, GNSS time sources and monitoring cannot be used with the
in-tree driver. GNSS time sources require configuring the system to use
the out-of-tree ice driver.

Test plan:
Pass: Verify helm chart and container build
Pass: Verify ptp-notification deployment using the in-tree ice driver,
ensure that GNSS tracking is automatically disabled when debugfs is not
present
Pass: Verify ptp-notification deployment using the out-of-tree ice
driver, ensure that GNSS tracking is operational when debugfs is present

Story: 2011056
Task: 50940

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I73859408cf5655b58ebe2a1a78f407496c3380dd
2024-08-30 13:43:13 -04:00
Andre Mauricio Zelak
945e51f069 Ice driver 1.14.9.x support
Support the new NMEA serial port name, which changed
from /dev/ttyGNSS_XXXX_X to /dev/gnssX. The name
change impacted how the PCI address of the GNSS
device is derived.

Test plan:
PASS: Verify basic app operation (get status, subscribe,
list, delete, push notification.
PASS: Verify unit tests.

Story: 2011056
Task: 50884

Change-Id: I96b6285b385eb45c14650cda125ddfb702b06645
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2024-08-20 22:50:47 -03:00
Andre Mauricio Zelak
3026d6305b Update tags for ptp-notification rabbitmq image
Update the ptp-notification image tags to pick up the latest CVE fixes
in the rabbitmq container image.

Update the helm chart tag values for the following images:
rabbitmq:3.13.4-management

Test Plan:
Pass: Pull updated images and verify basic app operation (get status,
subscribe, list, delete and push notification.
Pass: Basic operation with both ptp-demo v1 and v2 and both APIs.
Pass: Long memory test usage.

Story: 2011090
Task: 50671

Change-Id: I669572778daa497ea435ba03620d76ac13e69e73
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2024-07-29 17:44:29 +00:00
Cole Walker
4b505bd423 Update tags for ptp-notification images
Update the ptp-notification image tags to pick up the latest CVE fixes
in the stx base container image.

Update the helm chart tag values for the following images:
notificationservice-base:stx.10.0-v2.2.2
notifcationservice-base-v2:stx.10.0-v2.2.2
locationservice-base:stx.10.0-v2.2.2

Test Plan:
Pass: Pull updated images and verify basic app operation (get status,
subscribe, delete, list, push notifications)

Story: 2011090
Task: 50605

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

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: If8abce524e4c83bc3c3a886a997ea3820013649e
2024-07-19 14:27:47 -04:00
Edson Dias
f74b9e3e42 Update helm/fluxcd api version.
Right now, ptp-notification app is using beta
versions of the Fluxcd and Helm APIs, and for
this reason, some warnings are being thrown.

This change aims to update api versions, removing
beta values following this logic:
Fluxcd:
  - source.toolkit.fluxcd.io/v1beta1
  + source.toolkit.fluxcd.io/v1

Helm:
  - helm.toolkit.fluxcd.io/v2beta1
  + helm.toolkit.fluxcd.io/v2

No changes to yaml file structure are required
for this change.

Test Plan:
PASS: Build ISO & Bootstrap AIO-SX
PASS: Upload and apply ptp-notification app
PASS: Confirm that sysinv.log does not have any
      warnings about beta versions related to
      ptp-notification.

Story: 2011129
Task: 50454

Change-Id: I8cfd9190294a6047f1d3482f7596b2577a99bcf9
Signed-off-by: Edson Dias <edson.dias@windriver.com>
2024-06-26 17:43:53 -03:00
Zuul
b21003ff6f Merge "Added daemonset.yaml volumes types" 2024-06-05 17:33:12 +00:00
Andre Mauricio Zelak
fa9ca57ef8 Added daemonset.yaml volumes types
Added volume types to avoid the K8s default behavior of
creating a directory when host path isn't available.

When applying multiple ptp instances, the varrun volumes
weren't available for a long period of time, than K8s
created a directory in place, causing a major issue.

Test Plan:
Pass: Verify ptp-notification operation when it starts before
PTP configuration.
Pass: Verify ptp-notification operation when it starts after
PTP configuration.
Pass: Verify ptp-notification operation when PTP configuration is
reapplied.
Pass: Verify ptp-notification operation after a system restart.

Closes-Bug: 2068397

Change-Id: I94da0440192245c147265176f8da21ee42173615
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2024-06-05 13:24:05 -03:00
Cole Walker
a2bfad8d05 Add override parameters to configure liveness probes
Update the ptp-notification helm charts and values to allow users to
override the liveness probe parameter values for the locationservice,
ptptracking and ptptrackingv2 containers.

Adds overrides for:
- initialDelaySeconds
- failureThreshold
- periodSeconds
- timeoutSeconds

The successThreshold value is not configurable and must remain as "1".

Test plan:
Pass: Verify package build
Pass: Verify ptp-notification upload/override/apply/remove/delete
Pass: Verify overrides are accepted and applied for each containers
liveness probes
Pass: Verify application startup with liveness probes enabled and
disabled

Story: 2011090
Task: 50266

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Id196047d6a018bfecae5a123482425aa8256e412
2024-06-04 16:03:46 -04:00
Cole Walker
3b73dc7b8c Fix misspelled app metadata parameter
The metadata field for behavior was misspelled as "behaviour", resulting
in ptp-notification omitting the "platform_managed_app" option.

Test plan:
Pass: Verify ptp-notification build and deploy
Pass: Verify app upload/apply/override/remove/delete
Pass: Verify ptp-notification app requests to be platform managed

Closes-bug: 2065428

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Ia0cb090c3b177994fc1d9f317b84fd93bf63061d
2024-05-29 16:06:17 -04:00
Zuul
001cc95c43 Merge "Remove CentOS/OpenSUSE build support" 2024-05-28 18:56:59 +00:00
Cole Walker
750a2f41c2 Rename app plugin to conform with app framework requirements
Recent changes in the system application framework have resulted in
ptp-notification failing to apply. This is because the plugin defined in
python3-k8sapp-ptp-notification does not exactly match the app name.

This change re-names the ptp-plugin from "ptp_notification" to
"ptp-notification" and allows the application to apply correctly.

It also adds required constances and a get_overrides() function to the
ptp-notification plugin so that helm overrides can work properly. This
logic has been implmented in the same way as other stx platform apps.

The app framework change that revealed this issue is:
https://review.opendev.org/c/starlingx/config/+/915377

Test-plan:
Pass: Verify ptp-notification build
Pass: Build and install iso
Pass: Verify ptp-notification app apply/remove/override

Story: 2011090
Task: 50183

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Ia366eeb4c54aaccea65a9e568afaf8992bd825d5
2024-05-27 14:27:08 -04:00
Cole Walker
9b8a023e25 Correct spelling error in daemonset
A spelling error in the daemonset checksum results in failure to upload
the ptp-notification application.

Corrected spelling of "trunk" to "trunc".

Test plan:
Pass: Verify application build
Pass: Verify application upload and apply

Story: 2011090
Task: 50091

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I544686f5ac997bf74a474513cb9c203ce3593294
2024-05-14 12:40:37 -04:00
Scott Little
0af78200db Remove CentOS/OpenSUSE build support
StarlingX stopped supporting CentOS builds in the after release 7.0.
This update will strip CentOS from our code base.  It will also remove
references to the failed OpenSUSE feature as well.

Story: 2011110
Task: 49960
Change-Id: I067c3758328567e44094a6638a5a591a96990acf
Signed-off-by: Scott Little <scott.little@windriver.com>
2024-04-26 14:16:15 -04:00
Cole Walker
1cf6e103b2 Update image tags for ptp-notification app maintenance
Update the helm chart tag values for the following images:

notificationservice-base:stx.10.0-v2.2.1
notifcationservice-base-v2:stx.10.0-v2.2.1
locationservice-base:stx.10.0-v2.2.1

Test Plan:
Pass: Pull updated images and verify basic app operation

Story: 2011090
Task: 49922

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

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Ie0312930b8fb5fb24ce65f1345b245555379699c
2024-04-23 10:56:31 -04:00
Cole Walker
c6b56f4544 Add checksum to roll daemonset when configmap changes
Add a checksum annotation to the ptp-notification daemonset so that
updates to the config map will result in the daemonset pods to be
restarted.

Update helm chart version to 2.0.2

Test-plan:
Pass: Verify package build and install
Pass: Verify that a new package version with altered config maps
correctly restart pods
Pass: Verify application removal

Story: 2011090
Task: 49852

Depends-on: https://review.opendev.org/c/starlingx/ptp-notification-armada-app/+/915379

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I11b767997ab207cffa68a214f7e7aa16ebd32e9a
2024-04-17 11:32:03 -04:00
Cole Walker
37c15ea4fb Add support for httpGet liveness probes
Updates the locationservice, notificationservice and notificationclient
containers to support ipv6 httpGet liveness probes.

notificationservice-base and notificationservice-basev2:
- Adds health.py which starts a simple http server that runs within the
  daemon. The k8s httpGet liveness probe can query this endpoint to
  verify that the service is running
- Update the daemonset template and values to provide the required info
  for initalizing the new endpoint

locationservice-base:
- Remove unused portions of the locationservice_start.sh config map.
  The location-query-server.py and location-announce.py were never
  active and are not required
- Add locationservice_start.py in order to start the locationservice
  pecan WSGI application with either an ipv4 or ipv6 socket
- Use existing pecan endpoint to respond to liveness probes

notificationclient-base:
- Add notificationclient_start.py to start the notificationclient
  pecan WSGI application with either an ipv4 or ipv6 socket
- Use existing pecan endpoint to respond to liveness probes

Daemonset:
- Add required ip and port environment variables to support liveness
  probes on each container
- Add a conditional section for enabling liveness probes. Disabled by
  default but can be enabled via helm overrides by setting "liveness:
  True"

Misc:
- Re-organized python imports in affected files
- Incremented helm chart version to 2.0.1

Test-plan:
Pass: Verify application build and install
Pass: Verify containers build correctly
Pass: Deploy ptp-notification and verify basic sanity (v1 and v2 get,
subscribe, delete, list)
Pass: Enable httpGet liveness probes for each container and verify
operation
Pass: Verify application removal

Story: 2011090
Task: 49851

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I4671c7f8c67c4869a6d5e3b384eae66d8c57a284
2024-04-16 11:07:15 -04:00
Andre Mauricio Zelak
d38115c8ed Update image tags for ptp-notification images
Update the following image tags:

notificationservice-base
stx.9.0-v2.2.0

notificationservice-base-v2
stx.9.0-v2.2.0

locationservice-base
stx.9.0-v2.2.0

Closes-Bug: 2051391

Change-Id: Ie73115e2d91a4654841adc286bc560ca603aa2cd
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2024-03-08 16:39:57 -03:00
Joshua Reed
b29dfcc66a 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.
 - 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: 49614

Change-Id: Ied7ff31b03b0b22d099649c91f712e6f9aafcd63
Signed-off-by: Joshua Reed <joshua.reed@windriver.com>
vr/stx.9.0
2024-03-05 13:46:22 -07:00
Igor Soares
4a001833e6 Add minimum Kubernetes version supported
Add the minimum Kubernetes version supported to 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

Story: 2010929
Task: 49500

Change-Id: I38d52f161946c616e82647401562577b4699c1f6
Signed-off-by: Igor Soares <Igor.PiresSoares@windriver.com>
vf/bookworm
2024-02-05 16:45:14 -03:00
Andre Mauricio Zelak
164a8f8619 Update rabbitmq docker image to 3.12.8-management
The following CVEs were identified in the 3.8.11-management
and fixed in 3.12.8-management version:
CVE-2022-25236
CVE-2022-25235
CVE-2021-3711
CVE-2022-0778
CVE-2023-0286
CVE-2021-3449
CVE-2021-33910
CVE-2022-37454
CVE-2022-37434
CVE-2022-25315
CVE-2022-2526
CVE-2022-23852
CVE-2022-22824
CVE-2022-22823
CVE-2022-22822
CVE-2022-2068
CVE-2022-1664
CVE-2022-1292
CVE-2021-3520
CVE-2021-3177
CVE-2022-22827
CVE-2022-22826
CVE-2022-22825
CVE-2022-1271
CVE-2022-1271
CVE-2023-31484
CVE-2022-40674
CVE-2021-20305
CVE-2023-29491
CVE-2022-1304
CVE-2021-46143
CVE-2021-3999
CVE-2020-16156
CVE-2023-24329
CVE-2023-0215
CVE-2022-45061
CVE-2022-4450
CVE-2022-43680
CVE-2022-35737
CVE-2022-25314
CVE-2022-2509
CVE-2022-23990
CVE-2022-0391
CVE-2021-3737
CVE-2021-3580
CVE-2020-35525
CVE-2018-25032
CVE-2021-3712
CVE-2023-2650
CVE-2022-34903
CVE-2022-25313
CVE-2021-3733
CVE-2020-19189
CVE-2022-4304
CVE-2021-40528
CVE-2021-23841
CVE-2022-48303
CVE-2022-3821
CVE-2021-24031
CVE-2020-13844
CVE-2020-13844
CVE-2022-2097
CVE-2021-4189
CVE-2021-24032
CVE-2022-23219
CVE-2022-23218
CVE-2020-27619
CVE-2021-35942
CVE-2021-45960
CVE-2020-6096
CVE-2018-12886
CVE-2023-26604
CVE-2019-18276
CVE-2015-20107
CVE-2023-0464
CVE-2021-43618
CVE-2021-33560
CVE-2021-3326
CVE-2021-23840
CVE-2019-20838
CVE-2019-13050
CVE-2021-4209
CVE-2020-13529
CVE-2019-25013
CVE-2021-3426
CVE-2018-16869
CVE-2021-20193
CVE-2020-27618
CVE-2023-3817
CVE-2023-3446
CVE-2023-0465
CVE-2018-7169
CVE-2020-29562
CVE-2013-4235
CVE-2021-36087
CVE-2021-36086
CVE-2021-36085
CVE-2021-36084

Test plan:
PASS: In a AIO-DX environment set up and test the ptp-notification,
registration and client communication
PASS: Verify the ptp-notification and registration rabbitmq logs

Partial-Bug: 2051391

Change-Id: If0160bf17a1777b06d21d34910fc47c3807a6d28
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2024-01-29 13:48:55 -03:00
Igor Soares
3f163fc54c 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: 49349

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

Jobs are now flake8, pylint, py39 and metadata.

Add bindep.txt

Deprecate old py27,py36 testenvs from tox.ini in
the python package folder in favor of py39 instead.
However, keep the root folder tox.ini py36 job because
that test is checking code other than the python package.

Test Plan
PASS - All zuul jobs pass as expected.

Story: 2010929
Task: 49280

Change-Id: Ic64ad41a3bf6454dd9ea0f6e862c3b31a0541660
Signed-off-by: Reed, Joshua <Joshua.Reed@windriver.com>
2023-12-20 06:36:14 -06:00
Zuul
5eafcbba69 Merge "Add label platform/application to pods" 2023-12-13 13:42:20 +00:00
dbarbosa
b7b3207afa Add label platform/application to pods
Add support to 'app.starlingx.io/component' to be overwritten
by user override, with possible values being 'platform' and
'application'. With 'platform' being the default value. This
change will also restart the pods if the label changes.

Test Plan:
PASS: upload/apply/remove/delete/update ptp-notification.
PASS: Install ptp-notification and check if pods have the label
'app.starlingx.io/component' with the value 'platform'.
PASS: Change the value of the labels.isApplication to true using
"system helm-override-update" and check, if after re-applying
the app, the label 'app.starlingx.component' changes to
application' in the pods.
PASS: Use 'system application-apply ptp-notification' when there is
a change to be applied to 'app.starlingx.component' and verify if the
pod is restarted.
PASS: If "labels.isApplication" is updated with a value other than
true or false, the label on the pods "app.starlingx.io/component"
will not change.

Story: 2010612
Task: 49132

Change-Id: I2f8586cbb7ceac75892af41b7120db6c189cdafa
Signed-off-by: David Barbosa Bastos <david.barbosabastos@windriver.com>
2023-12-12 18:55:00 -03:00
Cole Walker
0ed23a40f6 [PTP] Update image tags in helm charts
Update the image tags for:

notificationservice-base
stx.9.0-v2.1.3

notificationservice-base-v2
stx.9.0-v2.1.3

Story: 2010723
Task: 49222

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

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I126eb14ee74e8e30e8b09f37584235b074eb3e06
2023-12-07 15:59:36 -05:00
Cole Walker
c23e19a1ce Update logic for checking HA Phc2sys sources
Ensure that ptp-notification is correctly transitioning state when HA
phc2sys is in use and there are no valid source interfaces.

For v2 API, this means that the os_clock status state is changed when
all valid phc2sys sources are lost/returned.

For v1 API, support the option to log a warning when phc2sys HA has no
valid sources, but do not change state, as phc2sys sync is not
considered for the sync state in the v1 API.

Test plan:
PASS: Build and deploy images
PASS: Verify that v2 API state changes when HA phc2sys loses valid
sources
PASS: Verify that v2 API returns to LOCKED when valid sources return
PASS: Verify that v1 API can log a warning when no valid HA phc2sys
sources are present

Story: 2010723
Task: 49205

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I43c499d62f352147994d134d867f042186cd8e35
2023-12-05 15:16:03 -05:00
Cole Walker
adfae0d2a8 Add support for multi-domain phc2sys-ha components
Update the logic in set_utc_offset() to handle the case where ha_phc2sys
is in use and there are multiple ptp4l instances using different domain
numbers.

The process is to check for a user configured ha_domainNumber parameter
in the phc2sys config, if present use that for applicable pmc queries.

If a ha_domainNumber is not defined, check for a global domainNumber in
the phc2sys config and use that.

If neither are specified, use the default domainNumber 0.

Add the 'valid sources' check to ptp-notification v1 for when ha_phc2sys
is in use. Log a warning if ha_phc2sys has no valid sources to select.

Test plan:
Pass: Verify image build and deploy images
Pass: Verify set_utc_offset functionality with ha phc2sys
- Global domainNumber
- Per interface domainNumber
- No domainNumber defined
Pass: Verify set_utc_offset functionality without ha phc2sys
Pass: Verify that v1 ptp-notification logs a warning when ha_phc2sys is
enabled and there are no valid sources.

Story: 2010723
Task: 49010

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Ia8cd15c3711bed45e6d082e322af83f2e4d5cac3
2023-11-02 13:57:44 -04:00
Caio Bruchert
5da5f961a6 [PTP] Update image tags in helm charts
Update the image tags for:

notificationservice-base
stx.9.0-v2.1.2

notificationservice-base-v2
stx.9.0-v2.1.2

Partial-bug: 2033539
Partial-bug: 2036293

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

Change-Id: I8fa1a4028a310d38c3154ff5d0290a02900735a1
Signed-off-by: Caio Bruchert <caio.bruchert@windriver.com>
2023-09-27 18:06:32 +00:00
Zuul
4f5f67101d Merge "Update default ptp4lClockClassLockedList values" 2023-09-22 17:33:31 +00:00
Cole Walker
f2542a59f1 Update default ptp4lClockClassLockedList values
In order to better support the default configuration when
ptp-notification is deployed on a BC, the ptp4lClockClassLockedList
values should in include 135 as a locked clockClass.

This change ensures that classes 6, 7 and 135 are considered acceptable
for the ptp-notification locked state by default, with the ability to
override the acceptable clockClasses available to the user.

Test plan:
PASS: Build ptp-notification helm charts
PASS: Deploy ptp-notification
PASS: v1 api - test ptp4lClockClassLockedList with the default list
PASS: v2 api - test ptp4lClockClassLockedList with the default list

Partial-bug: 2033539

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Ic569c373dc2ddf1771e83b12832ef1460266c93a
2023-09-21 09:58:27 -04:00
Andre Mauricio Zelak
8a0127e7a3 Fix ptp-notification sending the wrong state FREERUN
If the local GNSS timing is locked and time is correctly synced to the
realtime clock, the ptp-notification will report LOCKED regardless of
any port status that may be redistributing the time.

Test plan:
PASS: Build containers and helm charts
PASS: Deploy ptp-notification
PASS: test v1 API /ocloudNotifications/v1/PTP/CurrentState
    with both interface MASTER and FAULTY
PASS: test v2 API /./controller-0/sync/ptp-status/lock-state
    with both interface MASTER and FAULTY

Closes-bug: 2036293

Change-Id: I3b12821939b2f720634c82fbbc2adfc216c967f1
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2023-09-20 12:42:00 -03:00
Zuul
83b605763f Merge "Remove unit test class HelmOperatorTestSuiteMixin" 2023-09-15 06:09:45 +00:00
Caio Bruchert
63ba400fcd Make ptp-notification parameters configurable
To allow more flexibility to the user, The following PTP parameters
are being exposed to Helm Charts overrides configuration:

ptp-notification-v1:
- ptp4lClockClassLockedList

ptp-notification-v2:
- ptp4lClockClassLockedList
- phc2sysToleranceThreshold

Test Plan:
PASS: Build containers and helm charts
PASS: Deploy ptp-notification
PASS: v1 api - test ptp4lClockClassLockedList with the default,
               non-default and invalid lists
PASS: v2 api - test ptp4lClockClassLockedList with the default,
               non-default and invalid lists
PASS: v2 api - test phc2sysToleranceThreshold with commandline option
PASS: v2 api - test phc2sysToleranceThreshold with config file

Closes-bug: 2033539

Change-Id: I7dc915d99a91ff405c4cca4f1e1c1bf3a3559a4e
Signed-off-by: Caio Bruchert <caio.bruchert@windriver.com>
2023-09-11 12:27:14 -03:00
David Barbosa Bastos
1304260f12 Remove unit test class HelmOperatorTestSuiteMixin
The purpose of this change is to remove the
HelmOperatorTestSuiteMixin in the unit tests. This reference is
part of Armada and crashes Zuul because it was removed
here: https://review.opendev.org/c/starlingx/config/+/869094

Test Plan:
PASS build-pkgs -p python3-k8sapp-ptp-notification
PASS build-pkgs -p stx-ptp-notification-helm
PASS unit test is performed successfully

Story: 2010560
Task: 48749

Change-Id: I3a86c21cb0ee6168420174dd18aa1e0c198b50ab
Signed-off-by: David Barbosa Bastos <david.barbosabastos@windriver.com>
2023-09-07 09:11:28 -03:00
Cole Walker
0dae44b92d Update ptp-notification phc2sys HA clock source tracking
Check for the presence of a phc2sys source clock when phc2sys HA mode is
enabled and set lock state accordingly if no source is found.

For ptp-notification-v2, this change affects the os clock state
tracking. If HA mode is enabled and no clock source is present, proceed
to transition to HOLDOVER and FREERUN states as required.

For ptp-notification-v1, there has never been support for checking
whether phc2sys is synced/locked, only whether the service is running.
In order to leave the default behaviour the same, a user supplied helm
override PHC2SYS_COM_SOCKET can be set. By providing a path to the
phc2sys socket, ptp-notification-v1 will now check to see if a source
clock is present for phc2sys and transition to HOLDOVER and FREERUN if
no source is found. When the PHC2SYS_COM_SOCKET value is not provided,
ptp-notification-v1 maintains the default behaviour and does not check
for the presence of a source clock.

Test Plan:
PASS: Build containers and helm charts
PASS: Deploy ptp-notification
PASS: v2 api - test state transition when source clock is
lost/returns
PASS: v1 api - validate that default behaviour is unchanged when
phc2sys com socket is not set
PASS: v1 api - verify state transition when phc2sys source clock is
lost/returns

Story: 2010723
Task: 48514

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I769d36df024d207bf0f70efd11d68d8a8809f713
vf/antelope
2023-08-01 12:54:38 -04:00
Davlet Panech
af89f51505 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: I4196d2a5543951b7a38f92a30bd4e53f5af506be
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2023-04-28 12:38:53 -04:00