Even thought his patch worked and the elasticluster list-templates command 
works with libvirt, the next problem comes when trying to start the cluster.

It appears the attempt to start a cluster relies on a list_key_pairs() 
method that is not supported in libcloud for the libvirt driver.  
Unfortunately the docs for libcloud's libvirt docs suggest this method is 
implemented even though the support matrix does state the method is not 
implemented.

Here's the output from an attempted start of a listed template for the 
local cluster.   Note line 146 in libcloud_provider.py calls the 
list_key_pairs() method which triggers the not implemented section.  It's 
not clear if this is an blocker error or if things would still work if the 
cluster nodes were up an running.

(venv) jpr@laptop:~/projects/elasticluster$ elasticluster -c 
slurmtest/config start slurmtest
Starting cluster `slurmtest` with:
* 1 frontend nodes.
* 2 compute nodes.
(This may take a while...)
2017-06-07 12:41:21 laptop gc3.elasticluster[20880] ERROR Could not start 
node `frontend001`: list_key_pairs not implemented for this driver -- <type 
'exceptions.NotImplementedError'>
Traceback (most recent call last):
  File "/home/jpr/projects/elasticluster/src/elasticluster/cluster.py", 
line 493, in _start_node
    node.start()
  File "/home/jpr/projects/elasticluster/src/elasticluster/cluster.py", 
line 1085, in start
    **self.extra)
  File 
"/home/jpr/projects/elasticluster/src/elasticluster/providers/libcloud_provider.py",
 
line 72, in start_instance
    options.get('image_user_password'))
  File 
"/home/jpr/projects/elasticluster/src/elasticluster/providers/libcloud_provider.py",
 
line 146, in __prepare_key_pair
    if key_name in [k.name for k in list_key_pairs()]:
  File 
"/home/jpr/projects/elasticluster/venv/local/lib/python2.7/site-packages/libcloud/compute/base.py",
 
line 1202, in list_key_pairs
    'list_key_pairs not implemented for this driver')
NotImplementedError: list_key_pairs not implemented for this driver
2017-06-07 12:41:21 laptop gc3.elasticluster[20880] ERROR Could not start 
node `compute001`: list_key_pairs not implemented for this driver -- <type 
'exceptions.NotImplementedError'>
Traceback (most recent call last):
  File "/home/jpr/projects/elasticluster/src/elasticluster/cluster.py", 
line 493, in _start_node
    node.start()
  File "/home/jpr/projects/elasticluster/src/elasticluster/cluster.py", 
line 1085, in start
    **self.extra)
  File 
"/home/jpr/projects/elasticluster/src/elasticluster/providers/libcloud_provider.py",
 
line 72, in start_instance
    options.get('image_user_password'))
  File 
"/home/jpr/projects/elasticluster/src/elasticluster/providers/libcloud_provider.py",
 
line 146, in __prepare_key_pair
    if key_name in [k.name for k in list_key_pairs()]:
  File 
"/home/jpr/projects/elasticluster/venv/local/lib/python2.7/site-packages/libcloud/compute/base.py",
 
line 1202, in list_key_pairs
    'list_key_pairs not implemented for this driver')
NotImplementedError: list_key_pairs not implemented for this driver
2017-06-07 12:41:21 laptop gc3.elasticluster[20880] ERROR Could not start 
node `compute002`: list_key_pairs not implemented for this driver -- <type 
'exceptions.NotImplementedError'>
Traceback (most recent call last):
  File "/home/jpr/projects/elasticluster/src/elasticluster/cluster.py", 
line 493, in _start_node
    node.start()
  File "/home/jpr/projects/elasticluster/src/elasticluster/cluster.py", 
line 1085, in start
    **self.extra)
  File 
"/home/jpr/projects/elasticluster/src/elasticluster/providers/libcloud_provider.py",
 
line 72, in start_instance
    options.get('image_user_password'))
  File 
"/home/jpr/projects/elasticluster/src/elasticluster/providers/libcloud_provider.py",
 
line 146, in __prepare_key_pair
    if key_name in [k.name for k in list_key_pairs()]:
  File 
"/home/jpr/projects/elasticluster/venv/local/lib/python2.7/site-packages/libcloud/compute/base.py",
 
line 1202, in list_key_pairs
    'list_key_pairs not implemented for this driver')
NotImplementedError: list_key_pairs not implemented for this driver
Configuring the cluster.
(this too may take a while...)
Your cluster is ready!

Cluster name:     slurmtest
Cluster template: slurmtest
Default ssh to node: frontend001
- frontend nodes: 1
- compute nodes: 2

To login on the frontend node, run the command:

    elasticluster ssh slurmtest

To upload or download files to the cluster, use the command:

    elasticluster sftp slurmtest



I tried working around this by not giving the key a name which seems like 
it would make __prepare_key_pair() skip the initialization steps, but that 
causes parsing issues for the login configuration section in the config. 

-- 
You received this message because you are subscribed to the Google Groups 
"elasticluster" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to