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

Alloc_floating_ip not working in master #65

Closed
renebrandel opened this issue Aug 5, 2013 · 16 comments
Closed

Alloc_floating_ip not working in master #65

renebrandel opened this issue Aug 5, 2013 · 16 comments

Comments

@renebrandel
Copy link

The action to allocate a floating ip is somehow not provisioned anymore and even if you associate a floating ip through Openstack directly, you can't see it listed in details of a vm.

@tmetsch
Copy link
Owner

tmetsch commented Aug 7, 2013

Hi - floating ips are now realized through creating links to the public networking interface. You can see the details on the link now.

@tmetsch tmetsch closed this as completed Oct 4, 2013
@bhagemeier
Copy link
Contributor

Hi Thijs,

I didn't manage to follow these instructions. Is there any more detail documented anywhere? When browsing resources, links are given like this:

Link: </network/public>; rel="http://schemas.ogf.org/occi/infrastructure#network"; self="/network/interface/f4a16faa-6c96-4932-94f8-cc8a2175aec4"; category="http://schemas.ogf.org/occi/infrastructure#networkinterface http://schemas.ogf.org/occi/infrastructure/networkinterface#ipnetworkinterface"; occi.networkinterface.gateway="0.0.0.0"; occi.networkinterface.mac="aa:bb:cc:dd:ee:ff"; occi.networkinterface.interface="eth0"; occi.networkinterface.state="active"; occi.networkinterface.allocation="static"; occi.networkinterface.address="134.94.32.159"; occi.core.source="/compute/e2960e13-9d30-47aa-a01c-9e169213bdeb"; occi.core.target="/network/public"; occi.core.id="/network/interface/f4a16faa-6c96-4932-94f8-cc8a2175aec4"

Do I need to give all attributes? I've been trying to do it analogous to storage links, but failed.

Cheers,
Björn

@tmetsch
Copy link
Owner

tmetsch commented Jan 6, 2014

Hi,

What is the request and error message you are getting when creating the link?

Cheers,

-Thijs

@bhagemeier
Copy link
Contributor

curl -X POST -H 'x-auth-token: *****' https://egi-cloud.zam.kfa-juelich.de:8787/network/interface/ -H 'Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"' -H 'x-occi-attribute: occi.core.source="/compute/b9cce1e6-1aec-472b-bfe7-15547cd46316"' -H 'x-occi-attribute: occi.core.target="/network/public"'

Could not find a valid kind.

@tmetsch
Copy link
Owner

tmetsch commented Jan 6, 2014

can you add a -v parameter to the curl request and post all here? Might be a minor issue :-)

@tmetsch
Copy link
Owner

tmetsch commented Jan 6, 2014

oh and try to add -H 'Content-Type: text/occi'

@bhagemeier
Copy link
Contributor

Adding the content-type header yields the following:

"Both occi.core.[source, target] attributes need to be resources."

Well, I thought that both source and target were resources, as I can retrieve information about them with get requests. I have also tried the full URL including server as I did for linking a storage to a VM, but it returns the same message.

Björn

@tmetsch
Copy link
Owner

tmetsch commented Jan 7, 2014

jah can you give the complete output f the curl vomman when adding the -v parameter?

@bhagemeier
Copy link
Contributor

$ curl -v -X POST --capath /etc/grid-security/certificates/ -H 'x-auth-token: *****' https://egi-cloud.zam.kfa-juelich.de:8787/network/interface/ -H 'Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"' -H 'x-occi-attribute: occi.core.source="https://egi-cloud.zam.kfa-juelich.de:8787/compute/b9cce1e6-1aec-472b-bfe7-15547cd46316"' -H 'x-occi-attribute: occi.core.target="https://egi-cloud.zam.kfa-juelich.de:8787/network/public"' -H 'content-type: text/occi'

  • About to connect() to egi-cloud.zam.kfa-juelich.de port 8787 (#0)
  • Trying 134.94.32.4...
  • connected
  • Connected to egi-cloud.zam.kfa-juelich.de (134.94.32.4) port 8787 (#0)
  • successfully set certificate verify locations:
  • CAfile: none
    CApath: /etc/grid-security/certificates/
  • SSLv3, TLS handshake, Client hello (1):
  • SSLv3, TLS alert, Client hello (1):
  • SSLv3, TLS handshake, Server hello (2):
  • SSLv3, TLS handshake, CERT (11):
  • SSLv3, TLS handshake, Server key exchange (12):
  • SSLv3, TLS handshake, Server finished (14):
  • SSLv3, TLS handshake, Client key exchange (16):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSLv3, TLS change cipher, Client hello (1):
  • SSLv3, TLS handshake, Finished (20):
  • SSL connection using DHE-RSA-AES256-GCM-SHA384
  • Server certificate:
  •    subject: C=DE; O=GridGermany; OU=Forschungszentrum Juelich GmbH; CN=egi-cloud.zam.kfa-juelich.de
    
  •    start date: 2013-01-17 12:10:19 GMT
    
  •    expire date: 2014-02-14 12:10:19 GMT
    
  •    subjectAltName: egi-cloud.zam.kfa-juelich.de matched
    
  •    issuer: C=DE; O=DFN-Verein; OU=DFN-PKI; CN=DFN-Verein PCA Grid - G01
    
  •    SSL certificate verify ok.
    

    POST /network/interface/ HTTP/1.1
    User-Agent: curl/7.26.0
    Host: egi-cloud.zam.kfa-juelich.de:8787
    Accept: /
    x-auth-token: *****
    Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"
    x-occi-attribute: occi.core.source="https://egi-cloud.zam.kfa-juelich.de:8787/compute/b9cce1e6-1aec-472b-bfe7-15547cd46316"
    x-occi-attribute: occi.core.target="https://egi-cloud.zam.kfa-juelich.de:8787/network/public"
    content-type: text/occi

  • additional stuff not fine transfer.c:1037: 0 0
  • HTTP 1.1 or later with persistent connection, pipelining supported
    < HTTP/1.1 400 Bad Request
    < Date: Tue, 07 Jan 2014 09:49:03 GMT
    < Server: pyssf OCCI/1.1
    < Content-Length: 64
    < Content-Type: text/plain
    < Vary: Accept-Encoding
    < Connection: close
    <
  • Closing connection #0
  • SSLv3, TLS alert, Client hello (1):
    Both occi.core.[source, target] attributes need to be resources.

@tmetsch
Copy link
Owner

tmetsch commented Jan 7, 2014

try using "X-OCCI-Attribute" instead of "x-occi-attribute"...

@bhagemeier
Copy link
Contributor

On 07.01.2014 11:15, tmetsch wrote :

try using "X-OCCI-Attribute" instead of "x-occi-attribute"...
Nope, still the same. Acc. to HTTP spec. it should not make a difference.


Reply to this email directly or view it on GitHub
#65 (comment).

Dipl.-Inform. Björn Hagemeier
Federated Systems and Data
Juelich Supercomputing Centre
Institute for Advanced Simulation

Phone: +49 2461 61 1584
Fax : +49 2461 61 6656
Email: b.hagemeier@fz-juelich.de
Skype: bhagemeier
WWW : http://www.fz-juelich.de/jsc

JSC is the coordinator of the
John von Neumann Institute for Computing
and member of the
Gauss Centre for Supercomputing



Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,

Prof. Dr. Sebastian M. Schmidt


@tmetsch
Copy link
Owner

tmetsch commented Jan 7, 2014

weird - stuff is tested here: https://github.com/tmetsch/occi-os/blob/master/tests/system_test.py#L326 with the exact stuff you are doing. must be sth we miss in the request. Will fire up an test instance later today to test for you.

@bhagemeier
Copy link
Contributor

On 07.01.2014 11:35, tmetsch wrote :

weird - stuff is tested here:
https://github.com/tmetsch/occi-os/blob/master/tests/system_test.py#L326
with the exact stuff you are doing. must be sth we miss in the request.
Will fire up an test instance later today to test for you.
Hi, I may be missing ipnetworkinterface. Will check later today.


Reply to this email directly or view it on GitHub
#65 (comment).

Dipl.-Inform. Björn Hagemeier
Federated Systems and Data
Juelich Supercomputing Centre
Institute for Advanced Simulation

Phone: +49 2461 61 1584
Fax : +49 2461 61 6656
Email: b.hagemeier@fz-juelich.de
Skype: bhagemeier
WWW : http://www.fz-juelich.de/jsc

JSC is the coordinator of the
John von Neumann Institute for Computing
and member of the
Gauss Centre for Supercomputing



Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,

Prof. Dr. Sebastian M. Schmidt


@tmetsch
Copy link
Owner

tmetsch commented Jan 7, 2014

That mixin shouldn't matter for now - I took your curl request from earlier + the content type and got an OK back....

$ curl -v -X POST -H 'X-Auth-token: '$KID localhost:8787/network/interface/ -H 'Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"' -H 'x-occi-attribute: occi.core.source="/compute/317813a2-3aa0-4d39-b4ea-53784a513a61"' -H 'x-occi-attribute: occi.core.target="/network/public"' -H 'Content-Type: text/occi'
* About to connect() to localhost port 8787 (#0)
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8787 (#0)
> POST /network/interface/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:8787
> Accept: */*
> X-Auth-token: [...]
> Category: networkinterface; scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"
> x-occi-attribute: occi.core.source="/compute/317813a2-3aa0-4d39-b4ea-53784a513a61"
> x-occi-attribute: occi.core.target="/network/public"
> Content-Type: text/occi
> 
< HTTP/1.1 201 Created
< Content-Length: 2
< Content-Type: text/plain
< Location: http://localhost:8787/network/interface/60f278d3-c2e7-4acd-a306-d87ec4f8f76e
< Server: pyssf OCCI/1.1
< Date: Tue, 07 Jan 2014 12:29:03 GMT
< 
* Connection #0 to host localhost left intact
OK%     

@bhagemeier
Copy link
Contributor

Hi Thijs,

finally works. Thanks for your help. Everything is ok with the
implementation.

Cheers,
Björn

On 07.01.2014 13:29, tmetsch wrote :

$ curl -v -X POST -H 'X-Auth-token: '$KID
localhost:8787/network/interface/ -H 'Category: networkinterface;
scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind"' -H
'x-occi-attribute:
occi.core.source="/compute/317813a2-3aa0-4d39-b4ea-53784a513a61"' -H
'x-occi-attribute: occi.core.target="/network/public"' -H 'Content-Type:
text/occi'

  • About to connect() to localhost port 8787 (#0)
  • Trying 127.0.0.1...
  • Connected to localhost (127.0.0.1) port 8787 (#0) > POST
    /network/interface/ HTTP/1.1 > User-Agent: curl/7.29.0 > Host:
    localhost:8787 > Accept: /// > X-Auth-token: [...] > Category:
    networkinterface;
    scheme="http://schemas.ogf.org/occi/infrastructure#"; class="kind" >
    x-occi-attribute:
    occi.core.source="/compute/317813a2-3aa0-4d39-b4ea-53784a513a61" >
    x-occi-attribute: occi.core.target="/network/public" > Content-Type:
    text/occi > < HTTP/1.1 201 Created < Content-Length: 2 <
    Content-Type: text/plain < Location:
    http://localhost:8787/network/interface/60f278d3-c2e7-4acd-a306-d87ec4f8f76e
    < Server: pyssf OCCI/1.1 < Date: Tue, 07 Jan 2014 12:29:03 GMT <
  • Connection #0 to host localhost left intact OK%


Reply to this email directly or view it on GitHub
#65 (comment).



Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,

Prof. Dr. Sebastian M. Schmidt


@tmetsch
Copy link
Owner

tmetsch commented Jan 7, 2014

no problem - glad that it isn't a bug :-D Cheers!

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

3 participants