Alon Bar-Lev has posted comments on this change. Change subject: packaging: Introduce setup plugin to configure fence_kdump listener ......................................................................
Patch Set 1: (10 comments) http://gerrit.ovirt.org/#/c/27486/1//COMMIT_MSG Commit Message: Line 3: AuthorDate: 2014-05-07 07:55:02 +0200 Line 4: Commit: Martin Perina <mper...@redhat.com> Line 5: CommitDate: 2014-05-08 01:19:21 +0200 Line 6: Line 7: packaging: Introduce setup plugin to configure fence_kdump listener packaging: setup: ... Line 8: Line 9: Introduces setup plugin to configure fence_kdump listener host and port Line 10: when during execution of engine-setup. Line 11: http://gerrit.ovirt.org/#/c/27486/1/ovirt-engine.spec.in File ovirt-engine.spec.in: Line 927: %config %{_sysconfdir}/ovirt-engine-setup.conf.d/10-packaging.conf Line 928: %{_bindir}/engine-upgrade-check Line 929: %{engine_data}/conf/ovirt-engine-proxy.conf.v2.in Line 930: %{engine_data}/conf/ovirt-engine-root-redirect.conf.in Line 931: %{engine_data}/firewalld/fence-kdump-listener/ it can be in ovirt-engine as we have no separate package. Line 932: %{engine_data}/firewalld/ovirt-engine/ Line 933: %{engine_data}/setup/bin/ovirt-engine-rename Line 934: %{engine_data}/setup/bin/ovirt-engine-upgrade-check Line 935: %{engine_data}/setup/dbutils/ http://gerrit.ovirt.org/#/c/27486/1/packaging/firewalld/fence-kdump-listener/ovirt-fence-kdump-listener.xml.in File packaging/firewalld/fence-kdump-listener/ovirt-fence-kdump-listener.xml.in: Line 2: <service> Line 3: <short>ovirt-fence-kdump-listener</short> Line 4: <description>oVirt configured fence_kdump listener service</description> Line 5: <port protocol="udp" port="@FENCE_KDUMP_LISTENER_PORT@"/> Line 6: <destination ipv4="@FENCE_KDUMP_LISTENER_HOST@" /> no need... we just open the udp port. http://gerrit.ovirt.org/#/c/27486/1/packaging/setup/ovirt_engine_setup/constants.py File packaging/setup/ovirt_engine_setup/constants.py: Line 875: JBOSS_HTTPS_PORT = 'OVESETUP_CONFIG/jbossHttpsPort' Line 876: JBOSS_AJP_PORT = 'OVESETUP_CONFIG/jbossAjpPort' Line 877: JBOSS_DIRECT_HTTP_PORT = 'OVESETUP_CONFIG/jbossDirectHttpPort' Line 878: JBOSS_DIRECT_HTTPS_PORT = 'OVESETUP_CONFIG/jbossDirectHttpsPort' Line 879: FENCE_KDUMP_LISTENER_HOST = 'OVESETUP_CONFIG/fenceKdumpListenerHost' Address not Host. Line 880: FENCE_KDUMP_LISTENER_PORT = 'OVESETUP_CONFIG/fenceKdumpListenerPort' Line 881: WEBSOCKET_PROXY_PORT = 'OVESETUP_CONFIG/websocketProxyPort' Line 882: JBOSS_DEBUG_ADDRESS = 'OVESETUP_CONFIG/jbossDebugAddress' Line 883: ADD_OVIRT_GLANCE_REPOSITORY = 'OVESETUP_CONFIG/addOvirtGlanceRepository' http://gerrit.ovirt.org/#/c/27486/1/packaging/setup/plugins/ovirt-engine-setup/fence_kdump_listener/config.py File packaging/setup/plugins/ovirt-engine-setup/fence_kdump_listener/config.py: Line 104: '[@DEFAULT@]: ' Line 105: ), Line 106: prompt=True, Line 107: default='7410', Line 108: ) ok... we talked about this... I do not think regular user should care, and advanced user can use engine-config post installation or override the environment of setup, so no need to ask anything, just set the defaults to much the setting. Line 109: self.environment[ Line 110: osetupcons.ConfigEnv.FENCE_KDUMP_LISTENER_CONFIG Line 111: ] = True Line 112: Line 107: default='7410', Line 108: ) Line 109: self.environment[ Line 110: osetupcons.ConfigEnv.FENCE_KDUMP_LISTENER_CONFIG Line 111: ] = True you can setdefault True in init. Line 112: Line 113: @plugin.event( Line 114: stage=plugin.Stages.STAGE_CUSTOMIZATION, Line 115: condition=lambda self: self.environment[ Line 127: def _customization_firewall(self): Line 128: self.environment[osetupcons.NetEnv.FIREWALLD_SERVICES].extend([ Line 129: { Line 130: 'name': 'ovirt-fence-kdump-listener', Line 131: 'directory': 'fence-kdump-listener' put in engine directory. Line 132: }, Line 133: ]) Line 134: self.environment[ Line 135: osetupcons.NetEnv.FIREWALLD_SUBST Line 142: osetupcons.NetEnv.FIREWALLD_SUBST Line 143: ].update({ Line 144: '@FENCE_KDUMP_LISTENER_PORT@': self.environment[ Line 145: osetupcons.ConfigEnv.FENCE_KDUMP_LISTENER_PORT Line 146: ], you can have single update for both Line 147: }) Line 148: Line 149: @plugin.event( Line 150: stage=plugin.Stages.STAGE_MISC, Line 175: osetupcons.ConfigEnv.FENCE_KDUMP_LISTENER_PORT Line 176: ], Line 177: }, Line 178: ), Line 179: ) you can have single update call for both Line 180: Line 181: @plugin.event( Line 182: stage=plugin.Stages.STAGE_CLOSEUP, Line 183: condition=lambda self: ( Line 196: state=state, Line 197: ) Line 198: self.services.startup( Line 199: name=osetupcons.Const.FENCE_KDUMP_LISTENER_SERVICE_NAME, Line 200: state=True, only if was started? Line 201: ) Line 202: Line 203: -- To view, visit http://gerrit.ovirt.org/27486 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I052cc2296c479caf58d0930a8e678298dde63517 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org 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