cloudify-openstack-plugin icon indicating copy to clipboard operation
cloudify-openstack-plugin copied to clipboard

Using management_network_name for a server when the network name exists in other projects raises an error

Open n-pochet opened this issue 7 years ago • 2 comments

I tried to create a server with the following node_template:

  firewall_host:
    type: cloudify.openstack.nodes.Server
    properties:
      openstack_config: *openstack_config
      agent_config:
        key: { get_property: [ keypair, private_key_path ] }
      management_network_name: private
      image:  { get_input: image }
      flavor: { get_input: flavor }
      cloudify_agent:
          user: { get_input: agent_user }
    relationships:
      - type: cloudify.openstack.server_connected_to_keypair
        target: keypair
      - type: cloudify.openstack.server_connected_to_port
        target: fw_port_test

An when specifying the management_network_name by its name, it raises the following error: Expected exactly one object of type network with match {'name': u'private'} but there are 7 If I try to use the network ID, I got the following error: Expected exactly one object of type network with match {'name': u'1b94ecd1-abd7-44e4-bcbf-70b9a371f5c0'} but there are 0 I also tried to create the network (or port) node_template and create a relationship to the server but then, it raises another error: Workflow failed: Task failed 'nova_plugin.server.create' -> Nova server with NICs requires 'management_network_name' in properties or id from provider context, which was not supplied It comes from the fact that the user that is used to create the objects in OpenStack has admin rights (needed to create a port on a shared network) and can then see all the networks. In those networks, there are several that have the name private. Is there any way to create a server and have its management network correctly configured? I see in the errors and in the documentation that I could define it in the provider context. Unfortunately, in the documentation, it is also said that: The exact details of the structure of the OpenStack Provider Context are not documented because this feature is being deprecated and will be replaced with a more advanced one. Thanks for the help!

n-pochet avatar Oct 11 '17 14:10 n-pochet

@n-pochet the Provider Context concept is deprecated and should be ignored. The fix for this should include adding a property such as management_network_id to accommodate cases where the management_network_name is not unique.

@EarthmanT?

isaac-s avatar Nov 07 '17 10:11 isaac-s

@isaac-s For the moment, we created a unique management network that can be used by Cloudify. Nevertheless, it is indeed not the most efficient way to do this. Thanks for the feedback!

n-pochet avatar Nov 07 '17 11:11 n-pochet