"updated_at" field in "system oam-show" cmd is not updated after changing oam_ip

Bug #2066156 reported by Sirin Shaikh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Sirin Shaikh

Bug Description

Description of failure
updated_at field is not updated after changing oam_ip.

Impact of Failure
Minor

Impact on Customer
"updated_at" field isn't updated after changing the oam-ip even though the new value is successfully updated.

Example:
[sysadmin@controller-0 ~(keystone_admin)]$ system oam-show
+----------------+---------------------------------------+
| Property | Value |
+----------------+---------------------------------------+
| created_at | 2024-04-01T21:32:01.829571+00:00 |
| isystem_uuid | 0c1df039-a29d-481a-aa73-c99fe2b21d1d |
| oam_end_ip | 2607:f160:10:9075:ffff:ffff:ffff:fffe |
| oam_gateway_ip | 2607:f160:10:9075:ce:28:: |
| oam_ip | 2607:f160:10:9075:ce:40a:0:f4aa |
| oam_start_ip | 2607:f160:10:9075::1 |
| oam_subnet | 2607:f160:10:9075::/64 |
| updated_at | None |
| uuid | 53292b48-307c-402f-b8f4-e14761139cc0 |
+----------------+---------------------------------------+

Timeline based analysis:

--->Bash logs - oam ip modified successfully@2024-04-02T18:04:50.051

2024-04-02T18:04:17.528 controller-0 -bash: info HISTORY: PID=288258 UID=42425 system oam-show
2024-04-02T18:04:50.051 controller-0 -bash: info HISTORY: PID=288258 UID=42425 system oam-modify oam_ip=2607:f160:10:9075:ce:40a:0:f4aa
2024-04-02T19:11:32.483 controller-0 -bash: info HISTORY: PID=717328 UID=42425 system oam-show
2024-04-02T19:12:50.804 controller-0 -bash: info HISTORY: PID=717328 UID=42425 sudo grep oam-modify /var/log/bash.log | grep -v grep

--->sysinv logs: oam-config-update triggered@2024-04-02 18:04:52.272

sysinv 2024-04-02 18:04:52.159 210773 INFO sysinv.api.controllers.v1.network_oam [-] extoam {'id': 3, 'uuid': '53292b48-307c-402f-b8f4-e14761139cc0', 'forisystemid': 1, 'isystem_uuid': '0c1df039-a29d-481a-aa73-c99fe2b21d1d', 'oam_subnet': '2607:f160:10:9075::/64', 'oam_start_ip': '2607:f160:10:9075::1', 'oam_end_ip': '2607:f160:10:9075:ffff:ffff:ffff:fffe', 'oam_c0_ip': None, 'oam_c1_ip': None, 'oam_gateway_ip': '2607:f160:10:9075:ce:28::', 'oam_floating_ip': '2607:f160:10:9075:ce:40a:0:f4aa', 'created_at': datetime.datetime(2024, 4, 1, 21, 32, 1, 829571, tzinfo=datetime.timezone.utc), 'updated_at': None, 'action': None, 'region_config': True}, region_config=True
sysinv 2024-04-02 18:04:52.272 206747 INFO sysinv.conductor.manager [-] _config_update_hosts personalities=['controller'] host_uuids=None reboot=False config_uuid=2bdae31a-0e28-458c-815a-ff819f6c2e73 tb=  File "/usr/lib/python3/dist-packages/sysinv/conductor/manager.py", line 8303, in update_oam_config
    config_uuid = self._config_update_hosts(context, personalities)
sysinv 2024-04-02 18:04:52.280 206747 INFO sysinv.conductor.manager [-] Setting config target of host 'controller-0' to '2bdae31a-0e28-458c-815a-ff819f6c2e73'.
sysinv 2024-04-02 18:04:52.290 206747 WARNING sysinv.conductor.manager [-] controller-0: iconfig out of date: target 2bdae31a-0e28-458c-815a-ff819f6c2e73, applied 3e2a2b12-d998-4840-b265-8c8e189a5b8d
sysinv 2024-04-02 18:04:52.290 206747 WARNING sysinv.conductor.manager [-] SYS_I Raise system config alarm: host controller-0 config applied: 3e2a2b12-d998-4840-b265-8c8e189a5b8d  vs. target: 2bdae31a-0e28-458c-815a-ff819f6c2e73.
sysinv 2024-04-02 18:04:52.299 206747 INFO sysinv.conductor.manager [-] _config_update_hosts config_uuid=2bdae31a-0e28-458c-815a-ff819f6c2e73
sysinv 2024-04-02 18:04:52.303 206747 INFO sysinv.conductor.manager [-] applying runtime manifest config_uuid=2bdae31a-0e28-458c-815a-ff819f6c2e73, classes: ['platform::network::runtime', 'platform::kubernetes::certsans::runtime', 'platform::firewall::runtime', 'platform::smapi', 'platform::sm::update_oam_config::runtime', 'platform::nfv::webserver::runtime', 'platform::haproxy::runtime', 'openstack::keystone::endpoint::runtime::post', 'platform::dockerdistribution::config', 'platform::dockerdistribution::runtime']
sysinv 2024-04-02 18:04:52.310 206747 INFO sysinv.puppet.puppet [-] Updating hiera for host: controller-0 with config_uuid: 2bdae31a-0e28-458c-815a-ff819f6c2e73

--->controller-0 Configuration is out-of-date triggered@2024-04-02T18:04:52.490

2024-04-02T18:04:52.490 controller-0 fmManager: info { "event_log_id" : "250.001", "reason_text" : "controller-0 Configuration is out-of-date. (applied: 3e2a2b12-d998-4840-b265-8c8e189a5b8d target: 2bdae31a-0e28-458c-815a-ff819f6c2e73)", "entity_instance_id" : "region=welktxef-d000004-001.system=welktxef-d000004-001.host=controller-0", "severity" : "major", "state" : "set", "timestamp" : "2024-04-02 18:04:52.290458" }

--->Config applied@2024-04-02 18:11:38.723

sysinv 2024-04-02 18:04:57.026 15886 INFO sysinv.agent.manager [-] config_apply_runtime_manifest: 2bdae31a-0e28-458c-815a-ff819f6c2e73 {'personalities': ['controller'], 'classes': ['platform::network::runtime', 'platform::kubernetes::certsans::runtime', 'platform::firewall::runtime', 'platform::smapi', 'platform::sm::update_oam_config::runtime', 'platform::nfv::webserver::runtime', 'platform::haproxy::runtime', 'openstack::keystone::endpoint::runtime::post', 'platform::dockerdistribution::config', 'platform::dockerdistribution::runtime'], 'force': False} controller
sysinv 2024-04-02 18:11:38.723 15886 INFO sysinv.agent.manager [-] Agent config applied  2bdae31a-0e28-458c-815a-ff819f6c2e73

--->controller-0 Configuration is out-of-date cleared@2024-04-02T18:11:38.928

2024-04-02T18:11:38.928 controller-0 fmManager: info { "event_log_id" : "250.001", "reason_text" : "controller-0 Configuration is out-of-date. (applied: 3e2a2b12-d998-4840-b265-8c8e189a5b8d target: 2bdae31a-0e28-458c-815a-ff819f6c2e73)", "entity_instance_id" : "region=welktxef-d000004-001.system=welktxef-d000004-001.host=controller-0", "severity" : "major", "state" : "clear", "timestamp" : "2024-04-02 18:11:38.927118" }

--->system oam-show 'updated_at' field shows 'None' though the oam_ip shows the **updated* value. We believe it should show the timestamp of the update.*

[sysadmin@controller-0 ~(keystone_admin)]$ system oam-show
+----------------+---------------------------------------+
| Property | Value |
+----------------+---------------------------------------+
| created_at | 2024-04-01T21:32:01.829571+00:00 |
| isystem_uuid | 0c1df039-a29d-481a-aa73-c99fe2b21d1d |
| oam_end_ip | 2607:f160:10:9075:ffff:ffff:ffff:fffe |
| oam_gateway_ip | 2607:f160:10:9075:ce:28:: |
| oam_ip | 2607:f160:10:9075:ce:40a:0:f4aa |
| oam_start_ip | 2607:f160:10:9075::1 |
| oam_subnet | 2607:f160:10:9075::/64 |
| updated_at | None |
| uuid | 53292b48-307c-402f-b8f4-e14761139cc0 |
+----------------+---------------------------------------+

Sirin Shaikh (sshaikh1)
Changed in starlingx:
assignee: nobody → Sirin Shaikh (sshaikh1)
Sirin Shaikh (sshaikh1)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/config/+/920024

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/920024
Committed: https://opendev.org/starlingx/config/commit/00f2d47323821f7effda5341100a3cbd679cf5bc
Submitter: "Zuul (22348)"
Branch: master

commit 00f2d47323821f7effda5341100a3cbd679cf5bc
Author: sshaikh1 <email address hidden>
Date: Mon May 20 05:56:53 2024 -0400

    Update "updated_at" field on changing oam_ip

    After executing "system oam-modify oam_ip=<x.x.x.x>" command,
    "updated_at" field is always "None" and is not updating.

    This commit contain the code changes to update the sysninv database
    where it populates the "updated_at" column in networks table
    during "system oam-modify" command.

    Test Plan:
    PASS: Developer iso is successfully deployed in Simplex VM with
          current code changes.
    PASS: Validated "updated_at" field after executing "system oam-modify"
          command."updated_at" field is updating correctly.
    PASS: Validated "system oam-show" command to check the "updated_at"
          filed is correctly displayed.
    PASS: Validated the networks table where the "updated_at" column
          is correctly populated.

    Sample output:
    [sysadmin@controller-0 ~(keystone_admin)]$ system oam-show
    +----------------+--------------------------------------+
    | Property | Value |
    +----------------+--------------------------------------+
    | created_at | 2024-05-20T02:24:02.684818+00:00 |
    | isystem_uuid | 30e6d1f3-bc0e-4b59-9533-8edc061e7c63 |
    | oam_gateway_ip | 10.20.7.1 |
    | oam_ip | 10.20.7.7 |
    | oam_subnet | 10.20.7.0/24 |
    | updated_at | 2024-05-20T03:20:46.853689+00:00 |
    | uuid | dc04244e-ee74-4003-9293-2e1ded380a05 |
    +----------------+--------------------------------------+

    Kindly refer launchpad bug for details.

    Closes-Bug: #2066156

    Change-Id: I529fbcdc0fb1530add7e8f2ddd703f37badd71da
    Signed-off-by: sshaikh1 <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.10.0 stx.networking
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.