-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 1) define MAX_CA_ENGINE_ID_LEN 28
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 1) if it fails, dont return.. just log and write other configurations.
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 1) I dont think we need this..
AE-558 SNMP stop working after reboot |ePassport |AS-18023|
Review Request #803 — Created April 16, 2025 and submitted
| Information | |
|---|---|
| rvempati | |
| APV10 | |
| rel_apv_10_7_2 | |
| https://arraynetworks.atlassian.net/browse/AE-558 | |
| Reviewers | |
| mmiriam, pradeep, prajesh, tanya | |
For Array Enterprise ID 7564, used SHA1 Hashing then base64 encoding on serial number to generate engineID to persist across reboots
APV -1:
Before reboot:
/etc/snmp/snmpd.conf
engineID gAAAHYwzRjM5NTU5RDExNUY5MDA
[root@APV-1 test]# snmpget -v 3 -u "rohith" -l authNoPriv -a SHA -A "12345678" 192.168.162.171 1.3.6.1.6.3.10.2.1.1.0
SNMP-FRAMEWORK-MIB::snmpEngineID.0 = Hex-STRING: 80 00 1F 88 04 67 41 41 41 48 59 77 7A 52 6A 4D 35 4E 54 55 35 52 44 45 78 4E 55 59 35 4D 44 41
[root@APV-1 test]#After reboot:
/etc/snmp/snmpd.conf
engineID gAAAHYwzRjM5NTU5RDExNUY5MDA
[root@APV-1 test]# snmpget -v 3 -u "rohith" -l authNoPriv -a SHA -A "12345678" 192.168.162.171 1.3.6.1.6.3.10.2.1.1.0
SNMP-FRAMEWORK-MIB::snmpEngineID.0 = Hex-STRING: 80 00 1F 88 04 67 41 41 41 48 59 77 7A 52 6A 4D 35 4E 54 55 35 52 44 45 78 4E 55 59 35 4D 44 41
[root@APV-1 test]#APV -2:
Before reboot:
/etc/snmp/snmpd.conf
engineID gAAAHYw3QTNBNEZFMEQ4NTRDMDA
[root@APV-2 test]# snmpget -v 3 -u "rohith" -l authNoPriv -a SHA -A "12345678" 192.168.162.148 1.3.6.1.6.3.10.2.1.1.0
SNMP-FRAMEWORK-MIB::snmpEngineID.0 = Hex-STRING: 80 00 1F 88 04 67 41 41 41 48 59 77 33 51 54 4E 42 4E 45 5A 46 4D 45 51 34 4E 54 52 44 4D 44 41
[root@APV-2 test]#After reboot:
/etc/snmp/snmpd.conf
engineID gAAAHYw3QTNBNEZFMEQ4NTRDMDA
[root@APV-2 test]# snmpget -v 3 -u "rohith" -l authNoPriv -a SHA -A "12345678" 192.168.162.148 1.3.6.1.6.3.10.2.1.1.0
SNMP-FRAMEWORK-MIB::snmpEngineID.0 = Hex-STRING: 80 00 1F 88 04 67 41 41 41 48 59 77 33 51 54 4E 42 4E 45 5A 46 4D 45 51 34 4E 54 52 44 4D 44 41
[root@APV-2 test]#
| Description | From | Last Updated |
|---|---|---|
|
define MAX_CA_ENGINE_ID_LEN 28 |
|
|
|
Update in comment format / * / |
|
|
|
enterprise id for array is ::= { enterprises 7564 } in ./usr/click/lib/libca_snmp_mib/CA-SNMP-MIB.txt. Confirm if we need to use this OID? |
|
|
|
use #define. |
|
|
|
if it fails, dont return.. just log and write other configurations. |
|
|
|
I dont think we need this.. |
|
|
|
remove whitespace in red. |
|
|
|
we still do hash ? |
|
|
|
where do we do this? What is the logic now? |
|
|
|
Not using this function anywhere |
|
|
|
In apv this file is already present. who created this? Is there already a function available filling these details? |
|
|
|
Are these values used by anybody else? |
|
|
|
will these values won't change? why are we giving hardcoded value? |
|
|
|
We are removing the persist file.. then your changes will go away .. How is the fix working? |
|
|
|
calling two times |
|
|
|
this goes and deletes the PERSIST FILE. Is not our then your changes are not persisting? |
|
|
|
Dont think it is useful. Anyway the string will be b54 encoded. |
|
|
|
Just log an error and do not return -1. |
|
|
|
directly print pInfo->engineID_b64 instead of calling generate_snmp_engineID again? |
|
|
|
Or remove this call. I think new struct mem is not required. are we going to use it? if not … |
|
|
|
Log and silently ignore the error so that it can still work without your changes. |
|
|
|
what is the need for this? |
|
|
|
why to take it as global? you are using it only in one function |
|
|
|
Why do we need this.. |
|
|
|
if you do unlock here it can be a problem and add call to generate_snmp_engineID in snmp_update function and remove … |
|
|
|
this function already writes that into snmpd.conf. |
|
|
|
remove whitespace. |
|
|
|
this should be printed only else or success case. |
|
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 1) Update in comment format
/
* / -
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 1) enterprise id for array is ::= { enterprises 7564 }
in ./usr/click/lib/libca_snmp_mib/CA-SNMP-MIB.txt. Confirm if we need to use this OID?
Change Summary:
Updated the SNMP EngineID generation using Serial Number by SHA1 Hashing then encoding it with Base64.
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+125) |
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 2) remove whitespace in red.
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 2) where do we do this? What is the logic now?
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 3) In apv this file is already present. who created this? Is there already a function available filling these details?
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 3) Are these values used by anybody else?
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 3) will these values won't change? why are we giving hardcoded value?
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 3) this goes and deletes the PERSIST FILE. Is not our then your changes are not persisting?
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 3) We are removing the persist file.. then your changes will go away .. How is the fix working?
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 3) Not using this function anywhere
-
Change Summary:
Using the base64 encoding for persisting the engineID across reboots.
Testing Done: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+130) |
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 4) Just log an error and do not return -1.
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 4) Log and silently ignore the error so that it can still work without your changes.
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 4) what is the need for this?
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 4) directly print pInfo->engineID_b64 instead of calling generate_snmp_engineID again?
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 4) Or remove this call. I think new struct mem is not required. are we going to use it? if not then remove this
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 4) Dont think it is useful. Anyway the string will be b54 encoded.
Change Summary:
Modified the code as per reviews.
Testing Done: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+114 -1) |
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 5) Why do we need this..
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 5) this function already writes that into snmpd.conf.
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 5) why to take it as global? you are using it only in one function
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 5) if you do unlock here it can be a problem and add call to generate_snmp_engineID in snmp_update function and remove from here and remove global varibale for engineID
Change Summary:
Changes are made only in snmp_update_snmpd_conf() function and printing the engineID in SNMP_CONF_FILE.
Diff: |
Revision 6 (+114 -2) |
|---|
Change Summary:
Added the UT from 2 APV units
Testing Done: |
|
|---|
-
-
branches/rel_apv_10_7_2/usr/click/lib/libca_snmp/snmp_cadmin.c (Diff revision 6) this should be printed only else or success case.
Change Summary:
Minor changes in code for logging the success case of udpating the engineID.
Diff: |
Revision 7 (+114 -2) |
|---|
