Alon Bar-Lev has posted comments on this change.
Change subject: vdsm-tool: vdsm-id: add force option to force generate id
......................................................................
Patch Set 1:
(3 comments)
....................................................
File lib/vdsm/tool/vdsm-id.py
Line 18: #
Line 19:
Line 20:
Line 21: import sys
Line 22: import argparse
Done
Line 23:
Line 24:
Line 25: from vdsm.utils import getHostUUID
Line 26: from vdsm.tool import expose
....................................................
File lib/vdsm/utils.py
Line 631: f.write("%s\n", hostid)
Line 632: if isOvirtNode():
Line 633: from ovirtnode import ovirtfunctions
Line 634: ovirtfunctions.ovirt_store_config(constants.P_VDSM_NODE_ID)
Line 635: __hostUUID = hostid
because this is singleton variable... I want to avoid set it if not all success.
Line 636: else:
Line 637: logging.warning('Could not find host UUID.')
Line 638:
Line 639: if legacy:
Line 886: logging.error("Panic: %s", msg, exc_info=True)
Line 887: os.killpg(0, 9)
Line 888: sys.exit(-3)
Line 889:
Line 890:
Done
Line 891: def isOvirtNode():
Line 892: return (
Line 893: os.path.exists('/etc/rhev-hypervisor-release') or
Line 894: glob.glob('/etc/ovirt-node-*-release')
--
To view, visit
http://gerrit.ovirt.org/20808
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I89f1e29c9cdad0cadb32545fa27c1702ad2e116a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes