Hide Forgot
Description of problem: It's impossible to change the SNMP agentaddress via Director: /etc/puppet/modules/tripleo/manifests/profile/base/snmp.pp ~~~ if $step >= 4 { snmp::snmpv3_user { $snmpd_user: authtype => 'MD5', authpass => $snmpd_password, } class { '::snmp': agentaddress => ['udp:161','udp6:[::1]:161'], snmpd_config => [ join(['createUser ', $snmpd_user, ' MD5 "', $snmpd_password, '"']), join(['rouser ', $snmpd_user]), 'proc cron', 'includeAllDisks 10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ], } ~~~ Additional info: I wanted to create a KCS with instructions similar to this - but unfortunately, it is not possible to overwrite the snmpd settings with templates due to the above code. ### Modifying values via puppet ### Not all values can be changed via `snmpd.local.conf` ; in this case, one can leverage [puppet hiera data](https://access.redhat.com/solutions/2328671) #### Changing bind / listen address #### The snmpd listen address is determined by `agentaddress`. This value may only appear once in the configuration, and hence may not appear in both `snmpd.conf` and `snmpd.local.conf` at the same time. ~~~ [root@overcloud-controller-0 ~]# grep agentaddress /etc/snmp/* -R /etc/snmp/snmpd.conf:agentaddress udp:161,udp6:[::1]:161 ~~~ In order to change this value: ~~~ parameter_defaults: ExtraConfig: snmp::agentaddress: '[ udp:127.0.0.1:161, udp6:[::1]:161 ] ~~~
Andreas: it's a feature, so impossible to backport upstream. We have 2 options: - backport the feature downstream and make it available in the next OSP10 release (not sure when it happens). It some work because we also need to backport it to OSP11. - do not backport the feature upstream and use the ExtraConfig workaround until OSP12 (see my patches that address your request in Pike). Thoughts?
Hi, No backport needed. I'm happy if this gets fixed in a future version. Should I ever need this in OSP 10, I'll consider to make the changes as in https://review.openstack.org/#/c/461791/2/manifests/profile/base/snmp.pp https://review.openstack.org/#/c/461839/1/puppet/services/snmp.yaml Thanks! - Andreas
yeah or use ExtraConfig really, it's designed for this use case. Thanks for the feedback, and expect the bug fixed for OSP12.
ExtraConfig won't work (do you mean the one for pushing hiera variables?) - I cannot push different snmp data because profile/base/snmp.pp hardcodes the value, so I cannot overwrite snmp::agentaddress). Of course, I can generate a new extraconfig / postconfig with a software config and overwrite this as a workaround. Or do you mean something else?
ah right, the Hiera priority... indeed. I think you better to apply my patches if that works for you. Let me know how it works, so we're sure my patches do what you wanted. Thanks
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:3462