Git Product home page Git Product logo

fog05's Introduction

fog05 banner

GitHub CI Travis CI Gitter License License

Eclipse fog05

The End-to-End Compute, Storage and Networking Virtualisation solution.

Eclipse fog05 is an open source project that aims at providing a decentralised infrastructure for provisioning and managing compute, storage, communication and I/O resources available anywhere across the network. Eclipse fog05 addresses highly heterogeneous systems even those with extremely resource-constrained nodes.

Check the website fog05.io for more detailed information

Contributing

If you want to contribute, please read information in CONTRIBUTING.md

Use cases

In this section is possible to find some intresting use cases based on Eclipse fog05.

fog05's People

Contributors

gabrielepmattia avatar gabrik avatar josrolgil avatar kydos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fog05's Issues

Node ID to follow UUID4 standard with dashes

Currently, the uuid of the node, if the node is a Linux machine, is not following the UUID4 standard.

>>> from fog05 import FIMAPI
>>> a = FIMAPI('10.100.1.225')
>>> a.node.list()
['a2d358aaaf2b42cb8d23a89e88b97e5c']

This can lead to confusion

[BUG]Error when add flavor on fog05 from /flavor/add API

Describe the bug
Fail to deploy new instance from OSMr5 with fog05 vim plugin.
When instantiating ns-instance on fog05-vim an errors triggers when POST /flavor/add. Returns 500.

Error
May 29 10:39:19 fog05 fos_rest[19385]: Traceback (most recent call last):
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2309, in call
May 29 10:39:19 fog05 fos_rest[19385]: return self.wsgi_app(environ, start_response)
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2295, in wsgi_app
May 29 10:39:19 fog05 fos_rest[19385]: response = self.handle_exception(e)
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1741, in handle_exception
May 29 10:39:19 fog05 fos_rest[19385]: reraise(exc_type, exc_value, tb)
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
May 29 10:39:19 fog05 fos_rest[19385]: raise value
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2292, in wsgi_app
May 29 10:39:19 fog05 fos_rest[19385]: response = self.full_dispatch_request()
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1815, in full_dispatch_request
May 29 10:39:19 fog05 fos_rest[19385]: rv = self.handle_user_exception(e)
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1718, in handle_user_exception
May 29 10:39:19 fog05 fos_rest[19385]: reraise(exc_type, exc_value, tb)
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
May 29 10:39:19 fog05 fos_rest[19385]: raise value
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1813, in full_dispatch_request
May 29 10:39:19 fog05 fos_rest[19385]: rv = self.dispatch_request()
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1799, in dispatch_request
May 29 10:39:19 fog05 fos_rest[19385]: return self.view_functionsrule.endpoint
May 29 10:39:19 fog05 fos_rest[19385]: File "/etc/fos/rest/service.py", line 274, in flavor_add
May 29 10:39:19 fog05 fos_rest[19385]: descriptor = json.loads(request.data)
May 29 10:39:19 fog05 fos_rest[19385]: File "/usr/lib/python3.5/json/init.py", line 312, in loads
May 29 10:39:19 fog05 fos_rest[19385]: s.class.name))
May 29 10:39:19 fog05 fos_rest[19385]: TypeError: the JSON object must be str, not 'bytes'

Desktop:

  • Ubuntu 16.04
  • OpenStack VM

[BUG] Native plugin is not loading files from provied image

Describe the bug
When creating an FDU for BARE applications with an images and a command, the content of the image is not copied/used neither make availble in the FDU instance directory

To Reproduce
Create a BARE FDU with this descriptor

{
    "uuid": "ac609475-b192-406c-92c1-d64cfce90aa6",
    "name": "test_ping",
    "computation_requirements": {
        "cpu_arch": "armv7l",
        "cpu_min_freq": 0.0,
        "cpu_min_count": 1,
        "ram_size_mb": 64.0,
        "storage_size_gb": 1.0
    },
    "image": {
        "uri": "file:///tmp/yaks-top.zip",
        "checksum": "2935701ae23b433966a5eed237de981257b8af60",
        "format": "zip"
    },
    "command": {
        "binary": "agent",
        "args": [ "176.58.123.75:7222", "yaks_toplevel" ]
    },
    "hypervisor": "BARE",
    "migration_kind": "COLD",
    "depends_on": [],
    "interfaces": [],
    "io_ports": [],
    "connection_points": []
}



Launch it using plain fog05 FIM API
The FDU will run and die because of File not found

Expected behavior
Should run without any issue

[BUG] Node not listed/connected

A node with a successfully running agent on it is not listed/connected even if the communication via Yaks is successful.

Steps to reproduce the behavior:

  1. install fog05 via ./fos_install.sh (manual installation causes runtime errors in libzenohc.so)
  2. run yaksd -vv
  3. run sudo -u fos fagent -c /etc/fos/agent.json -v
  4. run sudo -u fos fos_linux /etc/fos/plugins/linux/linux_plugin.json
  5. run sudo -u fos /etc/fos/plugins/linuxbridge/linuxbridge_plugin /etc/fos/plugins/linuxbridge/linuxbridge_plugin.json
  6. run sudo -u fos /etc/fos/plugins/LXD/LXD_plugin /etc/fos/plugins/LXD/LXD_plugin.json
    (with LXD_DIR=/var/snap/lxd/common/lxd/ exported due to snap installation)
    All plugins are up and running.

The expected behavior is to have the node with the running agent listed when trying to run a python (python3) script to list the nodes via the FIMAPI. Nevertheless, the returned list was empty.

Python script:

from fog05 import FIMAPI

api = FIMAPI(locator='127.0.0.1:7447')
ls = api.node.list()
print(*ls)
api.close()
exit(0)

yaksd's dumps:

[1572807974.282815][DEBUG] Reading WriteData
[1572807974.283580][DEBUG] Handling WriteData Message. nid[UNKNOWN] sid[3] res[/alfos/b53b9540-1a5f-4767-9dfd-6bf9b79e8435/status] [6000027b2275756964223a202262353362393534302d316135662d343736372d396466642d366266396237396538343335222c202272616d223a207b2266726565223a20363931322e35383938343337352c2022746f74616c223a20373937382e373839303632357d2c20226469736b223a205b7b2266726565223a2032332e32313633363139393935313137322c2022746f74616c223a2033312e3932383339303530323932393638382c20226d6f756e745f706f696e74223a20222f227d2c207b2266726565223a20302e302c2022746f74616c223a20302e303837303336313332383132352c20226d6f756e745f706f696e74223a20222f736e61702f636f72652f37393137227d2c207b2266726565223a20302e302c2022746f74616c223a20302e3035333436363739363837352c20226d6f756e745f706f696e74223a20222f736e61702f6c78642f3132323234227d5d2c20226e65696768626f7273223a205b5d7d]
[1572807974.283720][DEBUG] Forwarding data to session -1
[1572807974.283774][DEBUG] Forwarding data to session 0
[1572807974.283871][DEBUG] Writing StreamData
[1572807974.286693][DEBUG] Reading WriteData
[1572807974.287201][DEBUG] Handling WriteData Message. nid[UNKNOWN] sid[0] res[/agfos/0/tenants/0/nodes/b53b9540-1a5f-4767-9dfd-6bf9b79e8435/status] [40027b2275756964223a2262353362393534302d316135662d343736372d396466642d366266396237396538343335222c2272616d223a7b22746f74616c223a373937382e373839303632352c2266726565223a363931322e35383938343337357d2c226469736b223a5b7b226d6f756e745f706f696e74223a222f222c22746f74616c223a33312e3932383339303530323932393638382c2266726565223a32332e32313633363139393935313137327d2c7b226d6f756e745f706f696e74223a222f736e61702f636f72652f37393137222c22746f74616c223a302e303837303336313332383132352c2266726565223a302e307d2c7b226d6f756e745f706f696e74223a222f736e61702f6c78642f3132323234222c22746f74616c223a302e3035333436363739363837352c2266726565223a302e307d5d2c226e65696768626f7273223a5b5d7d]
[1572807974.287922][DEBUG] Forwarding data to session -1
[1572807979.287137][DEBUG] Reading WriteData
[1572807979.287835][DEBUG] Handling WriteData Message. nid[UNKNOWN] sid[3] res[/alfos/b53b9540-1a5f-4767-9dfd-6bf9b79e8435/status] [6000027b2275756964223a202262353362393534302d316135662d343736372d396466642d366266396237396538343335222c202272616d223a207b2266726565223a20363931322e33343337352c2022746f74616c223a20373937382e373839303632357d2c20226469736b223a205b7b2266726565223a2032332e32313633363139393935313137322c2022746f74616c223a2033312e3932383339303530323932393638382c20226d6f756e745f706f696e74223a20222f227d2c207b2266726565223a20302e302c2022746f74616c223a20302e303837303336313332383132352c20226d6f756e745f706f696e74223a20222f736e61702f636f72652f37393137227d2c207b2266726565223a20302e302c2022746f74616c223a20302e3035333436363739363837352c20226d6f756e745f706f696e74223a20222f736e61702f6c78642f3132323234227d5d2c20226e65696768626f7273223a205b5d7d]
[1572807979.288051][DEBUG] Forwarding data to session -1
[1572807979.288104][DEBUG] Forwarding data to session 0
[1572807979.288132][DEBUG] Writing StreamData
[1572807979.291088][DEBUG] Reading WriteData
[1572807979.291583][DEBUG] Handling WriteData Message. nid[UNKNOWN] sid[0] res[/agfos/0/tenants/0/nodes/b53b9540-1a5f-4767-9dfd-6bf9b79e8435/status] [40027b2275756964223a2262353362393534302d316135662d343736372d396466642d366266396237396538343335222c2272616d223a7b22746f74616c223a373937382e373839303632352c2266726565223a363931322e33343337357d2c226469736b223a5b7b226d6f756e745f706f696e74223a222f222c22746f74616c223a33312e3932383339303530323932393638382c2266726565223a32332e32313633363139393935313137327d2c7b226d6f756e745f706f696e74223a222f736e61702f636f72652f37393137222c22746f74616c223a302e303837303336313332383132352c2266726565223a302e307d2c7b226d6f756e745f706f696e74223a222f736e61702f6c78642f3132323234222c22746f74616c223a302e3035333436363739363837352c2266726565223a302e307d5d2c226e65696768626f7273223a5b5d7d]
[1572807979.292256][DEBUG] Forwarding data to session -1
...............

And at the moment of the linux plugin activation the following is dumped by the agent:

fagent: [DEBUG] Reading StreamData
fagent: [INFO] Subscriber listener raised exception Atdgen_runtime.Oj_run.Error("Line 1:\nMissing record field intf_configuration") : 
Raised at file "atdgen-runtime/src/oj_run.ml", line 22, characters 2-18
Called from file "fos-im/fos_types.ml", line 8565, characters 31-196
Called from file "lib/read.mll", line 587, characters 24-42
Called from file "lib/read.ml" (inlined), line 2041, characters 3-55
Called from file "lib/read.mll" (inlined), line 1071, characters 13-47
Called from file "atdgen-runtime/src/oj_run.ml", line 161, characters 2-38
Called from file "fos-im/fos_types.ml" (inlined), line 9617, characters 15-85
Called from file "fos-im/fos_types.ml", line 10207, characters 31-116
Called from file "fos-core/yaks_connector.ml", line 79, characters 23-59
Called from file "src/core/lwt.ml", line 2025, characters 16-20

fagent: [DEBUG] >>> Received message of 428 bytes
fagent: [DEBUG] tx-received: (r_pos: 0, w_pos: 428 content: 29:01:5d:2f:61:6c:66:6f:73:2f:62:35:33:62:39:35:34:30:2d:31:61:35:66:2d:34:37:36:37:2d:39:64:66:64:2d:36:62:66:39:62:37:39:65:38:34:33:35:2f:70:6c:75:67:69:6e:73:2f:34:39:63:36:35:32:64:31:2d:66:38:62:63:2d:34:32:32:30:2d:61:65:32:30:2d:35:33:35:32:36:65:34:66:65:66:30:39:2f:69:6e:66:6f:ca:02:70:80:d0:f0:f3:86:c5:c8:df:5d:b3:b9:68:15:26:01:49:0b:89:7e:6d:38:30:4d:f3:02:00:02:7b:22:6e:61:6d:65:22:3a:20:22:6c:69:6e:75:78:22:2c:20:22:76:65:72:73:69:6f:6e:22:3a:20:31:2c:20:22:75:75:69:64:22:3a:20:22:34:39:63:36:35:32:64:31:2d:66:38:62:63:2d:34:32:32:30:2d:61:65:32:30:2d:35:33:35:32:36:65:34:66:65:66:30:39:22:2c:20:22:74:79:70:65:22:3a:20:22:6f:73:22:2c:20:22:64:65:73:63:72:69:70:74:69:6f:6e:22:3a:20:22:6c:69:6e:75:78:20:6f:73:20:70:6c:75:67:69:6e:22:2c:20:22:63:6f:6e:66:69:67:75:72:61:74:69:6f:6e:22:3a:20:7b:22:79:6c:6f:63:61:74:6f:72:22:3a:20:22:74:63:70:2f:31:32:37:2e:30:2e:30:2e:31:3a:37:34:34:37:22:2c:20:22:6e:6f:64:65:69:64:22:3a:20:22:62:35:33:62:39:35:34:30:2d:31:61:35:66:2d:34:37:36:37:2d:39:64:66:64:2d:36:62:66:39:62:37:39:65:38:34:33:35:22:2c:20:22:65:78:70:6f:73:65:22:3a:20:74:72:75:65:2c:20:22:75:70:64:61:74:65:5f:69:6e:74:65:72:76:61:6c:22:3a:20:35:7d:2c:20:22:70:69:64:22:3a:20:32:36:37:31:2c:20:22:73:74:61:74:75:73:22:3a:20:22:72:75:6e:6e:69:6e:67:22:7d:) 
fagent: [DEBUG] Reading WriteData
fagent: [DEBUG] [FOS-AGENT] - CB-LA-PLUGIN - ##############
fagent: [DEBUG] [FOS-AGENT] - CB-LA-PLUGIN - Received plugin
fagent: [DEBUG] [FOS-AGENT] - CB-LA-PLUGIN - Name: linux
fagent: [DEBUG] [FOS-AGENT] - CB-LA-PLUGIN -  Plugin loaded advertising on GA
fagent: [DEBUG] [Yapi]: PUT on /agfos/0/tenants/0/nodes/b53b9540-1a5f-4767-9dfd-6bf9b79e8435/plugins/49c652d1-f8bc-4220-ae20-53526e4fef09/info : {"uuid":"49c652d1-f8bc-4220-ae20-53526e4fef09","name":"linux","version":1,"type":"os","status":"running","description":"linux os plugin","configuration":{"ylocator":"tcp/127.0.0.1:7447","nodeid":"b53b9540-1a5f-4767-9dfd-6bf9b79e8435","expose":true,"update_interval":5}}
fagent: [WARNING] [Yapi]: PUT on /agfos/0/tenants/0/nodes/b53b9540-1a5f-4767-9dfd-6bf9b79e8435/plugins/49c652d1-f8bc-4220-ae20-53526e4fef09/info : 7b2275756964223a2234396336353264312d663862632d343232302d616532302d353335323665346665663039222c226e616d65223a226c696e7578222c2276657273696f6e223a312c2274797065223a226f73222c22737461747573223a2272756e6e696e67222c226465736372697074696f6e223a226c696e7578206f7320706c7567696e222c22636f6e66696775726174696f6e223a7b22796c6f6361746f72223a227463702f3132372e302e302e313a37343437222c226e6f64656964223a2262353362393534302d316135662d343736372d396466642d366266396237396538343335222c226578706f7365223a747275652c227570646174655f696e74657276616c223a357d7d
fagent: [DEBUG] Writing WriteData
fagent: [DEBUG] >>> Received message of 389 bytes
.......................................................

I see the error "Missing record field intf_configuration" but it seams not to break the plugin's resources registration as they are further used by the linuxbridge and LXD plugins successfully. Is that correct or it may be causing the issue?

Maybe I have misconfigured something? (node id is b53b9540-1a5f-4767-9dfd-6bf9b79e8435)
/etc/fos/agent.json

{
    "agent": {
        "system": "0",
        "pid_file": "/var/fos/agent.pid",
        "expose": true,
        "yaks": "tcp/127.0.0.1:7447",
        "path": "/var/fos",
        "enable_lldp": false,
        "enable_spawner": false,
        "mgmt_interface": "enp0s3",
        "lldp_conf": "/etc/fos/lldpd/lldpd.conf"
    },
    "plugins": {
        "plugin_path": "/etc/fos/plugins",
        "autoload": false
    }
}

/etc/fos/plugins/linux/linux_plugin.json

{
  "name": "linux",
  "version": 1,
  "uuid": "49c652d1-f8bc-4220-ae20-53526e4fef09",
  "type": "os",
  "description": "linux os plugin",
  "configuration": {
    "ylocator": "tcp/127.0.0.1:7447",
    "nodeid": "b53b9540-1a5f-4767-9dfd-6bf9b79e8435",
    "expose": true,
    "update_interval": 5
  }
}

/etc/fos/plugins/linuxbridge/linuxbridge_plugin.json

{
  "name": "linuxbridge",
  "version": 1,
  "uuid": "d42b4163-af35-423a-acb4-a228290cf0be",
  "type": "network",
  "requirements": [
    "jinja2"
  ],
  "description": "linux Bridge network plugin",
  "configuration": {
    "ylocator": "tcp/127.0.0.1:7447",
    "nodeid": "b53b9540-1a5f-4767-9dfd-6bf9b79e8435",
    "dataplane_interface": "enp0s3",
    "use_vlan": false,
    "vlan_interface": "ens2",
    "vlan_range": [
      50,
      100
    ]
  }
}

/etc/fos/plugins/LXD/LXD_plugin.json

{
  "name": "LXD",
  "version": 1,
  "uuid": "892ae9fe-9d1b-4dc6-87a3-66f5695a9971",
  "type": "runtime",
  "requirements": [
    "pylxd",
    "jinja2",
    "packaging"
  ],
  "description": "lxd fdu plugin",
  "configuration": {
    "storage_pool": "default",
    "ylocator": "tcp/127.0.0.1:7447",
    "nodeid": "b53b9540-1a5f-4767-9dfd-6bf9b79e8435",
    "update_interval": 5
  }
}

where the nodeid is already updated accordingly and the sudoers user group (where fos is added) as well as fos itself are granted NOPASSWD:ALL .

As far as I managed to inspect the communication looking into the yaks's and the agent's dumps, the calls for initializing the linux bridge and LXD plugins are successfully executed using the agent's linux os plugin, so the communication routing seams to be fine as well as the agent. So event though I can see the node is functioning I'm not able to deploy any kind of FDUs on this node as its id is missing FIMAPI-wise.

It would be great if you could give me some guidance on where to search and investigate deeper for the causes of the problem. If any further information/logs/dumps would be helpful, just name it.

  • OS: Debian Buster x86_64 (kernel version 4.19.67-2+deb10u1)
  • Version: master
  • Involved plugin - linux, linuxbridge, LXD

Architectural doubts

I have many different nodes that need to be deployed at run-time when certain conditions are met or specific messages arrive. I was asking myself what was the best way to implement this kind of behavior:

  1. Adding a REST service to the Python script that deploy the initial architecture that can receive those message and can trigger the creation of the nodes;
  2. Give to one of the deployed entities (one of the central ones) the possibility to contact YAKS and use fog05 REST APIs to create the nodes;
  3. Create a specific entity (maybe there's something I'm missing from fog05 explicitly for this use case) that can have access to YAKS and use fog05 REST APIs to create nodes.
    I was rooting for the first or the third idea, because it would be a centralized way to manage the entities and I would avoid giving to deployed entities the explicit knowledge of the existence of fog05.

Therefore, I have 3 doubts:

  • Am I right in my choice or am I missing something?
  • Is the scenario above a perfect use case for using a management (mgmt) interface or is that something destined to other cases?
  • I also read about ETSI MANO management and orchestrator. I know a little about it, it seems something related to what I'm trying to do. Could you give me a hint about this or it's related to something totally different?

Thank you in advance for your time.

[BUG] LXD/LinuxBridge crash

Describe the bug
LXD or LinuxBridge (2 different outcomes encountered) crashes when creating 2 LXD containers connected through a ELAN (with DHCP).

To Reproduce
Steps to reproduce the behavior:

  1. Add network
  2. Onboard 1st and 2nd container
  3. Define 1st and 2nd container
  4. Configure 1st and 2nd container (if it happens here, it's LXD who crashes: situation 1)
  5. Start 1st and 2nd container
  6. Stop 1st and 2nd container
  7. Clean 1st and 2nd container (if it happens here, it's LinuxBridge who crashes: situation 2)
    I'm attaching all the files I used except for the images because they're too big, but I think every local valid container archive should reproduce the issues I described.
    Cloud-Thing_Arch.zip

Expected behavior
I just expected to deploy the network to connect the 2 containers and make them communicate without being reachable from the outside.

Desktop:

  • OS: Linux Ubuntu
  • Version: 18.04.2
  • Involved plugin: LXD, LinuxBridge

Additional context
I'm currently using fog05 for my master thesis and I'm learning by myself to use it, therefore I apologize in advance for the bug above for it could be as well being due to my misunderstandings and gaps of the concepts needed to properly use this tool. However, down here, there are excerpts of the logs for each situation:

[2019-06-28 00:18:53,172] - [INFO] > < __generate_container_dict() > LXD Plugin - Container Configuration {'name': 'cc5031692-e814-4d6d-ba81-cf099b81bb50', 'profiles': ['c5031692-e814-4d6d-ba81-cf099b81bb50'], 'source': {'type': 'image', 'alias': '1e57bb0e-cb41-4b23-bca3-1fa761a83c20'}} [2019-06-28 00:18:53,172] - [INFO] > < configure_fdu() > [ DONE ] LXD Plugin - Generating container configuration... [2019-06-28 00:18:53,173] - [INFO] > < configure_fdu() > [ INFO ] LXD Plugin - Creating Container... [2019-06-28 00:18:57,761] - [INFO] > < __monitor_fdu() > [ INFO ] LXD Plugin - Updating status of 1e57bb0e-cb41-4b23-bca3-1fa761a83c10 [2019-06-28 00:19:03,436] - [INFO] > < undefine_fdu() > [ INFO ] LXD Plugin - Container Name c5031692-e814-4d6d-ba81-cf099b81bb50 [2019-06-28 00:19:03,436] - [INFO] > < configure_fdu() > [ DONE ] LXD Plugin - Creating Container... [2019-06-28 00:19:03,438] - [ERROR] > < __monitor_instance() > [ ERROR ] LXD Plugin - Stopping monitoring of Container uuid b06524af-c6ce-43c0-bafd-4dc9580a09f3 Error Yaks replied with unexpected message Exception in thread Thread-6: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.6/dist-packages/fog05-0.2.0a1-py3.6.egg/fog05/yaks_connector.py", line 983, in cb callback(json.loads(v.value)) File "/etc/fos/plugins/LXD/LXD_plugin", line 1075, in __fdu_observer react_func(fdu_uuid) File "/etc/fos/plugins/LXD/LXD_plugin", line 436, in configure_fdu self.update_fdu_status(fdu_uuid, instance_uuid, 'CONFIGURE') File "/usr/local/lib/python3.6/dist-packages/fog05-0.2.0a1-py3.6.egg/fog05/interfaces/RuntimePluginFDU.py", line 137, in update_fdu_status record = self.connector.loc.actual.get_node_fdu(self.node, self.uuid, fdu_uuid, instance_uuid) File "/usr/local/lib/python3.6/dist-packages/fog05-0.2.0a1-py3.6.egg/fog05/yaks_connector.py", line 1014, in get_node_fdu res = self.ws.get(s) File "/usr/local/lib/python3.6/dist-packages/yaks-0.2.7-py3.6.egg/yaks/workspace.py", line 125, in get if check_reply_is_values(reply, gm): File "/usr/local/lib/python3.6/dist-packages/yaks-0.2.7-py3.6.egg/yaks/runtime.py", line 95, in check_reply_is_values if reply.mid == Message.VALUES and msg.corr_id == reply.corr_id: AttributeError: 'NoneType' object has no attribute 'mid'

[2019-06-28 00:43:13,399] - [INFO] > < __port_observer() > Linux Bridge Plugin - New Action of a Port - Port Info: {'uuid': '0b573f32-76ff-44ee-8b02-9d6d49be6989', 'status': 'DESTROY', 'cp_uuid': 'bbd9595b-75c5-414c-9d9d-8811838be1f7', 'properties': {'int_name': 'cp-07489-i', 'ext_name': 'cp-07489-e', 'cp_name': 'br-cp-07489', 'start': '/var/fos/linuxbridge/create_port_br-cp-07489.sh', 'stop': '/var/fos/linuxbridge/destroy_port_br-cp-07489.sh'}} [2019-06-28 00:43:13,399] - [INFO] > < __port_observer() > Linux Bridge Plugin - This is a remove for : {'uuid': '0b573f32-76ff-44ee-8b02-9d6d49be6989', 'status': 'DESTROY', 'cp_uuid': 'bbd9595b-75c5-414c-9d9d-8811838be1f7', 'properties': {'int_name': 'cp-07489-i', 'ext_name': 'cp-07489-e', 'cp_name': 'br-cp-07489', 'start': '/var/fos/linuxbridge/create_port_br-cp-07489.sh', 'stop': '/var/fos/linuxbridge/destroy_port_br-cp-07489.sh'}} Exception in thread Thread-10: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.6/dist-packages/fog05-0.2.0a1-py3.6.egg/fog05/yaks_connector.py", line 1124, in cb callback(json.loads(v.value)) File "/etc/fos/plugins/linuxbridge/linuxbridge_plugin", line 765, in __port_observer self.delete_port(port_uuid) File "/etc/fos/plugins/linuxbridge/linuxbridge_plugin", line 352, in delete_port self.call_os_plugin_function('execute_command',{'command':stop_file,'blocking':True, 'external':True}) File "/usr/local/lib/python3.6/dist-packages/fog05-0.2.0a1-py3.6.egg/fog05/interfaces/Plugin.py", line 32, in call_os_plugin_function self.node, fname, fparameters) File "/usr/local/lib/python3.6/dist-packages/fog05-0.2.0a1-py3.6.egg/fog05/yaks_connector.py", line 857, in exec_os_eval res = self.ws.eval(s) File "/usr/local/lib/python3.6/dist-packages/yaks-0.2.7-py3.6.egg/yaks/workspace.py", line 253, in eval if check_reply_is_values(reply, em): File "/usr/local/lib/python3.6/dist-packages/yaks-0.2.7-py3.6.egg/yaks/runtime.py", line 101, in check_reply_is_values raise RuntimeError('Yaks replied with unexpected message') RuntimeError: Yaks replied with unexpected message

[INFO]2 Fog nodes

hi @gabrik , i have built and installed two fog05 nodes on 2 different virtual machines. Now i want to understand how them can be connected each other and how i can run something upon it. like a container a virtual machine. Thanks in advance.

Two nodes deployment issues

hi @gabrik what if i want to deploy something like a container or a virtual machine to test the system composed by 2 nodes? i saw the example and i will try it, but next?

Fog05 hags when you deploy lxc with wi-fi interface

I want to deploy lxc container with wi fi interface using fog05 python API, but the container will not start. On the destination machine i can see the container in STOP state and on the host machine where i run the script it blocks on instantiate(). I am ruining the latest version of fog05 available on git with the LXD_plugin.

Steps to reproduce the behavior:
Descriptor:
{
"uuid": "1e57bb0e-cb41-4b23-bca3-1fa761a83c02",
"name": "test_1",
"computation_requirements": {
"cpu_arch": "x86_64",
"cpu_min_freq": 0,
"cpu_min_count": 1,
"ram_size_mb": 128.0,
"storage_size_gb": 5.0
},
"image": {
"uri": "lxd://alpine/3.6",
"checksum": "",
"format": ""
},
"hypervisor": "LXD",
"migration_kind": "COLD",
"interfaces": [
{
"name": "wlan0",
"is_mgmt": false,
"if_type": "EXTERNAL",
"mac_address": "be:ef:be:ef:00:01",
"virtual_interface": {
"intf_type": "PHYSICAL",
"vpci": "0:0:0",
"bandwidth": 10
},
"cp_id": ""
}
],
"io_ports": [],
"connection_points": [
{
"uuid": "a47a8819-72e5-4b4e-86fd-fc30c9fda68b",
"pair_id": ""
}
],
"depends_on": []
}

Use the python3 API and launch the container using the provided descriptor.
In normal case i should see the container up and running after the script has finished.

  • OS: Ubuntu
  • Version 16.04
  • Involved plugin LXD
  • LXD version: 3.15
  • pylxd: 2.2.10

[LXD] Container initialization with command/script

Is your feature request related to a problem? Please describe.
I have multiple containers and I need to execute a script in each one of them once they're started.

Describe the solution you'd like
I'm trying to use cloud-init initialization that I saw on LXD_plugin, but it seems it hasn't been fully implemented yet: I have added the object "configuration" to the FDU descriptor, but it seems it's not taken into consideration when parsing the descriptor.

Describe alternatives you've considered
I'm using cron for now, but it would be extra nice to have a feature like this fully working, especially in development/testing environment, when it's needed to change fast what is being executed.

Is LXD monitoring still in development?

I was trying to get the IP address of an interface of one of my containers, but I kept receiving a monitoring error. I applied a workaround to /etc/fos/plugins/LXD/LXD_plugin to make it work:

  1. Moved the code for creating the thread for monitoring to the end of the function run_fdu()
  2. Uncommented "c_net = cs.network" line
  3. Commented everything below the previous line until the first detailed_state.update(...) statement

Now I can get the IP address from the hypervisor field returned by instance_info method, but I don't understand if it's just a problem of mine or if this feature is still in development.

[BUG] Linux, LinuxBridge and runtime plugins hangs when retrieving IP address of an FDU interface

Describe the bug
The monitoring process of an FDU hangs when it tries to retrieve information from the DHCP about the IP Address of an FDU's interface

To Reproduce
Instantiate an FDU connected to a virtual network, with DHCP

Expected behavior
Should not hang

Desktop (please complete the following information):

  • OS: Ubuntu
  • Version 18.04, 16.04
  • Involved pluging: Linux, LinuxBridge, any runtime plugin

Additional context
Seems that the LinuxPlugin hangs when trying to read data from the dnsmasq lease file, and so all the chain just hangs
Linux plugin output:

[2019-07-24 09:45:27,656] - [INFO] > < read_file() > Arguments: {'root': 'True', 'file_path': '/var/fos/linuxbridge/dhcp/net_6cc2aa30_leases', 'self': <__main__.Linux object at 0x7fa2ef274e48>}

LinuxBridge plugin:

[2019-07-24 09:45:27,655] - [INFO] > < get_address() > Linux Bridge Plugin - Getting IP address for  be:ef:be:ef:00:01

LXD plugin:

[2019-07-24 09:45:27,634] - [INFO] > < __monitor_instance() > [ INFO ] LXD Plugin - Updating status of 9c507cba-ba02-4b89-9abe-b23c2763a294 - c9c507cba-ba02-4b89-9abe-b23c2763a294

The LinuxPlugin acutally, as the parameter root is set to True, should execute this command: sudo cat /var/fos/linuxbridge/dhcp/net_6cc2aa30_leases

That should not hang, the code that hangs is:

if root:
                file_path = 'sudo cat {}'.format(file_path)
                process = subprocess.Popen(
                    file_path.split(), stdout=subprocess.PIPE)
                for line in iter(process.stdout.readline, ''):
                    data = data + '{}'.format(line)

That hangs also if executed in python interpreter

$ python3
Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from subprocess import PIPE
>>> import subprocess
>>> cmd  = 'sudo cat  /var/fos/linuxbridge/dhcp/net_6cc2aa30_leases'
>>> p = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
>>> data = ''
>>> for line in iter(p.stdout.readline, ''):
...     data = data + '{}'.format(line)
...

This suggest that we should find another way to read that file

[BUG] FDU information are not removed from YAKS

Describe the bug
FDU remove keeps information also if FDUs are removed

To Reproduce
Instantiate an FDU, then remove it, and using api.fdu.get_nodes() you will still found the FDU

Expected behavior
The FDU information should be removed

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • All
  • 0.2
  • Agent

[BUG] Migration of an LXD container does not result in container running on destination

Describe the bug
When migrating an LXD container from one fog05 node to another using the api.fdu.migrate(UUID of instance,UUID of destination node) function, the destination node does not get the container initialized on it.

To Reproduce
There are 3 machines in this case.
One machine running the deploy code (with the fog python SDK and API installed)
2 fog05 nodes: fog-node1 and fog-node2
Yaks server is contained on fog-node1 and both fog-node1 and fog-node2 are visible when running api.node.list()

Steps to reproduce the behavior:

  1. Using the descriptor from the bottom of this page: https://fog05.io/docs/overview/ and the deploy code below to create an LXD container on node1
  2. Migrate container from node 1 to node 2
  3. Run sudo lxc list on both nodes and look at the output

Expected behavior
It is expected that node 1 displays a stopped container. Node 2 displays the container running

Actual behavior
However, the opposite happens. Node 1 displays the container running. The container is not present in node 2.
There is no error on the deploy code terminal output

Desktop (please complete the following information):

  • OS: Linux (Ubuntu 18.04)
  • Version; 18.04
  • Involved plugin: LXD

Additional context
Deploy code:

from fog05 import FIMAPI
from fog05_sdk.interfaces.FDU import FDU
import json
import time


def read_file(filepath):
    with open(filepath, 'r') as f:
        data = f.read()
    return data


n1 = 'fd5c3f53-787c-484f-b618-bde549824b2e'
n2 = '6811eb7b-5e56-e399-e5eb-3bba5e4a6918'
n3 = '814d39bb-07cc-ad9d-4956-1a9d5e4a68a2'

api = FIMAPI(locator='10.79.4.132')
desk = read_file('fdu_helloworld.json')
desc = json.loads(desk)
fdu_descriptor = FDU(desc)
fduD = api.fdu.onboard(fdu_descriptor)
print('fdu_id : {}'.format(fduD.get_uuid()))
time.sleep(2)
fdu_id = fduD.get_uuid()
inst_info = api.fdu.instantiate(fdu_id, n1)
print('Instance ID : {}'.format(inst_info.get_uuid()))

inst_id = api.fdu.migrate(inst_info.get_uuid(), n2)

input('Press enter to terminate')

api.fdu.terminate(inst_info.get_uuid())

api.close()
exit(0)

Print out of journalctl -u fos_lxd -f from node 1:

Feb 24 16:56:37 fog-node1 fos_lxd[717]: [2020-02-24 16:56:37,912] - [INFO] > < __fdu_observer() >  LXD Plugin - New Action of a FDU - FDU Info: {'uuid': '195bd14f-6292-4409-bfb6-d8199d5661cd', 'fdu_id': 'd790a23d-ee56-5645-8c8d-fb014d9c4776', 'status': 'STOP', 'image': {'uri': 'lxd://ubuntu/bionic', 'checksum': '', 'format': ''}, 'storage': [], 'computation_requirements': {'cpu_arch': 'x86_64', 'cpu_min_freq': 0, 'cpu_min_count': 1, 'ram_size_mb': 128.0, 'storage_size_gb': 1.0}, 'hypervisor': 'LXD', 'migration_kind': 'COLD', 'interfaces': [{'name': 'eth0', 'is_mgmt': False, 'if_type': 'INTERNAL', 'mac_address': 'be:ef:be:ef:00:01', 'virtual_interface': {'intf_type': 'BRIDGED', 'vpci': 'lxdbr0', 'bandwidth': 10}, 'vintf_name': 'eth0', 'status': 'CREATE', 'phy_face': 'lxdbr0'}], 'io_ports': [], 'connection_points': [], 'depends_on': [], 'hypervisor_info': {}}
Feb 24 16:56:37 fog-node1 fos_lxd[717]: [2020-02-24 16:56:37,913] - [INFO] > < stop_fdu() >  LXD Plugin - Stop a Container uuid 195bd14f-6292-4409-bfb6-d8199d5661cd
Feb 24 16:56:37 fog-node1 fos_lxd[717]: [2020-02-24 16:56:37,913] - [INFO] > < stop_fdu() > [ INFO ] LXD Plugin - Container Name c195bd14f-6292-4409-bfb6-d8199d5661cd
Feb 24 16:56:39 fog-node1 fos_lxd[717]: [2020-02-24 16:56:39,012] - [INFO] > < stop_fdu() > [ DONE ] LXD Plugin - Stop a Container uuid 195bd14f-6292-4409-bfb6-d8199d5661cd
Feb 24 16:56:39 fog-node1 fos_lxd[717]: [2020-02-24 16:56:39,057] - [INFO] > < __fdu_observer() >  LXD Plugin - New Action of a FDU - FDU Info: {'uuid': '195bd14f-6292-4409-bfb6-d8199d5661cd', 'fdu_id': 'd790a23d-ee56-5645-8c8d-fb014d9c4776', 'status': 'CLEAN', 'image': {'uri': 'lxd://ubuntu/bionic', 'checksum': '', 'format': ''}, 'storage': [], 'computation_requirements': {'cpu_arch': 'x86_64', 'cpu_min_freq': 0, 'cpu_min_count': 1, 'ram_size_mb': 128.0, 'storage_size_gb': 1.0}, 'hypervisor': 'LXD', 'migration_kind': 'COLD', 'interfaces': [{'name': 'eth0', 'is_mgmt': False, 'if_type': 'INTERNAL', 'mac_address': 'be:ef:be:ef:00:01', 'virtual_interface': {'intf_type': 'BRIDGED', 'vpci': 'lxdbr0', 'bandwidth': 10}, 'vintf_name': 'eth0', 'status': 'CREATE', 'phy_face': 'lxdbr0'}], 'io_ports': [], 'connection_points': [], 'depends_on': [], 'hypervisor_info': {}}
Feb 24 16:56:39 fog-node1 fos_lxd[717]: [2020-02-24 16:56:39,057] - [INFO] > < clean_fdu() >  LXD Plugin - Clean a Container uuid 195bd14f-6292-4409-bfb6-d8199d5661cd
Feb 24 16:56:39 fog-node1 fos_lxd[717]: [2020-02-24 16:56:39,073] - [INFO] > < clean_fdu() > [ DONE ] LXD Plugin - Clean a Container uuid 195bd14f-6292-4409-bfb6-d8199d5661cd
Feb 24 16:56:39 fog-node1 fos_lxd[717]: [2020-02-24 16:56:39,150] - [INFO] > < __fdu_observer() >  LXD Plugin - New Action of a FDU - FDU Info: {'uuid': '195bd14f-6292-4409-bfb6-d8199d5661cd', 'fdu_id': 'd790a23d-ee56-5645-8c8d-fb014d9c4776', 'status': 'UNDEFINE', 'image': {'uri': 'lxd://ubuntu/bionic', 'checksum': '', 'format': ''}, 'storage': [], 'computation_requirements': {'cpu_arch': 'x86_64', 'cpu_min_freq': 0, 'cpu_min_count': 1, 'ram_size_mb': 128.0, 'storage_size_gb': 1.0}, 'hypervisor': 'LXD', 'migration_kind': 'COLD', 'interfaces': [{'name': 'eth0', 'is_mgmt': False, 'if_type': 'INTERNAL', 'mac_address': 'be:ef:be:ef:00:01', 'virtual_interface': {'intf_type': 'BRIDGED', 'vpci': 'lxdbr0', 'bandwidth': 10}, 'vintf_name': 'eth0', 'status': 'CREATE', 'phy_face': 'lxdbr0'}], 'io_ports': [], 'connection_points': [], 'depends_on': [], 'hypervisor_info': {}}
Feb 24 16:56:39 fog-node1 fos_lxd[717]: [2020-02-24 16:56:39,150] - [INFO] > < __fdu_observer() >  LXD Plugin - This is a remove for : {'uuid': '195bd14f-6292-4409-bfb6-d8199d5661cd', 'fdu_id': 'd790a23d-ee56-5645-8c8d-fb014d9c4776', 'status': 'UNDEFINE', 'image': {'uri': 'lxd://ubuntu/bionic', 'checksum': '', 'format': ''}, 'storage': [], 'computation_requirements': {'cpu_arch': 'x86_64', 'cpu_min_freq': 0, 'cpu_min_count': 1, 'ram_size_mb': 128.0, 'storage_size_gb': 1.0}, 'hypervisor': 'LXD', 'migration_kind': 'COLD', 'interfaces': [{'name': 'eth0', 'is_mgmt': False, 'if_type': 'INTERNAL', 'mac_address': 'be:ef:be:ef:00:01', 'virtual_interface': {'intf_type': 'BRIDGED', 'vpci': 'lxdbr0', 'bandwidth': 10}, 'vintf_name': 'eth0', 'status': 'CREATE', 'phy_face': 'lxdbr0'}], 'io_ports': [], 'connection_points': [], 'depends_on': [], 'hypervisor_info': {}}
Feb 24 16:56:39 fog-node1 fos_lxd[717]: [2020-02-24 16:56:39,150] - [INFO] > < undefine_fdu() >  LXD Plugin - Undefine a Container uuid 195bd14f-6292-4409-bfb6-d8199d5661cd
Feb 24 16:56:39 fog-node1 fos_lxd[717]: [2020-02-24 16:56:39,150] - [INFO] > < undefine_fdu() > [ INFO ] LXD Plugin - Container Name c195bd14f-6292-4409-bfb6-d8199d5661cd
Feb 24 16:56:41 fog-node1 fos_lxd[717]: [2020-02-24 16:56:41,233] - [INFO] > < undefine_fdu() > [ DONE ] LXD Plugin - Undefine a Container uuid 195bd14f-6292-4409-bfb6-d8199d5661cd

Note: Nothing was printed out when running journalctl -u fos_lxd -f while "deploy code" was running

Creating virtual bridges

When specifying interface and br_name in the deployment json, the container is not created if the brdige does not exist. Could be nice to have fog05 create the bridges with specific name and attach to atomic entities

[ERROR] The installation of z_storage failed at "dune build -p z_storage

When i try to install zenoh i get an error:

[ERROR] The installation of z_storage failed at "dune build -p z_storage
        @install".

and:

#=== ERROR while installing z_storage.0.2.5 ===================================#
# context     2.0.6 | linux/x86_64 | ocaml-base-compiler.4.07.1 | pinned(git+file:///root/fos_build/zenoh#HEAD#46d43788)
# path        ~/.opam/fos/.opam-switch/build/z_storage.0.2.5
# command     ~/.opam/opam-init/hooks/sandbox.sh install dune build -p z_storage @install
# exit-code   1
# env-file    ~/.opam/log/z_storage-28741-f2076a.env
# output-file ~/.opam/log/z_storage-28741-f2076a.out
### output ###
# File "example/plugins/dune", line 7, characters 19-30:
# 7 |   (libraries       zenoh-ocaml dynload-sys)
#                        ^^^^^^^^^^^
# Error: Library "zenoh-ocaml" not found.
# Hint: try: dune external-lib-deps --missing -p z_storage @install



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ ∗ install z_storage 0.2.5
└─ 

in your opinion i have to follow in the installation anyway o try with the hint?

# Hint: try: dune external-lib-deps --missing -p z_storage @install

ETSI MEC 010-2 Information Model for FEO (Fog Entity Orchestrator)

As MEC Orchestration/MEC Platform already follows part of the ETSI MEC 010-2 Information Model, for ME App and MEC Services, it would be intresting to have also information about the Deployment Unit to be used by the orchestration layer in order to instantiate directly in the FIM.

This can be an initial implementation of the Fog Entity Orchestrator, that would be based on the current MEC Orchestrator.

Specs are:

This also will lead to a general source reorganization as today MEC Orchestator and MEC Platform shares some atd file that need to be unique.

[BUG] Mm5 and Mp1 interfaces of MEC Platform give incorrect location header

MEC Platform Mm5 and Mp1 interfaces procuces a wrong URL in the location header upon a the creation of a resource

from a TCP dump


POST /exampleAPI/mm5/v1/applications/123/dns_rules HTTP/1.1
Host: 10.212.26.198:8091
Accept: */*
Connection: keep-alive
Accept-Encoding: gzip, deflate
Content-Length: 125
User-Agent: python-requests/2.9.1

{"dnsRuleId":"dnsRule2","domainName":"googledns.mec","ipAddressType":"IP_V4","ipAddress":"8.8.4.4","ttl":10,"state":"ACTIVE"}HTTP/1.1 201 Created
Server: nginx/1.14.0 (Ubuntu)
Date: Thu, 09 May 2019 10:59:38 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
location: /exampleAPI/mm5/v1/applications123dns_rulesdnsRule2

89
{"DnsRule":{"dnsRuleId":"dnsRule2","domainName":"googledns.mec","ipAddressType":"IP_V4","ipAddress":"8.8.4.4","ttl":10,"state":"ACTIVE"}}
0

Missing / in the URL

[BUG] Can't get Linux plugin to connect to the node

Describe the bug
When I try to run Linux plugin, it throws an exception and exit.

To Reproduce

  1. Launch YAKS
  2. Launch fagent
  3. Launch Linux plugin
    Linux_log.txt

Expected behavior
I expected to connect the plugin to the node.

Desktop

  • OS: Linux Ubuntu
  • Version: 16.04
  • Involved plugin: Linux

Additional context
This bug happened after I pulled the last changes of the repo and reinstalled everything (commit 02d6598, July 8th).

Raspbian Install - error

Hi,
I tried to run the installation on a raspberry pi with raspbian stretch by executing the .sh file but I encountered many problems including installing some python libraries.

Anyone else tried to install to install on a similar system?

[BUG] 2nd FDU interface not receiving an IP address

Describe the bug
I have a LXC container with 2 network interfaces, both INTERNAL and VIRTIO, each one connected to a different ELAN. While the 1st interface is obtaining an IP address, the 2nd one is not receiving any IP address.

To Reproduce
Steps to reproduce the behavior:

  1. Add 1st and 2nd network
  2. Instance the FDU

Here are the files I'm using:
Archivio.zip

Expected behavior
I expected to get an IP address for both interfaces, but I'm probably stating something wrong in the configuration file, I think.

Desktop:

  • OS: Linux Ubuntu
  • Version: 18.04.2
  • Involved plugin: LXD (LXC 3.14, pylxd: 2.2.10), LinuxBridge

FIMAPI class FDU issue

Hello, I want to deploy lxd FDU fog05 python API, but I cant successfully list my deployed fdu. However, I can define, configure, start, stop and deletet fdu with its uuid using FIMAPI:
image

OS: Ubuntu
Version 16.04
Involved plugin LXD
LXD version: 3.18

MAC address mapping is not working

Deploying containers using LXD plugin with static MAC address is not working. The key "mac_address" from the descriptor is not taken into account when creating the containers.

By defining the "mac_address" in the descriptor i would have expected that specific interface of the deployed container would get the pre-defined MAC address.

Example of descriptor containing the mac_address key:

"uuid": "3b4251a7-468f-4d64-b78c-8e2dfd9451e3",
"name": "hostapd0",
"computation_requirements": {
    "cpu_arch": "x86_64",
    "cpu_min_freq": 0.0,
    "cpu_min_count": 1,
    "ram_size_mb": 128.0,
    "storage_size_gb": 5.0
},
"image": {
    "uri": "file:///home/netcom/repository/hostapd.tar.gz",
    "checksum": "26eda4b4bae4dad871ec9fab9c51af3d3517e8db5256af1d1bbc743a4ff4d8ac",
    "format": "tar.gz"
},
"hypervisor": "LXD",
"migration_kind": "LIVE",
"depends_on": [],
"interfaces": [
    {
        "name": "mgmt",
        "is_mgmt": false,
        "if_type": "INTERNAL",
        "mac_address": "be:ef:be:ef:00:02",
        "virtual_interface": {
            "intf_type": "VIRTIO",
            "vpci": "0:0:0",
            "bandwidth": 10
        },
        "cp_id": "2192bb19-a3f7-4b59-9473-eeec9573fb3b"
    },
    {
        "name": "wlan0",
        "is_mgmt": false,
        "if_type": "EXTERNAL",
        "mac_address": "be:ef:be:ef:b0:01",
        "virtual_interface": {
            "intf_type": "PHYSICAL",
            "vpci": "wlan0",
            "bandwidth": 10
        },
        "cp_id": ""
    }
],
"io_ports": [],
"connection_points": [
    {
        "uuid": "2192bb19-a3f7-4b59-9473-eeec9573fb3b",
        "pair_id": "6cc2aa30-1dcf-4c93-a57e-433fd0bd498e"
    }
]

}

  • OS: Ubuntu
  • Version 16.04
  • Involved plugin LXD
  • LXD version: 3.14
  • pylxd: 2.2.10

How To add new node?

For now, I have successfully installed the fog, but I don't know what and how to use it, for example, if i want to add new node into it, how could I do with wiriting code? and is there any simple way to do like by webside or something else?

If it is possible, could you please list the functions of fog for now?

ERROR: grounder returned with non-zero exit status

Hi, i'm trying to install fog05, following the install.md and build.md file. I started from build as suggest in install.md.
When i ran:

# opam switch create fos ocaml-base-compiler.4.07.1

I got the error:

[ERROR] Solver failed: "/usr/bin/aspcud /root/.opam/log/solver-in-2562-5f1023 /root/.opam/log/solver-out-2562-58c514 -count(removed),-sum(request,version-lag),-count(down),-sum(solution,version-lag),-count(changed)" exited with code 1 "ERROR: grounder returned with non-zero exit status" Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n]

It's correct to start from build? is present an automated script to build up the system?
thanks in advance

Floating IPs implementation

In order to implement floating IPs, some addition as to be made in both agent and network manager plugin.

In particular the agent need to expose this set of fuctions:

  • add_port_to_network
  • remove_port_from_network
  • create_floating_ip
  • delete_floating_ip
  • assign_floating_ip
  • remove_floating_ip

The first two are not strictly related to floating IPs but they will help in the implementation.

Floating IPs will be "node local" meaning that an FDU can receive a floating IP only from one of the physical network of which the node is part.
Different nodes in the same network will have different floating IPs.

[BUG] Stopping the services does not kill zenoh/yaks server

Describe the bug
When stopping all the services with

sudo systemctl stop fos_agent
sudo systemctl stop yaks

The zenoh server is still listening on port 7447 tcp 0 0 0.0.0.0:7447 0.0.0.0:* LISTEN 4661/zenohd

To Reproduce
Start YAKS service and stop it

Expected behavior
Zenoh server should be stopped by systemd

Desktop (please complete the following information):

  • OS: Linux
  • Version: master
  • Involved plugin: None

Atomic Entity managment

Atomic Entities are a groups of FDUs that are coupled and that need to be deployed at the same time, and that may need some sort of interconnection.

An Atomic Entity can be connected with one or mode Atomic Entities to create an Entity.

Here an example of the descriptor of an Atomic Entity, composed by two FDUs interconnected by one link, and that expose a link for connection with other Atomic Entities

{
    "uuid": "db101a31-2045-4482-97dd-8c566491eab2",
    "name": "test_atomic_entity",
    "description": "this is a simple atomic entity composed by two LXD containers",
    "fdus": [
        {
            "name": "testOne",
            "computation_requirements": {
                "cpu_arch": "x86_64",
                "cpu_min_freq": 0.0,
                "cpu_min_count": 1,
                "ram_size_mb": 128.0,
                "storage_size_gb": 5.0
            },
            "base_image": {
                "uri": "lxd://alpine/3.6",
                "checksum": "",
                "format": ""
            },
            "hypervisor": "LXD",
            "migration_kind": "LIVE",
            "interfaces": [
                {
                    "name": "eth0",
                    "is_mgmt": true,
                    "if_type": "EXTERNAL",
                    "virtual_interface": {
                        "intf_type": "VIRTIO",
                        "vpci": "0:0:0",
                        "bandwidth": 10
                    },
                    "ext_cp_id": "test-ext-cp0"
                },
                {
                    "name": "eth1",
                    "is_mgmt": false,
                    "if_type": "INTERNAL",
                    "virtual_interface": {
                        "intf_type": "VIRTIO",
                        "vpci": "0:0:0",
                        "bandwidth": 10
                    },
                    "cp_id": "test-cp1"
                }
            ],
            "io_ports": [],
            "connection_points": [
                {
                    "id": "test-cp1",
                    "name": "test-internal-cp1"
                }
            ],
            "depends_on": []
        },
        {
            "name": "testTwo",
            "computation_requirements": {
                "cpu_arch": "x86_64",
                "cpu_min_freq": 0.0,
                "cpu_min_count": 1,
                "ram_size_mb": 128.0,
                "storage_size_gb": 5.0
            },
            "base_image": {
                "uri": "lxd://alpine/3.6",
                "checksum": "",
                "format": ""
            },
            "hypervisor": "LXD",
            "migration_kind": "LIVE",
            "interfaces": [
                {
                    "name": "eth1",
                    "is_mgmt": false,
                    "if_type": "INTERNAL",
                    "virtual_interface": {
                        "intf_type": "VIRTIO",
                        "vpci": "0:0:0",
                        "bandwidth": 10
                    },
                    "cp_id": "test-cp2"
                }
            ],
            "io_ports": [],
            "connection_points": [
                {
                    "id": "test-cp2",
                    "name": "test-internal-cp2"
                }
            ],
            "depends_on": []
        }
    ],
    "internal_virtual_links": [
        {
            "id": "internal",
            "name": "internal-vl",
            "ip_configuration": {
                "ip_version": "IPV4",
                "subnet": "192.168.234.0/24",
                "gateway": "192.168.234.1",
                "dhcp_enable": true,
                "dhcp_range": "192.168.234.2,192.168.234.100",
                "dns": "8.8.8.8,8.8.4.4"
            },
            "int_cps": [
                "test-cp1",
                "test-cp2"
            ]
        }
    ],
    "connection_points": [
        {
            "id": "test-ext-cp0",
            "name": "test-ext-cp0"
        }
    ],
    "depends_on": []
}

From an ETSI NFV point-of-view an Atomic Entity is a VNF

Build and deploy a FDU on a node?

For now, I have successfully installed the fog with its 5 plugins. But when i tried to deploy a LXD FDU:
$ python3 lifecycle_non_lxd_test.py 127.0.0.1:7887 fdu_lxd_test.json
Here lifecycle_non_lxd_test.py and fdu_lxd_test.json are based on:
https://github.com/atolab/fog05_demo/blob/master/fim_api/lifecycle_nonetwork.py
and
https://github.com/atolab/fog05_demo/blob/master/fim_api/fdu_lxd.json
with mu node ID:
image
and the net interface:
image
I got the following error:
image

Json and Python fiches.zip
Hope you can give me some help, thanks!

[BUG] MEC Platform Mp1 interfaces issues

MEC Platform Mp1 interface has some bugs related to:

  • subscription types: there is a typo in the subscription type for AppTerminationNotification
  • On traffic_rules if the data inside the PUT are not well formed the MEC Platform hang, should reply with error.
  • DNS/Traffic Rules, can be only enabled/disabled and updated.
  • DNS/Traffic rules, if disabled should not be written in the DynDNS

[BUG] Update dependencies in BUILD.md building instructions

Describe the bug
Hitting make, after following BUILD.md instructions, returns

make -C sdk/sdk-ocaml install
make[1]: Entering directory '/home/debian/Downloads/fog05/sdk/sdk-ocaml'
opam install . --working-dir
[fos-sdk.0.1] synchronised from git+file:///home/debian/Downloads/fog05/sdk/sdk-ocaml#HEAD
The following dependencies couldn't be met:
  - fos-sdk → yaks-common >= 0.3.0
      no matching version

No solution found, exiting
make[1]: *** [Makefile:71: install] Error 20
make[1]: Leaving directory '/home/debian/Downloads/fog05/sdk/sdk-ocaml'
make: *** [Makefile:23: ocaml-sdk] Error 2

To Reproduce
Steps to reproduce the behavior:

  1. Follow the building script
  2. make submodules
  3. make

Expected behavior
No error should be reported

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Debian
  • Version: 10
  • Involved plugin: None

Additional context
None

[BUG] TypeError: __init__() takes 1 positional argument but 2 were given

Describe the bug
I copied the https://github.com/atolab/fog05_demo/blob/master/fim_api/lifecycle_nonetwork.py
and execute the file, pass the params, but get the error:

9

Did I pass the wrong params?

To Reproduce
Steps to reproduce the behavior:

  1. copy the content of https://github.com/atolab/fog05_demo/blob/master/fim_api/lifecycle_nonetwork.py
  2. upload to server
  3. execute the py file
  4. See error

Desktop (please complete the following information):

  • OS: Ubuntu 16
  • Version: master
  • Involved plugin: All

[BUG] Logs says error, but there are no errors

Some logs reports errors even if they are just debug information.

Example:

[2019-06-06 14:57:31,971] - [ERROR] > < store_file() > Called for: /var/fos/linuxbridge/start_6cc2aa30.sh
[2019-06-06 14:57:31,972] - [ERROR] > < store_file() > Stored: 948 bytes


[2019-06-06 14:59:13,034] - [ERROR] > < file_exists() > Called for: /var/fos/lxd/images/test.tar.gz
[2019-06-06 14:59:13,034] - [ERROR] > < file_exists() > Result True
[2019-06-06 14:59:13,036] - [ERROR] > < checksum() > Calculating SHA256 of /var/fos/lxd/images/test.tar.gz

Change the log to use logger.debug

[ERROR] > < configure_fdu() > Error The "default" storage pool doesn't exist

Meet error when try to deploy un lxd fdu:

Traceback (most recent call last):
File "lifecycle_nonetwork.py", line 76, in
main(sys.argv[1], sys.argv[2])
File "lifecycle_nonetwork.py", line 48, in main
a.fdu.configure(instid)
File "/usr/local/lib/python3.6/dist-packages/fog05-0.2.0-py3.6.egg/fog05/fimapi.py", line 618, in configure
File "/usr/local/lib/python3.6/dist-packages/fog05-0.2.0-py3.6.egg/fog05/fimapi.py", line 503, in __wait_node_fdu_state_change
ValueError: Unable to change state to CONFIGURE for FDU Instance: 4e513bf2-b2f9-4c3f-90b2-8ed57370cb7e Errno: 2 Msg: The "default" storage pool doesn't exist

Missing Volumes definition in both IM and resource Tree

The volumes abstraction that can be used for attaching disks to VMs/Containers is not currently present neither in the IM nor in the resource Tree.
This is crucial when mapping to industrial frameworks like MEC and NFV

[BUG] Unable to retrieve VMs IP address after instatiation

After the instatiation VMs FDUs it is not possible to retrieve the IP address of none of the interfaces.
This causes a difference on the status API between LXD and VMs, also this make impossible to instatiate VMs on fog05 from OSM vimconn

  • Involved plugins: KVM, LinuxBridge

[BUG]Got error while executing "make install" under "fog05/fos-plugins/linuxbridge/"

Describe the bug
While execting the "make install" under "fog05/fos-plugins/linuxbridge/" folder, got the error, see the log file

error.txt

I install the fog05 in ubuntu 16,04, this step was ok in ubuntu14. I don't know why it cannot work in ubuntu16.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'fog05/fos-plugins/linuxbridge/'
  2. execute the "make install" command
  3. See error

Desktop (please complete the following information):

  • OS: ubuntu 16
  • Version: git clone from master
  • Involved plugin: All

[BUG] Unable to connect FDU Interface to Atomic Entity external connection point

If we instantiate an atomic entity in which one or more fdu are connected to external connection points of the atomic entity those interface are not connected nor the connection point created

Eg and example of descriptor that does not work:

{
    "id": "one-fdu-atomic-entity",
    "name": "test_atomic_entity",
    "description": "this is a simple atomic entity composed by one LXD containers",
    "fdus": [
        {
            "id": "alpine3.6",
            "name": "alpine_3.6",
            "computation_requirements": {
                "cpu_arch": "x86_64",
                "cpu_min_freq": 0,
                "cpu_min_count": 1,
                "ram_size_mb": 128.0,
                "storage_size_gb": 5.0
            },
            "image": {
                "uri": "lxd://alpine/3.6",
                "checksum": "",
                "format": ""
            },
            "hypervisor": "LXD",
            "migration_kind": "LIVE",
            "interfaces": [
                {
                    "name": "eth0",
                    "is_mgmt": false,
                    "if_type": "INTERNAL",
                    "virtual_interface": {
                        "intf_type": "VIRTIO",
                        "vpci": "0:0:0",
                        "bandwidth": 10
                    },
                    "ext_cp_id": "external-cp1"
                }
            ],
            "io_ports": [],
            "connection_points": [],
            "storage": [],
            "depends_on": []
        }
    ],
    "internal_virtual_links": [],
    "connection_points": [
        {
            "name": "external-cp1",
            "id": "external-cp1"
        }
    ],
    "depends_on": []
}

Expected behavior
In this case the interfaces should be connected to the right connection points

API: retrieve the list of nodes an fdu is running on

In the current API definition for the fdu it is not possible to retrieve the list of nodes the fdu is running on.

  1. api.fdu.info(fdu_uuid) returns the information of the fdu. However, there is no reference to the node the fdu is running on.
  2. api.fdu.instance_info(fdu_uuid, node_uuid) requires to know a priori the node_uuid to retrieve information.

Request:
A new API "api.fdu.get_nodes(fdu_uuid)" which returns a list of node_uuid the fdu is running on.

[BUG]ModuleNotFoundError: No module named 'fog05'

Describe the bug
I download the source code from master, while I execute the command

sudo -u fos fos_linux /etc/fos/plugins/linux/linux_plugin.json

I got the error message "ModuleNotFoundError: No module named 'fog05'"

nofog05

I go to the "/usr/bin", open the fos_linux file, find:

fromplugins

how can I get these plugins?

To Reproduce

  1. install all the plugins
  2. execute the command
  3. exception throws

Expected behavior
it should be start normally.

Desktop (please complete the following information):

  • OS: ubuntu14
  • Version: master
  • Involved plugin: All

Additional context
Could you guys provide more detail on how to install the fog05? Like what plugins and dependencies need to install? what neccessary SDk need to install, what version of linux OS can insatll, etc.

[BUG] pylxd.exceptions.ClientConnectionFailed

Describe the bug
While starting the fog system, the LXD_plugin reports error: pylxd.exceptions.ClientConnectionFailed

This problem is the same as the issue here: canonical/pylxd#317
And I did some workaround based on this comment: canonical/pylxd#317 (comment)
I inserted some code into /etc/fos/plugins/LXD/LXD_plugin, around line 81 in the def start_runtime(self):
Client() => Client(endpoint='https://127.0.0.1:8443', verify=False)

Is there a formal way to deal with this error?

  • Hardware: Nvidia TX2
  • OS: Ubuntu 16.04.6 LTS
  • Version 4.4.38-tegra aarch64
  • Involved plugin LXD

Screenshot
11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.