ArchipelProject / Archipel

XMPP Based Orchestrator
http://archipelproject.org
GNU Affero General Public License v3.0
803 stars 127 forks source link

BUG: Two agents on the same machine, mixing of VMs #1002

Open tomzpl opened 10 years ago

tomzpl commented 10 years ago

Hi, I want to use LXC with QEMU/KVM. But Archipel doesn't allows to configure two hypervisors within one instance of agent. So I've prepared two files:

It starts but there is no possibility of configuring WebSocket through .conf files, and there is an error for the second agent(socket.error: [Errno 98] Address already in use). The output of the error is available here: www.tomz.pl/Aukcje/other/socket_fail.txt

After login to the web interface, I'm able to manage both agents, but it works until restart (ejabbered or server ofc). The problem after restart is:

  1. Machines are mixed, those which should be assigned for LXC are seen for KVM and opposite.
  2. It looks like the precedence of taking the machine after restart is random. Sometimes LXC takes machines, sometimes KVM agent.

Before Screenshots: LXC VM: http://www.tomz.pl/Aukcje/other/ok_1.png KVM VM: http://www.tomz.pl/Aukcje/other/ok_2.png LXC AGENT: http://www.tomz.pl/Aukcje/other/ok_3.png KVM AGENT: http://www.tomz.pl/Aukcje/other/ok_4.png

After restart Screenshots: LXC VM: http://www.tomz.pl/Aukcje/other/reboot_3.png KVM VM: http://www.tomz.pl/Aukcje/other/reboot_4.png LXC AGENT: http://www.tomz.pl/Aukcje/other/reboot_2.png KVM AGENT: http://www.tomz.pl/Aukcje/other/reboot_1.png

Solution: When assigning the machines by UUID make sure that hypervisor matches the agent capabilities. Allow configuration of Websocket instance and propagate it for appropriate VNC Console

CyrilPeponnet commented 10 years ago

Well as all is managed through libvirt, it's normal that things mixes. I you type virsh list on the host you will see both kvm and lxc domains.

EDIT : I'm not so sure about above :p but you can give a try.

I know you can manage both on the same host with libvirt but I never tried.

I'm pretty sure to have read something like that before, the main idea is to use the same agent.

@primalmotion may help here (I try to find the related issue in the meantime)

CyrilPeponnet commented 10 years ago

Note that LXC support is not yet included in archipel

tomzpl commented 10 years ago

virsh list --all

Id Name State

31 _TEMPLATE_ASAv8.4 running

Nowaker commented 10 years ago

@tomzpl Try assigning port numbers manually. AFAIR noVNC proxies are always +1000. So if you set 5900, 5901, 5902, 5903 to your VMs, they will get a noVNC proxy 6900, 6901, 6902, 6903. Two started by the first Archipel, two started by the second one.