[node-patches] Change in ovirt-node[master]: Persist all of /var/lib/net-snmp instead of just snmpd.conf

fabiand at redhat.com fabiand at redhat.com
Tue Nov 17 16:03:11 UTC 2015


Fabian Deutsch has posted comments on this change.

Change subject: Persist all of /var/lib/net-snmp instead of just snmpd.conf
......................................................................


Patch Set 3:

(2 comments)

https://gerrit.ovirt.org/#/c/46533/3/src/ovirt/node/setup/snmp/snmp_model.py
File src/ovirt/node/setup/snmp/snmp_model.py:

Line 55:         process.check_call(["net-snmp-create-v3-user", "-A", password, "-a",
Line 56:                             "SHA", "-x", "AES", "root"])
Line 57:         system.service("snmpd", "start")
Line 58: 
Line 59:         configs = ["/etc/snmp/snmpd.conf", snmp_conf]
Why do we need to persist both? the dir and the config file?

Shouldn't it be enough to persist one?
Line 60:         [fs.Config().persist(c) for c in configs if not fs.Config().exists(c)]
Line 61: 
Line 62:     firewall.open_port(port="161", proto="udp")
Line 63: 


Line 68:     process.check_call(["cp", "/etc/snmp/snmpd.conf", "/tmp"])
Line 69:     process.check_call("sed -c -ie '/^createUser root/d' %s" % snmp_conf,
Line 70:                        shell=True)
Line 71:     configs = [snmp_conf, old_conf]
Line 72:     [fs.Config().unpersist(c) for c in configs if fs.Config().exists(c)]
Same question as above
Line 73: 
Line 74: 
Line 75: class SNMP(NodeConfigFileSection):
Line 76:     """Configure SNMP


-- 
To view, visit https://gerrit.ovirt.org/46533
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifef49615cca8eae9107d3ea409db30f71c2815ae
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes



More information about the node-patches mailing list