sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

[db_migrator][telemetry] Remove the telemetry from the feature table

Open mlok-nokia opened this issue 1 year ago • 0 comments

What I did

Feature telemetry has been replaced by GNMI. This PR removes the telemetry feature from FEATURE table to avoid the logging message shown up every minute when upgrade a platform from 202205 to 202405 image. It fixes https://github.com/sonic-net/sonic-buildimage/issues/20056.

The following is the log message:

2024 Aug 28 15:35:12.219750 Linecard WARNING Chassis: Failed to get image 'docker-sonic-telemetry'. Error: '404 Client Error for http+docker://localhost/v1.43/images/docker-sonic-telemetry/json: Not Found ("No such image: docker-sonic-telemetry:latest")'

How I did it

Modified the db_migrator by adding function migrate_remove_feature() to remove the telemetry related configuration in the CONFIG_DB if telemetry config exists. Configuration includes "FEATURE|telemetry" and "AUTO_TECHSUPPORT|telemetry"

How to verify it

  1. Upgrade a platform which is running 202205 image.
  2. Using the following command to verify the telemetry is no longer in the CONFIG_BD
admin@ixre-egl-board25:~$ sonic-db-dump -n CONFIG_DB -y -k "FEATURE|telemetry"
{}
admin@ixre-egl-board25:~$ sonic-db-dump -n CONFIG_DB -y -k "AUTO_TECHSUPPORT_FEATURE|telemetry"
{}
  1. Check the syslog. The following message should not be shown
Linecard WARNING Chassis: Failed to get image 'docker-sonic-telemetry'. Error: '404 Client Error for http+docker://localhost/v1.43/images/docker-sonic-telemetry/json: Not Found ("No such image: docker-sonic-telemetry:latest")'

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

mlok-nokia avatar Oct 04 '24 14:10 mlok-nokia