Michal Skrivanek has posted comments on this change.

Change subject: Engine: Enable Cloud-Init SSH login via public key
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/25625/1/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/CloudInitHandler.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/CloudInitHandler.java:

Line 203:         metaData.put("launch_index", "0");
Line 204:         metaData.put("availability_zone", "nova");
Line 205: 
Line 206:         // Don't create ec2-user
Line 207:         userData.put("user", "root");
I think there's root because we don't have a "user" box in the UI. we shouldn't 
just deliberately add a user (cloud use case is not the only one, not even the 
main one in our case, IMO)
Line 208: 
Line 209:         // Redirect log output from cloud-init execution from terminal
Line 210:         Map<String, String> output = new HashMap<String, String>();
Line 211:         output.put("all", ">> /var/log/cloud-init-output.log");


Line 216:         // set disable_root=0 for enabling root ssh login and
Line 217:         // datasource_list in cloud.cfg
Line 218:         bootcmd.add("sed -i '/^disable_root: /d' 
/etc/cloud/cloud.cfg");
Line 219:         bootcmd.add("echo 'disable_root: 0' >> /etc/cloud/cloud.cfg");
Line 220:         bootcmd.add("sed -i '/^datasource_list: /d' 
/etc/cloud/cloud.cfg");
> I think that separating the command is more readable for maintaining the co
it is, but it touches/modifies the same file multiple times…can you make it in 
one command and still in a readable way in java?:)
Line 221:         bootcmd.add("echo 'datasource_list: [\"NoCloud\", 
\"ConfigDrive\"]' >> /etc/cloud/cloud.cfg");
Line 222:         userData.put("bootcmd", bootcmd);
Line 223: 
Line 224:         Map<String, Object> opts = new HashMap<String, Object>();


-- 
To view, visit http://gerrit.ovirt.org/25625
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idb48fe4306f803aca801c03ddf29f010eaeb635f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[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

Reply via email to