0

I am trying to launch a very basic VM using Apache Brooklyn 0.8 on OpenStack ( Liberty) setup . I have mentioned the option

auto-create-floating-ip true

in the YAML but I see the following error-

java.lang.IllegalArgumentException: Floating IPs are required by options, but the extension is not available!

Blueprint used:

location:
  jclouds:openstack-nova:
    endpoint: https://myurl
    identity: tenant-name:username
    credential: "My-password"
    jclouds.openstack-nova.auto-create-floating-ips: true
name: VM
services:
- type: brooklyn.entity.basic.EmptySoftwareProcess
  name: Empty software process
  provisioning.properties:
    imageId: RegionOne/image-id
    keyPair: my-keypair-name
    securityGroups: my-security-group
    privateKeyFile: /path/to/my-key/in/brooklyn-machine
    loginUser: ubuntu
    templateOptions: 
      availabilityZone: nova

Any help ? Thanks in advance .

Gwr
  • 65
  • 6

2 Answers2

1

This error normally means one of two things:

  1. that the OpenStack endpoint you are targeting does not support the Nova floating IP extension; or
  2. the namespace is different from a "normal" OpenStack setup, so jclouds fails to correctly retrieve the available extensions (e.g. this currently happens for OpenStack devtest).

Can your provision a VM using floating IP manually? If no, it is likely (1) above - see the cloud provider's docs, or ask the administrator which extension should be used instead.

If yes, it is likely (2) - see the jira issue JCLOUDS-1013. You can check this using the nova python client, running the commands below:

nova list-extensions | grep FloatingIps
nova --debug list-extensions 2>&1 | grep namespace

If the namespace is equals to http://docs.openstack.org/compute/ext/fake_xml, then you'll need a special jclouds "provider" for openstack-devtest, to tell jclouds to expect this alternate namespace.

Work has been done by Andrea Turli at Cloudsoft for this. The code is at https://github.com/cloudsoft/jclouds-openstack-devtest, and there is a pre-built jar at https://drive.google.com/a/cloudsoftcorp.com/file/d/0Bxv4hWMwaFRKRWtsMFdhZlZnek0/view?usp=drive_web. This code may well move into the github jclouds org over time.

Note this code is written against jclouds 1.9.2. That means you'd have to upgrade to Brooklyn 0.9.0. Or if you really want to stick to Brooklyn 0.8.0, create a fork of jclouds-openstack-devtest so you can update the pom/code to be against jclouds 1.9.1.

To use the jclouds-openstack-devtest jar, put it into $BROOKLYN_HOME/lib/patch/, restart Brooklyn, and change your location definition to jclouds:openstack-devtest-compute (instead of jclouds:openstack-nova).

Community
  • 1
  • 1
Aled Sage
  • 766
  • 7
  • 12
  • Thanks @Aled Sage. I can provision VM with floating IP in my OpenSTack -Liberty setup. – Gwr Jun 07 '16 at 06:10
  • Thanks @Aled Sage. I can provision VM with floating IP in OpenStack. `nova list-extensions | grep FloatingIps` gave the output [output-link](http://pastebin.com/fAhKcThE) I could not access the [namespace-url](http://docs.openstack.org/compute/ext/fake_xml.html) . Can you help ? – Gwr Jun 07 '16 at 06:20
  • @user3796119 can you please share the output of `nova --debug list-extensions`. We wouldn't expect to be able to access http://docs.openstack.org/compute/ext/fake_xml. That just tells us the XML namespace being used. We want to know if it includes "fake_xml". – Aled Sage Jun 10 '16 at 19:45
  • The namespace includes "fake_xml" . Please refer to output at [PartofOutput](http://pastebin.com/pYLwc1Zd) . – Gwr Jun 13 '16 at 02:50
  • I tried as per suggestion. But the application fails with error [error](http://pastebin.com/vRK8YNg8). Is it trying to connect to 127.0.0.1 instead of provided endpoint ?Any suggestions ? – Gwr Jun 20 '16 at 12:27
  • Hi , Any suggestions ? I updated to Brooklyn 0.9 but still have same issue . – Gwr Nov 15 '16 at 10:16
  • @user3796119 The error "Connection refused connecting to POST https://127.0.0.1/identity/v2.0/tokens HTTP/1.1" is interesting. I presume your endpoint URL was something like https://openstack.example.com:5000/v2.0. The error implies that openstack has returned us a keystone URL of https://127.0.0.1/identity/v2.0/, which we then try to use. This suggests to me that OpenStack is misconfigured (it should return an externally reachable URL). Can you check the OpenStack config? – Aled Sage Dec 04 '16 at 15:53
  • Hi , I configured openstack to be reachable via external URL and this solved the issue . But I still do not have a successful deployment . Sample yaml : [yaml](http://pastebin.com/hcTL0p0S). The deployment gets stuck in starting stage (DST internal manager) and fails with error : AuthorizationException on node – Gwr Dec 06 '16 at 08:37
  • I have also noticed that if I have a floating IP allocated (but not associated)for the project then I do no see the error mentioned in question.But Brooklyn doesnot by itself allocate and associate the floating IP in my case. – Gwr Dec 06 '16 at 08:39
0

jclouds-openstack-devtest jar with Brooklyn 0.10 solved the above issue

Gwr
  • 65
  • 6