-
Notifications
You must be signed in to change notification settings - Fork 48
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
POST to /api/v1/token returns WEBrick::HTTPStatus::LengthRequired error #132
Comments
Hi @timidri, We added LDAP support in vmpooler without a wide range of different LDAP environments to test against, so there are any number of things that could be going on. If you're willing to help with some troubleshooting, I'd be happy to help get this working for a larger number of LDAP servers and configurations. We're using OpenLDAP 2.4.31 as the LDAP service, and vmpooler is connecting over port 389 and initializing a
|
Hi Scott, This is the requested output: Enter host password for user 'vmpooler':
I've got some additional info. When I add -d ' ' at the end of the curl command, a token is generated: curl -v -X POST -u vmpooler --url vmpooler.wildemann.nl:4567/api/v1/token -d '' Enter host password for user 'vmpooler':
The token is generated: curl -u vmpooler --url vmpooler.wildemann.nl:4567/api/v1/token |
LDAP details: ldaps with tlsv1 is supported in our config. |
Hi @sschneid, We tested some more today and we found that the problem is not the communication with the LDAP server - that works fine. We were firstly mislead by the |
If vmpooler cannot connect to port 22 ( This check can fail for a variety of reasons:
VMs that fail to move to NOTE: The vmpooler application will not log in to the VM and does not need valid login credentials! It is just checking that the ssh service of the new VM is reachable. |
I forgot to address the If the response you are receiving is JSON that includes Code within the POST /vm/ endpoint that sets the response code ( This behavior is also present within the POST /vm/<pool> endpoint: |
@colinPL Is there a way to work around this? |
More in general: can vmpooler set the hostname itself? I think it's possible using the vsphere API? Otherwize, how would one go about assigning the hostname which should be equal to the vm name early enough in the boot process, while also getting an IP address from a DHCP server? |
Beware: I'm not a Ruby-ninja :) Im trying to set the hostname via VMware Guest Customization where i can define that the GuestOS hostname should be equal to the VM name.
When i call this in pool_manager.rb, it doesn't work: csi = find_customization("vmpooler") Create a clone specspec = RbVmomi::VIM.VirtualMachineCloneSpec( Any suggestions? |
Hi @bazzie, There are a number of possible ways to set the VM's hostname -- I couldn't get the VMware "customization" stuff working for any of our OSes (Linux/UNIX or Windows) when we started writing vmpooler, so instead settled on init scripts to take care of this process: https://gist.github.com/sschneid/bd4b99a45a2f61a9ecc0 |
@sschneid We managed to get it working with the init script you supplied. So that's great news! I would like to thank you and everybody who helped us out. |
Hi,
This issue has been reported as a comment in #129 but should have been a separate issue from the start.
We are running into trouble when trying to use the vmpooler API from Beaker.
We've configured a local LDAP server for authentication and when we try to generate a token, it errors out:
curl -X POST -u bas --url localhost:4567/api/v1/token
Enter host password for user 'bas':
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
HTML>
HEAD>Length Required
BODY>
H1>Length Required
WEBrick::HTTPStatus::LengthRequired
HR>
ADDRESS>
WEBrick/1.3.1 (Ruby/2.0.0/2014-11-13) at
localhost:4567
/ADDRESS>
/BODY>
/HTML>
What are we doing wrong?
The text was updated successfully, but these errors were encountered: