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

[logfile]: Add option to specify swss rec file name #1546

Merged
merged 6 commits into from
Jan 22, 2021

Conversation

arlakshm
Copy link
Contributor

What I did
Add new options to specify swss rec and sairedis rec file name.
Corresponding change in sairedis sonic-net/sonic-sairedis#747

Why I did it
This option will be used in the multi asic system. The swss and sairedis record filename will be different for each asic and will be passed from the orchagent.sh

How I verified it

  • Check if swss.rec and sairedis.rec files are created when the new options are not used
admin@vlab-01:~$ ls /var/log/swss/
sairedis.rec  swss.rec
admin@vlab-01:~$ tail -10 /var/log/swss/sairedis.rec
2020-12-15.17:57:02.194381|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd00000000059e|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.17:57:02.195879|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd00000000059d|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.17:57:02.197539|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd00000000059f|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.17:57:02.210632|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005a0|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.17:57:02.221479|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd000000000595|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.17:57:02.223484|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005a8|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.17:57:02.229325|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005a7|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.17:57:02.231627|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005a9|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.17:57:02.233420|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005aa|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.17:57:02.236314|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005ac|SAI_HOSTIF_ATTR_OPER_STATUS=true
admin@vlab-01:~$ tail -10 /var/log/swss/swss.rec
2020-12-15.17:57:01.728078|BUFFER_PG|Ethernet64|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
2020-12-15.17:57:01.728093|BUFFER_PG|Ethernet68|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
2020-12-15.17:57:01.728108|BUFFER_PG|Ethernet72|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
2020-12-15.17:57:01.728122|BUFFER_PG|Ethernet76|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
2020-12-15.17:57:01.728137|BUFFER_PG|Ethernet8|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
2020-12-15.17:57:01.728152|BUFFER_PG|Ethernet80|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
2020-12-15.17:57:01.728167|BUFFER_PG|Ethernet84|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
2020-12-15.17:57:01.728182|BUFFER_PG|Ethernet88|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
2020-12-15.17:57:01.728196|BUFFER_PG|Ethernet92|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
2020-12-15.17:57:01.728210|BUFFER_PG|Ethernet96|3-4|SET|profile:[BUFFER_PROFILE|pg_lossless_40000_5m_profile]
  • Update the orchagent.sh to provide the swss.asic0.rec and sairedis.asic0.rec and verify the files are created
admin@vlab-01:~$ docker exec -it swss grep -i asic0 /usr/bin/orchagent.sh
ORCHAGENT_ARGS+=" -f swss.asic0.rec -j sairedis.asic0.rec"
admin@vlab-01:~$ sudo systemctl restart swss
admin@vlab-01:~$ ls /var/log/swss/
sairedis.asic0.rec  sairedis.rec  swss.asic0.rec  swss.rec
admin@vlab-01:~$ tail -10 /var/log/swss/swss.asic0.rec
2020-12-15.18:01:49.716184|ROUTE_TABLE:fc00::7c/126|SET|nexthop:::|ifname:PortChannel0004
2020-12-15.18:01:49.716194|ROUTE_TABLE:2064:100::1d|SET|nexthop:fc00::72|ifname:PortChannel0001
2020-12-15.18:01:49.716232|ROUTE_TABLE:2064:100::20|SET|nexthop:fc00::7e|ifname:PortChannel0004
2020-12-15.18:01:49.716410|ROUTE_TABLE:100.1.0.30|SET|nexthop:10.0.0.59|ifname:PortChannel0002
2020-12-15.18:01:49.716422|ROUTE_TABLE:10.0.0.58/31|SET|nexthop:0.0.0.0|ifname:PortChannel0002
2020-12-15.18:01:49.716434|ROUTE_TABLE:100.1.0.31|SET|nexthop:10.0.0.61|ifname:PortChannel0003
2020-12-15.18:01:49.716446|ROUTE_TABLE:fe80::/64|SET|nexthop:::|ifname:eth0
2020-12-15.18:01:49.718218|ROUTE_TABLE:2064:100::1e|SET|nexthop:fc00::76|ifname:PortChannel0002
2020-12-15.18:01:49.719083|ROUTE_TABLE:fc00::74/126|SET|nexthop:::|ifname:PortChannel0002
2020-12-15.18:01:49.719118|ROUTE_TABLE:10.0.0.56/31|SET|nexthop:0.0.0.0|ifname:PortChannel0001
admin@vlab-01:~$ tail -10 /var/log/swss/sairedis.asic0.rec
2020-12-15.18:01:49.863253|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd00000000059e|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.18:01:49.864090|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd00000000059d|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.18:01:49.865178|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd00000000059f|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.18:01:49.865863|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005a0|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.18:01:49.866615|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd000000000595|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.18:01:49.893033|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005a8|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.18:01:49.912529|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005a7|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.18:01:49.922334|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005a9|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.18:01:49.933690|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005aa|SAI_HOSTIF_ATTR_OPER_STATUS=true
2020-12-15.18:01:49.942162|s|SAI_OBJECT_TYPE_HOSTIF:oid:0xd0000000005ac|SAI_HOSTIF_ATTR_OPER_STATUS=true

Details if related

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
lguohan pushed a commit to sonic-net/sonic-sairedis that referenced this pull request Dec 18, 2020
The PR implements the handling of the sairedis rec filename passed to the orchagent.
Corresponding swss pr : sonic-net/sonic-swss#1546
This change is mainly to be used for multi asic devices where each asic.

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
@arlakshm
Copy link
Contributor Author

retest this please

@arlakshm
Copy link
Contributor Author

retest LGTM please

orchagent/main.cpp Show resolved Hide resolved
orchagent/main.cpp Show resolved Hide resolved
orchagent/main.cpp Outdated Show resolved Hide resolved
orchagent/main.cpp Outdated Show resolved Hide resolved
orchagent/main.cpp Outdated Show resolved Hide resolved
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
@arlakshm
Copy link
Contributor Author

retest this please

@arlakshm
Copy link
Contributor Author

@shi-su, @lguohan , @kcudnik, @abdosi, can you please approve if there are no other comments

@arlakshm
Copy link
Contributor Author

retest this please

@arlakshm
Copy link
Contributor Author

retest Azure.sonic-swss please

@arlakshm
Copy link
Contributor Author

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm arlakshm merged commit e800c9f into sonic-net:master Jan 22, 2021
arlakshm added a commit to sonic-net/sonic-buildimage that referenced this pull request Jan 22, 2021
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan arlakshm@microsoft.com

- Why I did it
This PR has the changes to support having different swss.rec and sairedis.rec for each asic.
The logrotate script is updated as well

- How I did it

Update the orchagent.sh script to use the logfile name options in these PRs(sonic-net/sonic-swss#1546 and sonic-net/sonic-sairedis#747)
In multi asic platforms the record files will be different for each asic, with the format swss.asic{x}.rec and sairedis.asic{x}.rec

Update the logrotate script for multiasic platform .
abdosi pushed a commit that referenced this pull request Jan 28, 2021
What I did
Add new options to specify swss rec and sairedis rec file name.
Corresponding change in sairedis sonic-net/sonic-sairedis#747

Why I did it
This option will be used in the multi asic system. The swss and sairedis record filename will be different for each asic and will be passed from the orchagent.sh
abdosi pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Jan 28, 2021
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan arlakshm@microsoft.com

- Why I did it
This PR has the changes to support having different swss.rec and sairedis.rec for each asic.
The logrotate script is updated as well

- How I did it

Update the orchagent.sh script to use the logfile name options in these PRs(sonic-net/sonic-swss#1546 and sonic-net/sonic-sairedis#747)
In multi asic platforms the record files will be different for each asic, with the format swss.asic{x}.rec and sairedis.asic{x}.rec

Update the logrotate script for multiasic platform .
yxieca pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Feb 23, 2021
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan arlakshm@microsoft.com

- Why I did it
This PR has the changes to support having different swss.rec and sairedis.rec for each asic.
The logrotate script is updated as well

- How I did it

Update the orchagent.sh script to use the logfile name options in these PRs(sonic-net/sonic-swss#1546 and sonic-net/sonic-sairedis#747)
In multi asic platforms the record files will be different for each asic, with the format swss.asic{x}.rec and sairedis.asic{x}.rec

Update the logrotate script for multiasic platform .
kktheballer pushed a commit to kktheballer/sonic-sairedis that referenced this pull request Feb 25, 2021
The PR implements the handling of the sairedis rec filename passed to the orchagent.
Corresponding swss pr : sonic-net/sonic-swss#1546
This change is mainly to be used for multi asic devices where each asic.

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
DavidZagury pushed a commit to DavidZagury/sonic-swss that referenced this pull request Mar 4, 2021
What I did
Add new options to specify swss rec and sairedis rec file name.
Corresponding change in sairedis sonic-net/sonic-sairedis#747

Why I did it
This option will be used in the multi asic system. The swss and sairedis record filename will be different for each asic and will be passed from the orchagent.sh
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
What I did
Add new options to specify swss rec and sairedis rec file name.
Corresponding change in sairedis sonic-net/sonic-sairedis#747

Why I did it
This option will be used in the multi asic system. The swss and sairedis record filename will be different for each asic and will be passed from the orchagent.sh
judyjoseph added a commit to judyjoseph/sonic-swss that referenced this pull request Oct 7, 2021
qiluo-msft pushed a commit that referenced this pull request Oct 9, 2021
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…1546)

#### What I did
This PR sonic-net/sonic-utilities#1393 merged after PR: sonic-net/sonic-utilities#1392
This caused the first PR to be not aligned with SonicV2Connector change.
This PR motivation is to fix it.
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
The PR implements the handling of the sairedis rec filename passed to the orchagent.
Corresponding swss pr : sonic-net/sonic-swss#1546
This change is mainly to be used for multi asic devices where each asic.

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants