Can not allocate IP address

Hi Guys,

I am trying to create a container using the following command. However the container is getting created but it is not taking the allocated IP address. Can you please help in this?

curl -u “XXXXXX:YYYYYY” -X POST -H ‘Accept: application/json’ -H ‘Content-Type: application/json’ -d ‘{“build”:null, “capAdd”:[], “capDrop”:[], “command”:[], “count”:1, “dataVolumes”:["/opt/software:/opt/software"], “dataVolumesFrom”:[], “devices”:[], “dns”:[], “dnsSearch”:[], “entryPoint”:["/bin/bash"], “expose”:[], “extraHosts”:[], “healthCheck”:null, “hostname”:“sample1”, “imageUuid”:“docker:ubuntu:latest”, “logConfig”:null, “networkIds”:[], “networkMode”:“managed”, “ports”:[], “privileged”:false, “publishAllPorts”:false, “readOnly”:false, “requestedIpAddress”:“”, “securityOpt”:[], “startOnCreate”:true, “stdinOpen”:true, “tty”:true, “dataVolumesFromLaunchConfigs”:[], “disks”:[]}’ ‘http://XXX.XXX.XXX.XXX:9090/v1/launchconfigs

Being able to post to launchconfigs at all is a bug… if you’re trying to create a service then it should be going to /v1/services (or /v1/projects/<id>/services), and the launchConfig is a property of it. For a stand-alone contanerin /v1/containers. Requested IP is also only requested; if there is another container already using that IP you’ll get a random one.

HI Vincent,

Thanks for the reply. When trying to create from /v1/containers we are getting an option for “Requested IP Address”. We are providing an IP address which is not been used. The generated request is drafting as the above command with “requestedIpAddress”:“” as requested IP address. We have also tried with “requested”: also. The containers is getting created and all parameters given is verified to be working fine (Ex-“dataVolumes”:["/opt:/opt/softwares"] ). Only the container is not taking the allocated IP. Is there any round way to do this?