Anatoly Litovsky has posted comments on this change. Change subject: packaging: setup: better exception handling on APIs connection ......................................................................
Patch Set 1: Code-Review-1 (1 comment) Can you please add one more try and catch just to cover all possibilities. Yes I know that i am paranoid http://gerrit.ovirt.org/#/c/35595/1/src/plugins/ovirt-hosted-engine-setup/engine/add_host.py File src/plugins/ovirt-hosted-engine-setup/engine/add_host.py: Line 514: ], Line 515: ) Line 516: ) Line 517: Line 518: try: I think we should also wrap the with its own try catch onn = vdscli.connect() net_info = netinfo.NetInfo(vds_info.capabilities(conn)) bridge_port = self.environment[ohostedcons.NetworkEnv.BRIDGE_IF] if bridge_port in net_info.vlans: self.logger.debug( 'Updating engine\'s management network to be vlanned' ) vlan_id = net_info.vlans[bridge_port]['vlanid'] mgmt_network = engine_api.networks.get( name=self.environment[ohostedcons.NetworkEnv.BRIDGE_NAME] ) mgmt_network.set_vlan( self._ovirtsdk_xml.params.VLAN(id=vlan_id) ) mgmt_network.update() Line 519: conn = vdscli.connect() Line 520: net_info = netinfo.NetInfo(vds_info.capabilities(conn)) Line 521: bridge_port = self.environment[ohostedcons.NetworkEnv.BRIDGE_IF] Line 522: if bridge_port in net_info.vlans: -- To view, visit http://gerrit.ovirt.org/35595 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I13a286ffaac955b821de830a4562413ee071c860 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <[email protected]> Gerrit-Reviewer: Anatoly Litovsky <[email protected]> Gerrit-Reviewer: Lev Veyde <[email protected]> Gerrit-Reviewer: Sandro Bonazzola <[email protected]> Gerrit-Reviewer: Yedidyah Bar David <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
