Revision 9716fdce lib/backend.py
b/lib/backend.py | ||
---|---|---|
79 | 79 |
return True |
80 | 80 |
|
81 | 81 |
|
82 |
def AddNode(dsa, dsapub, rsa, rsapub, ssh, sshpub): |
|
82 |
def AddNode(dsa, dsapub, rsa, rsapub, sshkey, sshpub):
|
|
83 | 83 |
""" adds the node to the cluster |
84 | 84 |
- updates the hostkey |
85 | 85 |
- adds the ssh-key |
... | ... | |
107 | 107 |
os.mkdir("/root/.ssh") |
108 | 108 |
|
109 | 109 |
f = open("/root/.ssh/id_dsa", 'w') |
110 |
f.write(ssh) |
|
110 |
f.write(sshkey)
|
|
111 | 111 |
f.close() |
112 | 112 |
|
113 | 113 |
f = open("/root/.ssh/id_dsa.pub", 'w') |
... | ... | |
369 | 369 |
|
370 | 370 |
create_script = inst_os.create_script |
371 | 371 |
|
372 |
for os_device in instance.disks: |
|
373 |
if os_device.iv_name == os_disk: |
|
374 |
break |
|
375 |
else: |
|
372 |
os_device = instance.FindDisk(os_disk) |
|
373 |
if os_device is None: |
|
376 | 374 |
logger.Error("Can't find this device-visible name '%s'" % os_disk) |
377 | 375 |
return False |
378 | 376 |
|
379 |
for swap_device in instance.disks: |
|
380 |
if swap_device.iv_name == swap_disk: |
|
381 |
break |
|
382 |
else: |
|
377 |
swap_device = instance.FindDisk(swap_disk) |
|
378 |
if swap_device is None: |
|
383 | 379 |
logger.Error("Can't find this device-visible name '%s'" % swap_disk) |
384 | 380 |
return False |
385 | 381 |
|
... | ... | |
1199 | 1195 |
inst_os = OSFromDisk(instance.os) |
1200 | 1196 |
import_script = inst_os.import_script |
1201 | 1197 |
|
1202 |
for os_device in instance.disks: |
|
1203 |
if os_device.iv_name == os_disk: |
|
1204 |
break |
|
1205 |
else: |
|
1198 |
os_device = instance.FindDisk(os_disk) |
|
1199 |
if os_device is None: |
|
1206 | 1200 |
logger.Error("Can't find this device-visible name '%s'" % os_disk) |
1207 | 1201 |
return False |
1208 | 1202 |
|
1209 |
for swap_device in instance.disks: |
|
1210 |
if swap_device.iv_name == swap_disk: |
|
1211 |
break |
|
1212 |
else: |
|
1203 |
swap_device = instance.FindDisk(swap_disk) |
|
1204 |
if swap_device is None: |
|
1213 | 1205 |
logger.Error("Can't find this device-visible name '%s'" % swap_disk) |
1214 | 1206 |
return False |
1215 | 1207 |
|
Also available in: Unified diff