Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no way to boot a VM by volume, using an image name instead of a UUID #170

Open
chriscoomber opened this issue Nov 1, 2017 · 0 comments

Comments

@chriscoomber
Copy link
Contributor

Summary

I want to boot a VM by using a boot volume, which is created by providing the openstack name for an image (not the openstack id).

Symptoms / repro

Here's the relevant node_templates:

  vm:
    type: cloudify.openstack.nodes.Server
    properties:
      flavor: { get_input: vm_flavor }
      management_network_name: {
        "name": { get_input: management_network }
      }
      openstack_config: {
        "username": { get_secret: openstack_user },
        "tenant_name": { get_secret: openstack_project },
        "region": "RegionOne",
        "auth_url": { get_secret: openstack_auth_url },
        "password": { get_secret: openstack_password }
      }
    relationships:
    - type: cloudify.openstack.server_connected_to_keypair
      target: keypair
    - type: cloudify.relationships.connected_to
      target: mvs_node_boot_volume


  boot_volume:
    type: cloudify.openstack.nodes.Volume
    properties:
      openstack_config: {
        "username": { get_secret: openstack_user },
        "tenant_name": { get_secret: openstack_project },
        "region": "RegionOne",
        "auth_url": { get_secret: openstack_auth_url },
        "password": { get_secret: openstack_password }
      }
      boot: true
    interfaces:
      cloudify.interfaces.lifecycle:
        create:
          inputs:
            args:
              size: 35
              imageRef: { get_input: vm_image_name }

The result of this is:

  • The boot volume is created successfully, and is properly created using the image at vm_image_name.
  • The image fails to be created, with error:
    Task failed | my_blueprint | my_deployment | install | cloudify.interfaces.lifecycle.create | vm | vm_gs6yit 
    | Task failed 'nova_plugin.server.create' -> Invalid input for field/attribute imageRef. Value: my-image-
    name. u'my-image-name' is not valid under any of the given schemas [status_code=400]
    
  • The workflow fails.

I find it odd that the image was fine to be created with an image name (as opposed to a UUID), but the server (which doesn't need an image to be created!) cannot be created with an image name (as opposed to a UUID).

Environment

Cloudify manager version: v4.1.1
Openstack plugin version: v2.2.0

Suggestion

I see that there's some existing code which goes and gets the ID from a name-or-ID. This is used for the Server node-type. I imagine this could be used elsewhere to solve this issue.

server[prop_name] = image_or_flavor.id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant