Alon Bar-Lev has posted comments on this change.
Change subject: packaging: setup: use ssh public key for allinone
......................................................................
Patch Set 3:
(6 comments)
....................................................
File packaging/setup/plugins/ovirt-engine-setup/pki/ssh.py
Line 51
Line 52
Line 53
Line 54
Line 55
please disable at development mode
Line 63
Line 64
Line 65
Line 66
Line 67
why do you extract private key?
Line 86: '-f', '/dev/fd/0',
Line 87: ),
Line 88: stdin=privkey
Line 89: )
Line 90: authorized_keys_line = pubkey[0] + ' ovirt-engine'
please use the pubkey to extract, but better have this logic within one
logic... if we need it we should extract it after misc to allow printing it at
summary.
Line 91:
Line 92: authorized_keys_file = os.path.join(
Line 93: os.path.expanduser('~'),
Line 94: '.ssh',
Line 89: )
Line 90: authorized_keys_line = pubkey[0] + ' ovirt-engine'
Line 91:
Line 92: authorized_keys_file = os.path.join(
Line 93: os.path.expanduser('~'),
hmm... I prefer hard code to ~root... as we are going to use it explicitly.
Line 94: '.ssh',
Line 95: 'authorized_keys'
Line 96: )
Line 97:
Line 104: if line == authorized_keys_line:
Line 105: already_in_file = True
Line 106: break
Line 107: except:
Line 108: pass
do not swallow exceptions.
Line 109:
Line 110: if not already_in_file:
Line 111: self.environment[
Line 112: osetupcons.CoreEnv.UNINSTALL_UNREMOVABLE_FILES
Line 114:
Line 115: self.environment[
Line 116: osetupcons.CoreEnv.REGISTER_UNINSTALL_GROUPS
Line 117: ].createGroup(
Line 118: group='authorized_keys',
I would have just left this :)
Line 119: description='ssh authorized keys of root',
Line 120: optional=False
Line 121: ).addLines(
Line 122: 'authorized_keys',
--
To view, visit http://gerrit.ovirt.org/17996
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I885894bba4c998e5dd3e9b2fd4da61d833f7a3a1
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[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