Bug 2222163 - [DDF] The description and example config of snmp::com2sec and snmp::com2sec6 looks wrongs.
Summary: [DDF] The description and example config of snmp::com2sec and snmp::com2sec6 ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: documentation
Version: 16.2 (Train)
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: ---
Assignee: Roger Heslop
QA Contact: RHOS Documentation Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-12 05:23 UTC by Direct Docs Feedback
Modified: 2023-08-02 14:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-02 14:12:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-26533 0 None None None 2023-07-12 05:25:11 UTC

Description Direct Docs Feedback 2023-07-12 05:23:10 UTC
The description and example config of snmp::com2sec and 
snmp::com2sec6 looks wrongs.

When I create the following template file according to the document,
~~~
parameter_defaults:
  ExtraConfig:
    snmp::com2sec: mysecurestring
    snmp::com2sec6: myv6securestring
~~~

the deployment fails with the following message.

~~~
Jul 12 01:11:32 puppet-user: Error: Evaluation Error: Error while evaluating a Function Call, "mysecurestring" is not an Array.  It looks to be a String (file: /etc/puppet/modules/snmp/manifests/init.pp, line: 371, column: 3) on node overcloud-controller-0.yatanaka.example.com
~~~

According to the following upstream document, the values of these  parameters should be an array, not string.

~~~
https://forge.puppet.com/modules/razorsedge/snmp/readme

com2sec
An array of VACM com2sec mappings. Must provide SECNAME, SOURCE and COMMUNITY. See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL for details. Default: [ "notConfigUser default public" ]

com2sec6
An array of VACM com2sec6 mappings. Must provide SECNAME, SOURCE and COMMUNITY. See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL for details. Default: [ "notConfigUser default ${ro_community}" ]
~~~

Therefore we should modify our document from:

~~~
SNMP view-based access control settings (VACM)

snmp::com2sec
IPv4 security name.
snmp::com2sec6
IPv6 security name.
For example:

parameter_defaults:
  ExtraConfig:
    snmp::com2sec: mysecurestring
    snmp::com2sec6: myv6securestring
~~~

to:

~~~
SNMP view-based access control settings (VACM)

snmp::com2sec
An array of VACM com2sec mappings. Must provide SECNAME, SOURCE and COMMUNITY.

snmp::com2sec6
An array of VACM com2sec6 mappings. Must provide SECNAME, SOURCE and COMMUNITY.

For example:

parameter_defaults:
  ExtraConfig:
    snmp::com2sec:  ["notConfigUser default mysecurestring"]
    snmp::com2sec6: ["notConfigUser default myv6securestring"]
~~~

Reported by: rhn-support-yatanaka

https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.2/html/advanced_overcloud_customization/assembly_security-enhancements#annotations:32a92219-f604-4db0-a107-dcbb2e8f7f74

Comment 1 James Slagle 2023-07-20 15:19:06 UTC
snmp is for DFG:CloudOps

Comment 2 Victoria Martinez de la Cruz 2023-07-26 13:51:50 UTC
Based on the docs context, this is either for the DFG:Networking or DFG:Security (not related to SNMP traps in CloudOps)

Comment 7 Roger Heslop 2023-08-01 18:42:29 UTC
Verbiage confirmed via /usr/share/openstack-puppet/modules/snmp/README.markdown:

##### `com2sec`
An array of VACM com2sec mappings.  Must provide SECNAME, SOURCE and COMMUNITY.  See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL for details.
Default: [ "notConfigUser default public" ]

##### `com2sec6`
An array of VACM com2sec6 mappings.  Must provide SECNAME, SOURCE and COMMUNITY.  See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL for details.
Default: [ "notConfigUser default ${ro_community}" ]


Configuration tests successfully


Note You need to log in before you can comment on or make changes to this bug.