adfinis / virtesk Goto Github PK
View Code? Open in Web Editor NEWAn Open Source VDI management solution to allow running virtual desktops in a RHEV/Ovirt environment seamlessly
License: GNU General Public License v3.0
An Open Source VDI management solution to allow running virtual desktops in a RHEV/Ovirt environment seamlessly
License: GNU General Public License v3.0
On a new install on Fedora 25, connect_spice
crashes, because it tries to read the dhclient leasefile which it doesn't have any permission anymore.
This functionality can be found in the file find_thinclient_identifier.py
in the functions
find_dhclient_leasefiles()
extract_identifiers_from_leasefiles(leasefilepaths)
Proposal: Instead of dhclient leasefile use the nmcli
which can read the infos through the network manager.
Example output, unfortunately without DHCP hostname
nmcli device show
GENERAL.GERÄT: eth0
GENERAL.TYP: ethernet
GENERAL.HWADDR: D8:CB:8A:64:37:1B
GENERAL.MTU: 1500
GENERAL.STATUS: 100 (verbunden)
GENERAL.VERBINDUNG: eth0
GENERAL.CON-PFAD: /org/freedesktop/NetworkManager/ActiveConnection/0
WIRED-PROPERTIES.TRÄGERFREQUENZ: an
IP4.ADRESSE1: 10.1.5.212/16
IP4.GATEWAY: 10.1.1.1
IP4.DNS1: 10.1.2.8
IP4.DNS2: 10.1.2.22
IP4.DNS3: 10.9.2.1
IP4.DOMAIN1: sygroup-int.ch
IP6.ADRESSE1: 2001:618:1:105:dacb:8aff:fe64:371b/64
IP6.ADRESSE2: fe80::dacb:8aff:fe64:371b/64
IP6.GATEWAY: fe80::200:5eff:fe00:140
IP6.ROUTE1: dst = 2001:618:1:105::/64, nh = ::, mt = 100
GENERAL.GERÄT: lo
GENERAL.TYP: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATUS: 10 (nicht verwaltet)
GENERAL.VERBINDUNG: --
GENERAL.CON-PFAD: --
IP4.ADRESSE1: 127.0.0.1/8
IP4.GATEWAY:
IP6.ADRESSE1: ::1/128
IP6.GATEWAY:
@
The new function should read the IPV4.ADRESSE[x] (seems to be locale dependent) and ipv4.dhcp-hostname.
Must be tested on Fedora 22!
The example database layout in the folder sample_config is faulty.
connect_spice_client.py
uses the view thinclient_everything
to find the mapping between Thinclient and VM.
The schema in database-layout.sql
is under PostgreSQL 9.2.16 (CentOS 7.2) faulty. Creation of the DB does not work.
-bash-4.2$ psql --single-transaction vdi < database-layout.sql
CREATE TABLE
CREATE VIEW
CREATE VIEW
CREATE TABLE
CREATE TABLE
CREATE VIEW
ERROR: syntax error at or near "ON"
LINE 16: current_thinclient_to_vm_mapping c ON (((s.thinclien...
^
CREATE SEQUENCE
ALTER TABLE
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "dhcphostname_to_thinclient_mapping_pkey" for table "dhcphostname_to_thinclient_mapping"
ALTER TABLE
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "systemuuid_to_thinclient_mapping_pkey" for table "systemuuid_to_thinclient_mapping"
ALTER TABLE
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "timed_thinclient_to_vm_mapping_pkey" for table "timed_thinclient_to_vm_mapping"
ALTER TABLE
As a fix, you can use this SQL query:
CREATE VIEW thinclient_everything_view AS
SELECT DISTINCT s.thinclient, c.vm, s.dhcp_hostname,
upper(s.systemuuid::text)::character varying AS systemuuid, c.id,
c.start_date, c.end_date, c.prio, c.shutdown_vm
FROM sysinfo_to_thinclient_mapping s
LEFT JOIN current_thinclient_to_vm_mapping c ON s.thinclient::text = c.thinclient::text
ORDER BY c.prio DESC, c.start_date, c.id;
In addition, there is a database-layout-update-001.sql
, which removes this view but does not recreate it. I'm guessing that the SQL statement
CREATE VIEW thinclient_everything_view AS
is missing. But it also fails with the same error message when executed.
There are still many references to the old Amoothei, which can't be resolved correctly.
Error message from a make release with the current version:
make release
rm -f *.pyc
tar --transform 's,^,amoothei-tc-connectspice/,S' -czf /var/www/mirror/private/thinclients/thinclient-software/connect_spice_client-new.tar.gz *.py amoothei-tc-connectspice-shutdown-vm amoothei-tc-connectspice-main
tar: amoothei-tc-connectspice-shutdown-vm: Cannot stat: No such file or directory
tar: amoothei-tc-connectspice-main: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
make: *** [release] Error 2
A grep
from the virtesk-tc-connectspice
grep -ri amoothei *
connect_spice_client.py:# This file is part of Amoothei-VDI.
connect_spice_client.py:# Amoothei-VDI is free software: you can redistribute it and/or modify
connect_spice_client.py:# Amoothei-VDI is distributed in the hope that it will be useful,
connect_spice_client.py:# along with Amoothei-VDI. If not, see <http://www.gnu.org/licenses/>.
find_thinclient_identifier.py:# This file is part of Amoothei-VDI.
find_thinclient_identifier.py:# Amoothei-VDI is free software: you can redistribute it and/or modify
find_thinclient_identifier.py:# Amoothei-VDI is distributed in the hope that it will be useful,
find_thinclient_identifier.py:# along with Amoothei-VDI. If not, see <http://www.gnu.org/licenses/>.
Makefile: tar --transform 's,^,amoothei-tc-connectspice/,S' -czf /var/www/mirror/private/thinclients/thinclient-software/connect_spice_client-new.tar.gz *.py amoothei-tc-connectspice-shutdown-vm amoothei-tc-connectspice-main
Makefile: flake8 --doctests -j auto --ignore=E221,E222,E251,E272,E241,E203 *.py amoothei-tc-connectspice-*
Makefile: flake8 --doctests -j auto *.py amoothei-tc-connectspice-*
spice_xpi_controller.py:# This file is part of Amoothei-VDI.
spice_xpi_controller.py:# Amoothei-VDI is free software: you can redistribute it and/or modify
spice_xpi_controller.py:# Amoothei-VDI is distributed in the hope that it will be useful,
spice_xpi_controller.py:# along with Amoothei-VDI. If not, see <http://www.gnu.org/licenses/>.
virtesk-tc-connectspice-main:# This file is part of Amoothei-VDI.
virtesk-tc-connectspice-main:# Amoothei-VDI is free software: you can redistribute it and/or modify
virtesk-tc-connectspice-main:# Amoothei-VDI is distributed in the hope that it will be useful,
virtesk-tc-connectspice-main:# along with Amoothei-VDI. If not, see <http://www.gnu.org/licenses/>.
virtesk-tc-connectspice-shutdown-vm:# This file is part of Amoothei-VDI.
virtesk-tc-connectspice-shutdown-vm:# Amoothei-VDI is free software: you can redistribute it and/or modify
virtesk-tc-connectspice-shutdown-vm:# Amoothei-VDI is distributed in the hope that it will be useful,
virtesk-tc-connectspice-shutdown-vm:# along with Amoothei-VDI. If not, see <http://www.gnu.org/licenses/>.
We've have encountered a setup with a set of systems when running on Fedora 25-based terminal clients (Linux kernel 4.8.5) who have shown partial hang during rollout in graphical mode of the Anaconda install. This issue could be reliably worked around by forcing Anaconda into text mode.
Another problem resulting in reliable kernel panic on a certain hardware model could be worked around by forcing kexec into realmode (déjà-vu?).
These issues have not existed so far on Fedora 22 but have appeared on Fedora 25 and Kernel 4.8.5. Since both cases are pretty specific to a set of hardware, distribution release and kernel version, I'd propose to document the workarounds.
I'll reference a pull request, but I'd like to discuss if that is the preferred way for upstream.
In the documentation (DocLink: Virtesk Infrastructure Server), there is a reference to RPMForge.
This project is dead and not maintained anymore and the reference should be removed.
Just some nitpicking, the documentation still contains some references to the old name:
https://docs.adfinis-sygroup.ch/public/virtesk/html/architecture.html
In the current version, Virtesk checks the RHEV tags.
After a reinstall, connect_spice
crashes, because it checks the tags regardless of whether they are created or not.
The function should be removed.
When xrandr fails due to an error (e.g. non supported resolution or garbage in the database field), the error should be logged and the connection should proceed without changing the resolution.
2016-12-19 12:59:32,837 - ERROR - Command '['/usr/bin/xrandr', '-s', '1280x1024']' returned non-zero exit status 1 Traceback (most recent call last): File "/opt/virtesk-tc-connectspice/connect_spice_client.py", line 697, in error_handling_loop self.main_action_sequence() File "/opt/virtesk-tc-connectspice/connect_spice_client.py", line 649, in main_action_sequence self.change_resolution() File "/opt/virtesk-tc-connectspice/connect_spice_client.py", line 280, in change_resolution subprocess.check_output(shlex.split(xrandr_command)) File "/usr/lib64/python2.7/subprocess.py", line 574, in check_output raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command '['/usr/bin/xrandr', '-s', '1280x1024']' returned non-zero exit status 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.