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

Set the execute bit on sysDescr_pass.py #306

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

AKosturArista
Copy link
Contributor

@AKosturArista AKosturArista commented Jan 10, 2024

Why I did it

Slim images may have a sysDescr_pass.py script that does not correctly have the execute bit set resulting in any request for the sysDescr.0 OID via SNMP would fail. By setting the execute bit directly in source control, this script is no longer reliant on any deployment script to fix the permissions after the fact.

How I did it

Set the execute bit directly within source control

How to verify it

Testing on a platform which uses a slim image should reliably pass the snmp/test_snmp_v2mib.py test.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Set the execute bit on the script in git instead of relying on a deployment script later to set the bit.
Copy link

linux-foundation-easycla bot commented Jan 10, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: AKosturArista / name: Andre Kostur (dedf7eb)

@SuvarnaMeenakshi
Copy link
Contributor

This seems like a work around, because with the slim image loaded, I was able to run a python script inside snmp docker to copy the sysDescr_pass.py to the location and change the mode to allow execution. What is the reason that we are able to do it during run time but does not occur when sonic_ax_impl comes up?

Copy link

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS
Copy link

hi @SuvarnaMeenakshi I plan to take this as a workaround for now.

  1. only one file get impacted by this permission missing issue, other files which are impacted are not run time using. more details in https://github.com/aristanetworks/sonic-qual.msft/issues/46
  2. this issue could be caused by the build of process of slim image, it may take longer time to figure out, arista can keep going, but it won't be a blocker issue for slim images.

let me know if any concern.

Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the work around for slim image fix.

@qiluo-msft qiluo-msft merged commit 4a6de8b into sonic-net:master Jan 17, 2024
5 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-snmpagent that referenced this pull request Jan 17, 2024
#### Why I did it
Slim images may have a sysDescr_pass.py script that does not correctly have the execute bit set resulting in any request for the sysDescr.0 OID via SNMP would fail.  By setting the execute bit directly in source control, this script is no longer reliant on any deployment script to fix the permissions after the fact.

#### How I did it
Set the execute bit directly within source control

#### How to verify it
Testing on a platform which uses a slim image should reliably pass the snmp/test_snmp_v2mib.py test.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #307

mssonicbld pushed a commit that referenced this pull request Jan 18, 2024
#### Why I did it
Slim images may have a sysDescr_pass.py script that does not correctly have the execute bit set resulting in any request for the sysDescr.0 OID via SNMP would fail.  By setting the execute bit directly in source control, this script is no longer reliant on any deployment script to fix the permissions after the fact.

#### How I did it
Set the execute bit directly within source control

#### How to verify it
Testing on a platform which uses a slim image should reliably pass the snmp/test_snmp_v2mib.py test.
mssonicbld pushed a commit to mssonicbld/sonic-snmpagent that referenced this pull request Feb 2, 2024
#### Why I did it
Slim images may have a sysDescr_pass.py script that does not correctly have the execute bit set resulting in any request for the sysDescr.0 OID via SNMP would fail.  By setting the execute bit directly in source control, this script is no longer reliant on any deployment script to fix the permissions after the fact.

#### How I did it
Set the execute bit directly within source control

#### How to verify it
Testing on a platform which uses a slim image should reliably pass the snmp/test_snmp_v2mib.py test.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202311: #311

mssonicbld pushed a commit that referenced this pull request Feb 2, 2024
#### Why I did it
Slim images may have a sysDescr_pass.py script that does not correctly have the execute bit set resulting in any request for the sysDescr.0 OID via SNMP would fail.  By setting the execute bit directly in source control, this script is no longer reliant on any deployment script to fix the permissions after the fact.

#### How I did it
Set the execute bit directly within source control

#### How to verify it
Testing on a platform which uses a slim image should reliably pass the snmp/test_snmp_v2mib.py test.
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.

6 participants