Comments (50)
I rebooted the node then it solved. @gabrik Thank you very much for your patience and detailed explanation.
from fog05.
Ok, thanks! Ithink we can close this issue and in case of other questions we can open other one.
from fog05.
Hi @wuwei3, you are passing the right arguments I just tested it, but I cannot get the error, can you paste the content of the kvm_fdu.json file?
Because the error is in the FDU object creation
from fog05.
from fog05.
Thanks, from what I can see you are using a wrong descriptor, the last update modified a little bit the descriptor format
It should be like this:
{
"id": "test-kvm-fdu",
"name": "test",
"computation_requirements": {
"cpu_arch": "x86_64",
"cpu_min_freq": 0,
"cpu_min_count": 1,
"ram_size_mb": 128,
"storage_size_gb": 10
},
"image": {
"uri": "file:///home/ubuntu/alpine.tar.gz",
"checksum": "21f436639dda7941a26d1eb0c5427862fd19910b",
"format": "tar.gz"
},
"hypervisor": "KVM",
"migration_kind": "LIVE",
"interfaces": [
{
"name": "eth0",
"is_mgmt": false,
"if_type": "INTERNAL",
"mac_address": "be:ef:be:ef:00:01",
"virtual_interface": {
"intf_type": "VIRTIO",
"vpci": "0:0:0",
"bandwidth": 10
},
"cp_id": "fdu-cp-1"
}
],
"io_ports": [],
"connection_points": [
{
"id": "fdu-cp-1",
"name": "fdu-cp1",
"vld_ref": "6cc2aa30-1dcf-4c93-a57e-433fd0bd498e"
}
],
"depends_on": []
}
Can you also check if you have the fog05-im python package installed?
pip3 list | grep fog05
fog05 0.2.0
fog05-im 0.2.0
Also I see that you are using a .tag.gz image with a KVM hypervisor, I think it will not work, as tipically KVM accepts image formats not compressed one, are you sure it is a KVM image and not an LXD one?
from fog05.
Hi,
This is the 'pip3 list | grep fog05' result
And I am sorry, I don't have the KVM or LXD, so if it is not exits, it will throw error?
from fog05.
Ok, just to be sure do a git pull
of the latest version and run
$ make -C src/im/python/ && sudo make -C src/im/python/ install
$ sudo make -C src/api/python/api/ install
If you do not have installed in the node the plugin for LXD or KVM it will not be able to instantiate the FDU.
In order to install the LXD plugin (for instance...)
sudo make -C fos-plugins/LXD install
and then edit the `/etc/fos/plugins/LXD/LXD_plugin.json" file with the correct nodeid
from fog05.
"image": {
"uri": "file:///home/ubuntu/alpine.tar.gz",
"checksum": "21f436639dda7941a26d1eb0c5427862fd19910b",
"format": "tar.gz"
},
for this one, if I didn't have the 'alpine.tar.gz', what will happen?
is it this error?
from fog05.
Yes, you will have that error, in this case you can use another image, like one coming from the LXD repositiory, just using this portion as image:
"image": {
"uri": "lxd://alpine/3.6",
"checksum": "",
"format": ""
},
it will fetch the image from the LXD repository
from fog05.
For the
"uri": "lxd://alpine/3.6"
You mean, this one could be run normally? I tried, it was the same error above.
Could you help me for how to get one image from remote? I mean, with the correct uri which could be run correctly. Thanks
from fog05.
And I got another problme,
I executed the script files in ubuntu 16:
$ ./etc/systemd/enable
$ ./etc/systemd/start
but, if I execute the 'lxc list', got error:
But I get no problem in ubuntu14,
I don't know why, the different is I used 'Start Eclipse fog05 FIM by hand' in ubuntu 14, used the 'Start Eclipse fog05 FIM using systemd' in ubuntu 16.
from fog05.
All the fog05 components runs under a user called fos, that should be able to access the LXD daemon, so it should be part of the lxd group.
Can you try to run:
sudo -u fos lxc list
If you get a connection error this means that you have to add the user to the lxd group
sudo usermod -aG lxd fos
from fog05.
@wuwei3 can you also paste the output of the LXD plugin? I'm wondering if for some reason it is unable to get the image from the LXD repo
from fog05.
@gabrik Hello, wuwei3 and me work together. And I tried to run the LXD plugin by hand in ubuntu 16 (the other 4 YAKS, Agent, Linux and Linux-bridge have been run succesully):
sudo -u fos /etc/fos/plugins/LXD/LXD_plugin /etc/fos/plugins/LXD/LXD_plugin.json
But I got a NewConnectionError :
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='127.0.0.1', port=8443): Max retries exceeded with url: /1.0 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0d5565b2e8>: Failed to establish a new connection: [Errno 111] Connection refused',))
from fog05.
@gabrik And if i trt to run those plugins using Systemctl i met an error:
sudo ./etc/systemd/enable.sh
from fog05.
Hi @zrnapoleon,
This seems a misconfiguration of the LXD daemon, because for some reason the plugin is unable to contact the running daemon.
I suggest first to check if there is something listening on port 8443 on localhost, if yes, then I guess that the user 'fos' is not in the lxd group.
Or you may need to remove lxd and reinstall it from snap
$ sudo apt remove --purge lxd
$ sudo snap remove lxd
$ sudo snap install lxd
from fog05.
Hi @gabrik,
I did just as you recommended but still cant enable those plugins:
from fog05.
before starting the LXD plugin can you run:
$ sudo lxd init
Then please verify if there is something listening on port 8443 using
$ sudo netstat -tlpn
If yes, please verify that the fos uses is inside the lxd group
$ sudo -u fos groups
from fog05.
Hi @gabrik,
I did:
$ sudo apt remove --purge lxd
$ sudo snap remove lxd
$ sudo snap install lxd
$ sudo lxd init
sudo netstat -tlpn
Nothing listening on port 8443
cd fos-plugins/LXD/
sudo make install
from fog05.
Ok, I see, the problem is that LXD it is not listening on port 8443, so the plugin is not able to connect.
Can you check if it is actually running:
$ sudo systemctl status snap.lxd.daemon
And then verify that the python3 client is working:
$ python3
> from pylxd import Client
> c = Client()
Please paste any error you get
Then try by deletting /var/lib/lxd/unix.socket
and retry the python code, and to start the plugin manually
sudo -u fos /etc/fos/plugins/LXD/LXD_plugin /etc/fos/plugins/LXD/LXD_plugin.json
And paste the output
from fog05.
$ sudo systemctl status snap.lxd.daemon
deleted /var/lib/lxd/unix.socket
python code again:
sudo -u fos /etc/fos/plugins/LXD/LXD_plugin /etc/fos/plugins/LXD/LXD_plugin.json
from fog05.
Ok, I see, can you try to reinstall the pylxd client.
$ sudo pip3 uninstall pylxd -y
$ sudo pip3 install pylxd
Then probably there is a missing package for python api, which I need to fix the make file
So from the fog05 repo directory
$ cd /src/im/python
$ make
$ sudo make install
And then verify the operativity of the lxd plugin
from fog05.
I sucessfully reinstalled the pylxd client. but i got a error when i install the package for python:
it seams that i should install a python module "pyangbind" which has been already installed, i dont know why:
from fog05.
Hi @zrnapoleon, I guess you have to install pyang
sudo pip3 install pyang
And then the same steps as before to install the python package, you do not need sudo during make
, only for make install
$ cd src/im/python
$ make
$ sudo make install
from fog05.
yeah, i checked and found that i have already installed it
i still got the following error when i instal the package:
from fog05.
I see, can you do a sudo make clean
and then try the make
I guess there is some file with wrong permission due to the previous usage of sudo
from fog05.
And then i should try to start the plugin manually:
sudo -u fos /etc/fos/plugins/LXD/LXD_plugin /etc/fos/plugins/LXD/LXD_plugin.json
Or it still has something else need to fix before i do that?
from fog05.
This is strange, I think you have the pyangbind
installed, can you try to execute sudo pip3 list | grep yang
You should get something like this:
$ sudo pip3 list | grep yang
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
pyang (1.7.5)
pyangbind (0.8.1)
from fog05.
Yeah, i have already instaled those 2 modules
from fog05.
In this case I think there is something strange in the path used by python to resolve the modules.
Can you run ls -ln /usr/bin/python3
from fog05.
I see, and if you run sudo -u fos ls -ln /usr/bin/python3
you get the same result?
Because I think that they are using two different path for python modules and so it cannot find the correct module
from fog05.
i think they are the same result:
from fog05.
I see.
Then let's try to understand if there is something in the path
Can you run python3 -c "import sys; print(sys.path)"
and sudo -u fos python3 -c "import sys; print(sys.path)"
they should be the same
from fog05.
from fog05.
Ok then in this case we can check if the pyangbind is installed in that path
ls -ln /home/ubuntu/.local/lib/python3.6/site-packages | grep yang
from fog05.
from fog05.
Ok, I think we can try to solve this by running this:
sudo -u fos sudo pip3 install pyangbind
Then it should be able to install in the right path, I still do not understand why it is installed in the user python path and not system-wide
from fog05.
but it was installed in the user python path again...
from fog05.
Ok then, remove it and reinstall it.
sudo pip3 uninstall pyangbind -y
sudo -H pip3 install pyangbind
I do not know if there is a way to force pip to install system-wide, usually install with sudo should make pip aware of the usage of system-wide path
Edit:
The -H
flag on sudo should do the trick
from fog05.
Hi @gabrik ,
Thanks for your help and it seams that i have sucessfully started the lxd plugin:
but, if I execute the 'lxc list', got error, and the fos uses is inside the lxd group:
from fog05.
Hi @zrnapoleon
Can you check which lxc client is ubuntu using?
It should return something like this:
$ which lxc
/snap/bin/lxc
Or you can try with sudo -H -u fos lxc list
from fog05.
from fog05.
Ok then you have to remove the old client in order to use the one shiped by snap
$ sudo apt remove --purge lxd-client
and now with which lxc
you should get the right one.
But just for your infomation it is not an issue if fos user cannot do lxc list
as to see containers you can still use your normal account
from fog05.
Yeah, for one node it works bur for the onther not:
from fog05.
This things drive me crazy...
Can you try a reboot on the node that is not working and then run lxc list
?
It makes no sense that it knows that it has to use /snap/bin/lxc
but it uses /usr/bin/lxc
from fog05.
You are welcome!
Let me know if we can close this issue and in case of other problems/questions you can open other ones
from fog05.
@gabrik one more question: i dont know why each time i reboot my node, the yaksd service will start automaticlly, if i dont kill the ps, i cant do "yaksd -vv" to start the yaksd plugin manually:
and cant use systemed to start it:
from fog05.
@zrnapoleon the enable.sh
enables autostart of yaksd and other components.
You can run
$ sudo systemctl disable yaks
$ sudo systemctl disable fos_agent
$ sudo systemctl disable fos_linux
$ sudo systemctl disable fos_linuxbridge
$ sudo systemctl disable fos_lxd
To disable this behaviour, then you can start it manually or using the script start.sh
To verify that error I guess you can run
$ sudo systemctl enable yaks
$ journalctl -xe
And copy the output so we can verify why is going in error
from fog05.
from fog05.
I see no errors in the output, I can also see output coming from yaksd so, I guess we can ignore that Failed to execute operation...
from fog05.
Related Issues (20)
- [BUG]Could not compile zenoh-util module from Fog05 clone HOT 9
- [BUG] kvm migration fails HOT 1
- Fog05 on microcontrollers HOT 2
- Failed deploy HOT 13
- [BUG] Nodes in the same LAN do not discover
- [Feature] Decentralized state organization HOT 1
- Distributed application deployment HOT 2
- fog05 Networking cross-compilation failed HOT 7
- FDU descriptor with more than one architecture
- Reduce verbosity
- [BUG]No data from call_fun for Request SetVirtualInterfaceUp { iface: "lo" } HOT 2
- Provide nightly builds HOT 2
- Fix formatting
- [BUG] Build-cross.sh error HOT 1
- FDU Flag for non-isolated binary execution
- Integrate REST interface with agent
- Scheduler hint when instantiating/on entity descriptor
- [BUG] Compile error with Rust 1.55.0 (stable) HOT 5
- [BUG] Hello world example is not working HOT 2
- Connexion between Fog05 and 5G UPF (Open5Gs)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fog05.