kobolog / gorb

IPVS on steroids – REST API, heartbeats, service discovery and more
GNU Lesser General Public License v3.0
809 stars 83 forks source link

error while creating virtual service: Error! errorcode is: 2\n #9

Closed gregory closed 8 years ago

gregory commented 8 years ago

Hey, this looks pretty interesting. Unfortunately it appear not to work out of the box. I built the images from the current master: 43f7c94
Here are the steps to reproduce:

➜  gorb git:(test) box restart bar
Starting VM...
Restarted machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
➜  gorb git:(test) docker-machine ssh bar sudo modprobe ip_vs
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
➜  gorb git:(test) eval $(docker-machine env bar)
➜  gorb git:(test) docker run -d --net=host --privileged gorb -v -f -i eth1
79920696feef4c37be1fa9a4466b464d1d23310d5f426d6fec2c5f716bce0205
➜  gorb git:(test) docker ps
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS               NAMES
79920696feef        gorb                "gorb -v -f -i eth1"   5 seconds ago       Up 2 seconds                            sick_sammet
➜  gorb git:(test) docker run -d --net=host -v /var/run/docker.sock:/var/run/docker.sock gorb-link -r $(docker-machine ip bar):4672 -i eth1
6c3e6e51a0a603017b779ce7ff283c6ea82e5879fc240ba82955f3efaaab5853
➜  gorb git:(test) docker logs -f 28
➜  gorb git:(test) docker run -d -p 80 nginx
a183ee5c5894ac4d1b1386bc018807d641cf18600af4ce0d8dd7de8ed469af1a
➜  gorb git:(test) docker logs -f 799
time="2015-12-03T17:04:18Z" level=info msg="starting GORB Daemon v0.1"
time="2015-12-03T17:04:18Z" level=info msg="initializing IPVS context"
time="2015-12-03T17:04:18Z" level=info msg="setting up HTTP server on :4672"
time="2015-12-03T17:04:54Z" level=info msg="creating virtual service [nginx_80_tcp] on 192.168.99.101:80"
time="2015-12-03T17:04:54Z" level=error msg="error while creating virtual service: Error! errorcode is: 2\n"
kobolog commented 8 years ago

I just ran the same sequence of commands as you did and it worked, so let's figure it out =) What is your docker-machine driver? I tried on a default VirtualBox boot2docker image, i.e. created the VM first with docker-machine create --driver virtuabox bar. If it's not what you used, then please provide more information about what it was.

aledbf commented 8 years ago

@gregory the ipvs module was loaded before running the image? (modprobe ip_vs)

kobolog commented 8 years ago

Yeah that's the second command in that snippet: gorb git:(test) docker-machine ssh bar sudo mod probe ip_vs. I guess the docker-machine environment is different, like running on some cloud provider or something.

kobolog commented 8 years ago

@gregory I'm hoping you're not responding to this thread because the issue is now magically resolved by itself =)

gregory commented 8 years ago

hehe sorry for late response, with holidays i was pretty busy with couple stuff :) I'll close this for now and re open it if i can reproduce and then provide you guys with more details :) @aledbf from what i remember, i did load the module before.