Yedidyah Bar David has posted comments on this change. Change subject: packaging: setup: Clean up treatment of /etc/exports ......................................................................
Patch Set 6: (3 comments) .................................................... File packaging/setup/plugins/ovirt-engine-setup/system/exportfs.py Line 156: new_line = exports_content.pop(exports_index) Line 157: if exports_clients != default_clients: Line 158: self.environment[ Line 159: osetupcons.CoreEnv.UNINSTALL_UNREMOVABLE_FILES Line 160: ].append(self._conf) But you want different behavior if there is no /etc/exports.d. And you want the same behavior with it. So you need complex logic. Maybe I am missing something. Line 161: exports_d_content, exports_d_index, exports_d_clients = ( Line 162: self._read_and_find_path( Line 163: self._conf, Line 164: path Line 161: exports_d_content, exports_d_index, exports_d_clients = ( Line 162: self._read_and_find_path( Line 163: self._conf, Line 164: path Line 165: ) Suppose: /etc/exports.d exists engine-setup with iso domain /path1 admin changed the file engine-cleanup leaves the file engine-setup with iso domain /path2 admin has to manually edit the file. Why? Line 166: ) Line 167: if exports_d_index is not None: Line 168: self.logger.debug( Line 169: '{path} already in {conf}, not changing it'.format( Line 168: self.logger.debug( Line 169: '{path} already in {conf}, not changing it'.format( Line 170: path=path, Line 171: conf=self._conf, Line 172: ) Instead of: if cond1: log debug (and do nothing else, for now) else: do something we get log debug if not cond1: do something Not that much simpler. Not less conditions. Line 173: ) Line 174: else: Line 175: self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append( Line 176: filetransaction.FileTransaction( -- To view, visit http://gerrit.ovirt.org/20709 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I035817c048518f77fc666cc6d5212c8e46edd65d Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches