Alon Bar-Lev has posted comments on this change.

Change subject: packaging: setup: use ssh public key for allinone
......................................................................


Patch Set 4:

(2 comments)

....................................................
File packaging/setup/plugins/ovirt-engine-setup/all-in-one/sshd.py
Line 116:                     content.append(line)
Line 117:                     if line == authorized_keys_line:
Line 118:                         already_in_file = True
Line 119:                         break
Line 120:         except:
did not see reply...

you should not use generic except.

either the following which is BAD!!!

 except:
      self.logger.debug('Ignoring exception', exc_info=True)

or just avoid the error...

 if os.path.exists(authorized_keys_file): 
     with open(...):
Line 121:             pass
Line 122: 
Line 123:         if not already_in_file:
Line 124:             self.environment[


Line 134:             ).addLines(
Line 135:                 'authorized_keys',
Line 136:                 authorized_keys_file,
Line 137:                 [authorized_keys_line],
Line 138:             )
I think that we should leave this file as-is... not touch or clean. not that 
important.

just make sure we do not have two entries after host-deploy.
Line 139:             content.append(authorized_keys_line)
Line 140:             
self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append(
Line 141:                 filetransaction.FileTransaction(
Line 142:                     name=authorized_keys_file,


-- 
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: 4
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

Reply via email to