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

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

Open
n-pochet opened this issue Oct 11, 2017 · 2 comments
Labels

Comments

@n-pochet
Copy link

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!

@isaac-s isaac-s added the bug label Nov 7, 2017
@isaac-s
Copy link
Contributor

isaac-s commented Nov 7, 2017

@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?

@n-pochet
Copy link
Author

n-pochet commented Nov 7, 2017

@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!

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

No branches or pull requests

2 participants