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

Fix portstat case #6148

Merged
merged 1 commit into from
Sep 22, 2022
Merged

Fix portstat case #6148

merged 1 commit into from
Sep 22, 2022

Conversation

JibinBao
Copy link
Contributor

There is a bug fix for "portstat -c -t filename" which changes the path of portstat status file, so we need to update the relevant portstat test:
sonic-net/sonic-utilities#2232
sonic-net/sonic-buildimage#11244

  1. Orignal design: After running “portstat -c -t filename”, status file will be created on the folder of /tmp/portstat-{uid}/{uid}-{filename}
  2. New design: After running “portstat -c -t filename”, status file will be created on the folder of /tmp/cache/portstat/{uid}-{filename}

Change-Id: Ia122a08b9a55a26fe6a299d74d2df1f1949c7ca3

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012

Approach

What is the motivation for this PR?

Fix test issue, because there is a relevant bug fix for the product.

How did you do it?

Change the test as the new desgin.

  1. Orignal design: After running “portstat -c -t filename”, status file will be created on the folder of /tmp/portstat-{uid}/{uid}-{filename}
  2. New design: After running “portstat -c -t filename”, status file will be created on the folder of /tmp/cache/portstat/{uid}-{filename}

How did you verify/test it?

Run the tests on the image with bug fix

Any platform specific information?

Any

Supported testbed topology if it's a new test case?

Any

Documentation

Becuase desigin change for "portstat -c -t filename", so change portstat test
1. Orignal design: After running “portstat -c -t  filename”, status file will be created on the folder of /tmp/portstat-{uid}/{uid}-{filename}
2. New design: After running “portstat -c -t  filename”, status file will be created on the folder of /tmp/cache/portstat/{uid}-{filename}

Change-Id: Ia122a08b9a55a26fe6a299d74d2df1f1949c7ca3
@JibinBao
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JibinBao
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@JibinBao
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JibinBao
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@nhe-NV
Copy link
Contributor

nhe-NV commented Aug 30, 2022

/azpw run

@liat-grozovik
Copy link
Collaborator

/azp run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin
Copy link
Collaborator

wangxin commented Aug 31, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@romanvasylys
Copy link
Contributor

Can we add backwards compatibility to this function? For example:

if int(re.search(r'20[0-9]{2}[0-1][0-9][0-3][0-9]', duthost.os_version)[0]) < 20220801:
    path='/tmp/portstat-{uid}/{uid}-{filename}'
else:
    path='/tmp/cache/portstat/{uid}-{filename}'

@JibinBao
Copy link
Contributor Author

JibinBao commented Sep 5, 2022

Can we add backwards compatibility to this function? For example:

if int(re.search(r'20[0-9]{2}[0-1][0-9][0-3][0-9]', duthost.os_version)[0]) < 20220801:
    path='/tmp/portstat-{uid}/{uid}-{filename}'
else:
    path='/tmp/cache/portstat/{uid}-{filename}'

The bug fixes: sonic-net/sonic-buildimage#11244, sonic-net/sonic-utilities#2232, which should be backported to branch 202205.
For the master branch of sonic-mgmt, do we still check the os version?

@JibinBao
Copy link
Contributor Author

JibinBao commented Sep 5, 2022

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JibinBao
Copy link
Contributor Author

JibinBao commented Sep 5, 2022

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JibinBao
Copy link
Contributor Author

JibinBao commented Sep 9, 2022

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JibinBao
Copy link
Contributor Author

JibinBao commented Sep 9, 2022

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@romanvasylys
Copy link
Contributor

Can we add backwards compatibility to this function? For example:

if int(re.search(r'20[0-9]{2}[0-1][0-9][0-3][0-9]', duthost.os_version)[0]) < 20220801:
    path='/tmp/portstat-{uid}/{uid}-{filename}'
else:
    path='/tmp/cache/portstat/{uid}-{filename}'

The bug fixes: sonic-net/sonic-buildimage#11244, sonic-net/sonic-utilities#2232, which should be backported to branch 202205. For the master branch of sonic-mgmt, do we still check the os version?

Thank you for clarification. In case of fix being backported, OS version check is not needed.

@JibinBao
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

/azp run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm arlakshm merged commit 7f13109 into sonic-net:master Sep 22, 2022
wangxin pushed a commit that referenced this pull request Sep 28, 2022
Becuase desigin change for "portstat -c -t filename", so change portstat test
1. Orignal design: After running “portstat -c -t  filename”, status file will be created on the folder of /tmp/portstat-{uid}/{uid}-{filename}
2. New design: After running “portstat -c -t  filename”, status file will be created on the folder of /tmp/cache/portstat/{uid}-{filename}

Change-Id: Ia122a08b9a55a26fe6a299d74d2df1f1949c7ca3
Azarack pushed a commit to Azarack/sonic-mgmt that referenced this pull request Oct 17, 2022
Becuase desigin change for "portstat -c -t filename", so change portstat test
1. Orignal design: After running “portstat -c -t  filename”, status file will be created on the folder of /tmp/portstat-{uid}/{uid}-{filename}
2. New design: After running “portstat -c -t  filename”, status file will be created on the folder of /tmp/cache/portstat/{uid}-{filename}

Change-Id: Ia122a08b9a55a26fe6a299d74d2df1f1949c7ca3
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
Becuase desigin change for "portstat -c -t filename", so change portstat test
1. Orignal design: After running “portstat -c -t  filename”, status file will be created on the folder of /tmp/portstat-{uid}/{uid}-{filename}
2. New design: After running “portstat -c -t  filename”, status file will be created on the folder of /tmp/cache/portstat/{uid}-{filename}

Change-Id: Ia122a08b9a55a26fe6a299d74d2df1f1949c7ca3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

10 participants