Closed tommyliverani closed 3 years ago
Can you check the output of journalctl -u fos_agent -f
on the second node?
Just to be sure, this is the scenario you have right?
Node1
+-----------------------+
Node2 +--------------------------------------> |
| | YAKS |
+-------------------+---+ +-----------------------+
| | | |
| | | |
| Agent | | Agent |
| Plugins... | | Plugins |
| | | |
| | | |
| | | |
| | +-----------------------+
| | | |
| | | API |
| | | |
+-----------------------+ +-----------------------+
And you see only Node1
right?
Yes I see only Node1 but in this scenario I posted the output of journalctl -u fos_agent
-f on Node1.
Maybe I misunderstood what you meant with "second node"
Do you need this output on Node2?
Yes, the one from node2
.
Also journalctl -u fos_linux -f
for node2
Ok, this is the one not connecting for some reason.
I guess we need the last 50/100 lines of the log to really understand.
You should be able to get them using journalctl -u fos_agent -n 100 --no-pager
I think It is looking for the yacks server with the wrong ip. However I've put in this configuration file(src/agent/etc/agent.json) a different ip(not 127.0.0.1)
You modified the wrong file, you should modify /etc/fos/agent.json
same for the plugins, the files are in /etc/fos/<plugin name>/<plugin name>.json
Thank you so much!
Now I can see both node but I still can't define or migrate instance on node2.
The methods migrate
and define
block my script without printing any error.
Any suggestion?
Which FDU plugin you have on the second machine?
Can you paste the descriptor are you using?
plugin in the second machine: linux, linuxbridge, ctd
Descriptor:
I've done some test and I think the problem is in the ctd plugin in the second machine. It's running but it's not visible with api.node.plugins()
That's the output of systemctl status fos_ctd
on Node1
That's the output of systemctl status fos_ctd
on Node2
In this output the ylocator
field is correct but I don't see the logs of StartRuntime() function
Can you share the log of the containerd plugin?
journalctl -u fos_ctd -n 50 --no-pager
Maybe it is having bad times in connecting to containerd
I see, did you install it from here: https://github.com/eclipse-fog05/fog05/releases/download/v0.2.2/fog05-plugin-fdu-containerd_0.2.1-1_amd64.deb ?
No I install it from source. If I use a yaks server on localhost it works correctly. Do I have to reinstall it with debian package? In this case how can I unistall the old plugin?
You can remove:
/etc/fos/plugins/plugin-fdu-containerd
/lib/systemd/system/fos_ctd.service
Then you can just install the one from the debian package
I install the plugin from debian package. The output is a bit different but the behavior is the same.
The error you are getting is related to the containerd
daemon, it is connecting but seems that is a different version from what is expecting.
Can you check it via: containerd --version
It should be 1.3.4 if not you can install that version from: https://github.com/eclipse-fog05/fog05/releases/download/v0.2.2/containerd.io_1.3.4-1_amd64.deb
Yes it is 1.3.4
Can you copy the whole error stack from the beginning, so we can understand where it actually fails
tommy@tommy-VirtualBox:~/Desktop$ journalctl -u fos_ctd -f
-- Logs begin at Fri 2020-11-27 00:12:52 CET. --
nov 30 14:56:55 tommy-VirtualBox fos_ctd[17384]: /root/go/pkg/mod/google.golang.org/grpc@v1.28.1/stream.go:317 +0x9a5
nov 30 14:56:55 tommy-VirtualBox systemd[1]: fos_ctd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
nov 30 14:56:55 tommy-VirtualBox systemd[1]: fos_ctd.service: Failed with result 'exit-code'.
nov 30 14:56:55 tommy-VirtualBox systemd[1]: fos_ctd.service: Scheduled restart job, restart counter is at 19.
nov 30 14:56:55 tommy-VirtualBox systemd[1]: Stopped fos_ctd.service.
nov 30 14:56:55 tommy-VirtualBox systemd[1]: Started fos_ctd.service.
nov 30 14:56:55 tommy-VirtualBox fos_ctd[18193]: [/etc/fos/plugins/plugin-fdu-containerd/containerd_plugin.json]
nov 30 14:56:55 tommy-VirtualBox fos_ctd[18193]: YLocator is tcp/192.168.56.101:7447
nov 30 14:56:58 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:56:58+01:00" level=info msg="Connecting to containerd ... " func="main.(ContainerdPlugin).StartRuntime" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:148"
nov 30 14:56:58 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:56:58+01:00" level=info msg="Hello from containerd Plugin - PID: 18193" func="main.(ContainerdPlugin).StartRuntime" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:166"
nov 30 14:58:43 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:43+01:00" level=info msg="This is define for edefa0b5-0ce1-56cb-a82f-7ee9ff0ccd69 - 78c0ff48-7599-43da-ba9e-d79a79b27827" func="main.(ContainerdPlugin).DefineFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:214"
nov 30 14:58:43 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:43+01:00" level=debug msg="Defining a container" func="main.(ContainerdPlugin).DefineFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:215"
nov 30 14:58:43 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:43+01:00" level=debug msg="Image Already present: docker.io/gabrik91/loop:latest" func="main.(ContainerdPlugin).DefineFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:246"
nov 30 14:58:43 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:43+01:00" level=debug msg="Added image: docker.io/gabrik91/loop:latest" func="main.(ContainerdPlugin).DefineFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:250"
nov 30 14:58:43 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:43+01:00" level=info msg="Defined container: 78c0ff48-7599-43da-ba9e-d79a79b27827" func="main.(ContainerdPlugin).DefineFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:260"
nov 30 14:58:43 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:43+01:00" level=info msg="Configure container: 78c0ff48-7599-43da-ba9e-d79a79b27827" func="main.(ContainerdPlugin).ConfigureFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:277"
nov 30 14:58:43 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:43+01:00" level=debug msg="Creating container namespace: 78c0ff48-7599-43da-ba9e-d79a79b27827" func="main.(ContainerdPlugin).ConfigureFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:294"
nov 30 14:58:44 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:44+01:00" level=info msg="Registerting Start/Run/Log/Ls/Get evals for 78c0ff48-7599-43da-ba9e-d79a79b27827" func="main.(ContainerdPlugin).ConfigureFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:465"
nov 30 14:58:44 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:44+01:00" level=info msg="Callbacks created, registering... " func="main.(ContainerdPlugin).ConfigureFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:472"
nov 30 14:58:44 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:44+01:00" level=info msg="Updated status for evals for 78c0ff48-7599-43da-ba9e-d79a79b27827" func="main.(ContainerdPlugin).ConfigureFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:480"
nov 30 14:58:44 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:44+01:00" level=debug msg="Start a container" func="main.(ContainerdPlugin).StartFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:535"
nov 30 14:58:44 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:44+01:00" level=debug msg="Creating container: 78c0ff48-7599-43da-ba9e-d79a79b27827" func="main.(ContainerdPlugin).StartFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:578"
nov 30 14:58:45 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:45+01:00" level=debug msg="Starting container: 78c0ff48-7599-43da-ba9e-d79a79b27827" func="main.(ContainerdPlugin).StartFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:587"
nov 30 14:58:45 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:45+01:00" level=debug msg="Creating task" func="main.(ContainerdPlugin).StartFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:589"
nov 30 14:58:45 tommy-VirtualBox fos_ctd[18193]: time="2020-11-30T14:58:45+01:00" level=debug msg="Starting task" func="main.(ContainerdPlugin).StartFDU" file="/root/build/fog05-plugin-fdu-containerd-0.2.1/src/types.go:599"
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: runtime: goroutine stack exceeds 1000000000-byte limit
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: fatal error: stack overflow
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: runtime stack:
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: runtime.throw(0x10e56c7, 0xe)
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: /usr/local/go/src/runtime/panic.go:774 +0x72
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: runtime.newstack()
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: /usr/local/go/src/runtime/stack.go:1046 +0x6e9
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: runtime.morestack()
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: /usr/local/go/src/runtime/asm_amd64.s:449 +0x8f
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: goroutine 24 [running]:
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]: main.(ContainerdPlugin).MigrateFDU(0xc0000f1080, 0xc000233e30, 0x24, 0x0, 0x0)
nov 30 14:58:49 tommy-VirtualBox fos_ctd[18193]:
Ok, from this log I see that it crashes when calling the migration function, which is expected as the migration is not implemented for the containerd plugin. The only plugins implementing migration are LXD and KVM. For the first one, it may not work because migration in LXD depends on CRIU which is often broken
Ok thank you so much.
I'm trying to use a yaks server on a different node in order to enable migration between two nodes.
In my local node I've changed the "ylocator" field in linux and linuxbridge configuration file with the.
I've also changed the "yaks" field in agent configuration file in the same way.
The error occurs when i try to restart fog05 and plugins fail to start.
With
api=FIMAPI('')
api.node.list()
i can obviously see the remote node id only.
Did I miss something?