Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GCU] bgpl and bgp_prefix test report syslog err when do removal #2115

Closed
wen587 opened this issue Mar 25, 2022 · 3 comments
Closed

[GCU] bgpl and bgp_prefix test report syslog err when do removal #2115

wen587 opened this issue Mar 25, 2022 · 3 comments

Comments

@wen587
Copy link
Contributor

wen587 commented Mar 25, 2022

Description

Please read below info after finish Steps to reproduce the issue

I guess this issue come from below logic:

The whole config removal is split to two action:

  • remove admin_status as it is not create-only field
  • remove the left fields together as they are create-only fields

When admin_status was removed, the config looks like we are do a 'SET' option to modify the bgp monitor from

    "BGP_MONITORS": {
        "11.0.0.1": {
            "admin_status": "up",
            "asn": "65100",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.1.0.32",
            "name": "BGPMonitor",
            "nhopself": "0",
            "rrclient": "0"
        }
    }

to the one without admin_status.

    "BGP_MONITORS": {
        "11.0.0.1": {
            "asn": "65100",
            "holdtime": "180",
            "keepalive": "60",
            "local_addr": "10.1.0.32",
            "name": "BGPMonitor",
            "nhopself": "0",
            "rrclient": "0"
        }
    }

But we are not actually do the 'SET' option, just a list of removal.

Steps to reproduce the issue

  1. Apply BGP_Monitor config
admin@vlab-01:~/bgpl$ cat add.json
[ {
  "op": "add",
  "path": "/BGP_MONITORS",
  "value": {
   "11.0.0.1": {
    "admin_status": "up",
    "asn": "65100",
    "holdtime": "180",
    "keepalive": "60",
    "local_addr": "10.1.0.32",
    "name": "BGPMonitor",
    "nhopself": "0",
    "rrclient": "0"
   }
  }
 }
]
admin@vlab-01:~/bgpl$ sudo config apply-patch add.json
Patch Applier: Patch application starting.
Patch Applier: Patch: [{"op": "add", "path": "/BGP_MONITORS", "value": {"11.0.0.1": {"admin_status": "up", "asn": "65100", "holdtime": "180", "keepalive": "60", "local_addr": "10.1.0.32", "name": "BGPMonitor", "nhopself": "0", "rrclient": "0"}}}]
...
Patch Applier: Verifying patch updates are reflected on ConfigDB.
Patch Applier: Patch application completed.
Patch applied successfully.

  1. Remove BGPMONITOR config and cat syslog err
    2.1 remove bgpmonitor config
admin@vlab-01:~/bgpl$ cat rm.json
[
 {
  "op": "remove",
  "path": "/BGP_MONITORS"
 }
]
admin@vlab-01:~/bgpl$ sudo config apply-patch rm.json
...
Patch Applier: The patch was sorted into 2 changes:
Patch Applier:   * [{"op": "remove", "path": "/BGP_MONITORS/11.0.0.1/admin_status"}]     <=======
Patch Applier:   * [{"op": "remove", "path": "/BGP_MONITORS"}]                     <============
Patch Applier: Applying 2 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/BGP_MONITORS/11.0.0.1/admin_status"}]
Patch Applier:   * [{"op": "remove", "path": "/BGP_MONITORS"}]
Patch Applier: Verifying patch updates are reflected on ConfigDB.
Patch Applier: Patch application completed.
Patch applied successfully.

2.2 syslog when removal

admin@vlab-01:~$ show logging -f | grep ERR
Mar 25 09:23:23.886809 vlab-01 ERR bgp#bgpcfgd: Peer '(default|11.0.0.1)': Can't update the peer. Only 'admin_status' attribute is supported

Describe the results you received

Syslog have error when do removal

Describe the results you expected

Two ways of fix in my mind:

  1. Make sure syslog doesn't report ERR
  2. Ignore this kind of error. The bgp monitor config removal is successful as it is not a real issue.

Additional information you deem important (e.g. issue happens only occasionally)

Output of show version

(paste your output here)
@ghooo
Copy link
Contributor

ghooo commented Mar 25, 2022

This seems like an issue in bgpcfgd. The operation is removing admin_status using SET operation, but the bgpcfgd is complaining it is only possible to remove admin_status which is what we are doing. This is a contradiction.

@wen587
Copy link
Contributor Author

wen587 commented Apr 2, 2022

fix by #2120

@wen587 wen587 changed the title [GCU] bgpl test report syslog err when do removal [GCU] bgpl and bgp_prefix test report syslog err when do removal Apr 2, 2022
@wen587
Copy link
Contributor Author

wen587 commented Apr 2, 2022

For bgp_prefix test, Log analyzer will also report err:
ERR bgp#bgpcfgd: BGPAllowListMgr::Received BGP ALLOWED 'SET' message with no prefixes specified: {'NULL': 'NULL'}
This is also fixed by above optimization group PR.

@wen587 wen587 closed this as completed Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants