#work #backup-service #bug --- # Summary We openen libvirt connection alleen tijdens het starten van het proces. Daarna niet meer. Dus connection was closed door iets -> elk opvolgend request faalt. **Oplossing** Connections e.d openen per request. # Onderzoek ```shell 2025-01-06 11:00:42.760 3562 INFO goba.cmd.agent [None req-3ac13f90-ebe4-482b-82ef-fded0df9be87 - - - - -] action='delete' type='backup' task_uuid='1957362f-44ec-475b-a5a1-96b53aa8be60' 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent [-] internal error: client socket is closed: libvirt.libvirtError: internal error: client socket is closed 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent Traceback (most recent call last): 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent File "/usr/lib/python3/dist-packages/goba/cmd/agent.py", line 137, in execute 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent execute_fn(ctx) 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent File "/usr/lib/python3/dist-packages/goba/cmd/agent.py", line 192, in execute_fn 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent backup.delete(req, self.storage, self.libvirt) 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent File "/usr/lib/python3/dist-packages/goba/backup.py", line 332, in delete 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent if not libvirt_client.is_running(instance_id): 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent File "/usr/lib/python3/dist-packages/goba/adapters/libvirt.py", line 134, in is_running 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent dom_state = self._get_domain(instance_id).state()[0] 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent File "/usr/lib/python3/dist-packages/libvirt.py", line 3146, in state 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent raise libvirtError('virDomainGetState() failed') 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent libvirt.libvirtError: internal error: client socket is closed 2025-01-06 11:00:42.763 3562 ERROR goba.cmd.agent ``` ``` [jasras@n14.compute.vps1-lej1 ~]$ systemctl status goba ● goba.service - Group.one OpenStack Backup Agent Loaded: loaded (/lib/systemd/system/goba.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2024-12-12 06:26:50 UTC; 3 weeks 4 days ago Docs: https://gitlab.group.one/groupvps/group-one-backup-agent Main PID: 3562 (goba) Tasks: 86 (limit: 4915) Memory: 166.9M CPU: 2h 23min 28.981s CGroup: /system.slice/goba.service ├─ 3562 /usr/bin/python3 /usr/bin/goba --config-file /etc/goba/goba.conf └─14368 /usr/bin/python3 /usr/bin/privsep-helper --config-file /etc/goba/goba.conf --privsep_context goba.privsep.file_admin_pctxt --privsep_sock_path /tmp/tmpjfi8jt6b/privsep.sock ``` Er draait hier nog een privsep-helper Na restart: ``` CGroup: /system.slice/goba.service └─30932 /usr/bin/python3 /usr/bin/goba --config-file /etc/goba/goba.conf ``` Tasks slagen nu wel.