Giuseppe1992 / Distrinet

Distributed Network emulator, based on Mininet
MIT License
17 stars 16 forks source link

Unable to use G5K provider #49

Open t-valette opened 4 years ago

t-valette commented 4 years ago

I'm using a G5K's node as client (for instance : grisou-19.nancy.grid5000.fr) with ubuntu1804-x64-min deployed on it.

After following the installation section, I can retrieve ~/.distrinet folder properly

root@grisou-19:~/Distrinet/mininet# ls -al ~/.distrinet/
total 20
drwxr-xr-x 2 root root 4096 Apr 20 10:59 .
drwx------ 9 root root 4096 Apr 20 10:58 ..
-rw-r--r-- 1 root root  713 Apr 20 10:59 conf.yml
-rw-r--r-- 1 root root  426 Apr 20 10:41 general_purpose.json
-rw-r--r-- 1 root root 1375 Apr 20 10:41 gros_partial.json

Content of conf.yml below

root@grisou-19:~/Distrinet/mininet# cat ~/.distrinet/conf.yml 
---

ssh:
  pub_id: [...]
  user: "root"
  client_keys: ["/root/.ssh/id_rsa"]
  bastion: "Bastion host IP 'xxx.xxx.xxx.xxx'"

port_forwarding:
  - local: 8181
    proto: 'tcp'
    ip: '192.168.0.250'
    remote: 8181

aws:
  region: "eu-central-1"
  user: "ubuntu"
  volumeSize: "8"
  image_name: "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20190722.1"
  key_name_aws: "id_rsa"
  network_acl:
    - IpProtocol: "-1"
      FromPort: 1
      ToPort: 65353
      IpRanges:
        - CidrIp: "0.0.0.0/0"

g5k:
  g5k_user: [...]
  g5k_password: [...]
  image_name: "ubuntu1804-x64-python3"
  location: "nancy"
  cluster: "grisou"

cluster:
  user: "root"

Then, when I'm trying to start dmn with the g5k provisioner, I'm getting an error (as there's no documentation about G5K deployment, I inferred the command from AWS example and https://github.com/Giuseppe1992/Distrinet/blob/master/mininet/mininet/provision/g5kprovision.py)

root@grisou-19:~/Distrinet/mininet# python3 bin/dmn --provision=g5k --controller=lxcremote,ip=192.168.0.1
*** WARNING: Experimental cloud mode!
*** Using LxcNode, LxcOVSSwitch, CloudLink
--------------------------------------------------------------------------------
Caught exception. Cleaning up...

UnboundLocalError: local variable 'workers' referenced before assignment
--------------------------------------------------------------------------------
*** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes
killall controller ofprotocol ofdatapath ping nox_corelt-nox_core ovs-openflowd ovs-controllerovs-testcontroller udpbwtest mnexec ivs ryu-manager 2> /dev/null
killall -9 controller ofprotocol ofdatapath ping nox_corelt-nox_core ovs-openflowd ovs-controllerovs-testcontroller udpbwtest mnexec ivs ryu-manager 2> /dev/null
pkill -9 -f "sudo mnexec"
*** Removing junk from /tmp
rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log
*** Removing old X11 tunnels
*** Removing excess kernel datapaths
ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'
***  Removing OVS datapaths
ovs-vsctl --timeout=1 list-br
ovs-vsctl --timeout=1 list-br
*** Removing all links of the pattern foo-ethX
ip link show | egrep -o '([-_.[:alnum:]]+-eth[[:digit:]]+)'
ip link show
*** Killing stale mininet node processes
pkill -9 -f mininet:
*** Shutting down stale tunnels
pkill -9 -f Tunnel=Ethernet
pkill -9 -f .ssh/mn
rm -f ~/.ssh/mn/*
*** Cleanup complete.
Giuseppe1992 commented 4 years ago

Hello, Perfect, after the client installation you should do the General Environment tutorial, You need to configure the Master and the Workers; Do you plan to use Distrinet with one Hosts or multiple hosts?

If you want to use just one host, you have to configure just grisou-19.nancy.grid5000.fr as a (Client/Master/Worker)

If you want to use Multiple Machines, you have to configure grisou-19.nancy.grid5000.fr as a Client/Master/Worker and the other as Workers.

Giuseppe

t-valette commented 4 years ago

I plan to use multiple hosts. But I thought the G5K provider would reserve and provision G5K's nodes for me

At the moment, I'm deploying Distrinet by hand following the General Environment tutorial.

Giuseppe1992 commented 4 years ago

Yes, The G5K provider is able to deploy automatically the nodes in some way, but for some reason, I prefer to install it manually:

Giuseppe

t-valette commented 4 years ago

Don't hesitate to contact us through support-staff@lists.grid5000.fr when you have that kind of issue :)