Bug 28104 - Nicht-öffentliche IP wird verwendet für VNC und Bridging
Nicht-öffentliche IP wird verwendet für VNC und Bridging
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.1
Assigned To: Philipp Hahn
Janek Walkenhorst
: interim-3
: 19439 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-28 11:32 CEST by Andreas Lemke
Modified: 2012-12-12 21:10 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Further conceptual development
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Lemke 2012-07-28 11:32:19 CEST
Ich habe folgende Konstellation. 5 Netzwerkarten - 4 x 1 GB und 1 x 10 GB.
Die 10 GBit Karte geht zum Storage und wurde als eth0 erkannt. Die öffnetlich IP Adresse liegt aber auf eth1.

Jetzt wird an diversen Stellen z.B. beim JAVA VNC oder bei anlegen einer virtuellen Maschiene für die Bridge die Nicht-öffentlich IP Adresse verwendet.

Folgendes ist schon eingetragen, bewirkt aber anscheinend nichts.

root@thor:/var/lib/libvirt/local# ucr get uvmm/kvm/bridge/interface 
eth1

Es wäre toll wenn man die öffentlich IP irgendwo hinterlegen könnte.

Oder anders ausgedrückt, so ist das VNC nicht Nutzbar. Ich habe auch keine Möglichkeit das öffentlich Netzwerk auf eth0 zu legen da hier die 10 GB Karte für das Storage dran steckt.
Comment 1 Philipp Hahn univentionstaff 2012-08-07 19:49:32 CEST
Das Format ließ sich schon vorher konfigurieren, nur wurde das nie als UCR-Variable exportiert. Das wurde jetzt nachgeholt und zusätzliche eine Möglichkeit geschaffen, die IP-Adressen anhand von regulären Ausrücken zu filtern bzw. im Hostnamen Ersetzungen durchzuführen. Als letzte Möglichkeit kann mein einen festen Wert setzen, was aber bei zwei oder mehr Virtualisierungsservern dann nicht mehr sinnvoll ist.

svn34686 , univention-virtual-machine-manager-daemon_2.0.1-1.386.201208071940

ChangeLog: svn14237
\item The \ucsUCR{uvmm/umc/vnc/host} controls the format of the VNC link: By default the IPv4 address is used, which can also be explicitly using \emph{IPv4}. \emph{IPv6} explicitly requests an IPv6 address. To both values a Python regular expression can be appended by a single blank, which only accepts matching addresses as returned by \emph{getaddrinfo()}. \emph{NAME} passes on the DNS name of the virtualization server unmodified, but substitutions can be performed by appending multiple \emph{old=new} pairs separated by spaces, which are applied to the name in order. Any other values overwrites the individual server name by a fixed static string (\ucsBug{28104}).
Comment 2 Andreas Lemke 2012-08-07 22:09:23 CEST
Das bezieht sich aber nur auf VNC, oder wird damit auch die Bridge auf eth1 statt auf eth0 gelegt?

Ich habe schon folgendes gesetzt:
ucr get uvmm/kvm/bridge/interface 
eth1

leider setzt er immer noch eth0 als Bridge ein.
Comment 3 Philipp Hahn univentionstaff 2012-08-08 08:49:31 CEST
(In reply to comment #2)
> Das bezieht sich aber nur auf VNC, oder wird damit auch die Bridge auf eth1
> statt auf eth0 gelegt?

Der Patch bezieht sich nur auf VNC.

> Ich habe schon folgendes gesetzt:
>   ucr set uvmm/kvm/bridge/interface=eth1
> leider setzt er immer noch eth0 als Bridge ein.

Über die UCR-Variable wird nur konfiguriert, welches physikalische Netzwerkinterface bei KVM in eine Bridge umgewandelt wird. Da dies in einem Init-Skript passiert, ist danach ein Rechnerneustart anzuraten. (Theoretisch kann man dann auch per Hand umkonfigurieren, aber Instanzen migrieren und Server neustarten ist da der einfachere Weg.)


Eine zweite Sache sind dann die Instanzen: UVMM ist es prinzipiell egal, welches Netzwerkinterface man den Instanzen gibt, voreingestellt ist eth0.

Für bereits angelegte Instanzen lässt sich diese Einstellung nicht global ändern, aber für jede Instanz einzeln: UMC → UVMM → $Instanz bearbeiten → Geräte → $Netzwerkschnittstellen → Bearbeiten → Quelle → eth1 (oder was auch immer).
Notfalls lässt sich das Skripten:
  # Bitte VORHER Dateien sichern!
  /etc/init.d/univention-virtual-machine-manager-node-common stop
  sed -r -i.bak '/<source bridge=/s/eth0/eth1/' /etc/libvirt/qemu/*.xml
  /etc/init.d/univention-virtual-machine-manager-node-common start

Für neu anzulegende Instanzen wird die Information aus den Profilen genutzt; dort ist eth0 voreingestellt. Auch das lässt sich (für jedes Profil einzeln) ändern: UMC → Navigation → UVMM → Profiles → KVM → $Profil bearbeiten → Virtuelle Hardware / Network interface → eth1.
Für mehrere Profile kann man auch das Skripten:
  udm uvmm/profile list | sed -ne 's/^DN: //p' | 
    xargs -r -n1 -d '\n' udm uvmm/profile modify --set interface=eth1 --dn

Danach bitte auf jeden Fall das UVMM-Modul schließen und sich besser noch ganz von UMC abmelden und erneut anmelden, weil die Profilinformationen zwischengespeichert werden.
Comment 4 Philipp Hahn univentionstaff 2012-08-08 13:30:30 CEST
*** Bug 19439 has been marked as a duplicate of this bug. ***
Comment 5 Philipp Hahn univentionstaff 2012-10-09 11:34:46 CEST
Durch svn34687 wurde aus Versehen ein .vnc durch ein .port ersetzt, weshalb in der Domain-Suche der VNC-Links nicht mehr angezeigt wurde. Das wurde korrigiert.

svn36115..6, univention-virtual-machine-manager-daemon_2.0.7-2.394.201210091132
ChangeLog: ±0
Comment 6 Janek Walkenhorst univentionstaff 2012-11-19 18:00:08 CET
Die UCRV funktioniert wie beschrieben.

Changelog OK
Comment 7 Stefan Gohmann univentionstaff 2012-12-12 21:10:51 CET
UCS 3.1-0 has been released: 
 http://forum.univention.de/viewtopic.php?f=54&t=2125

If this error occurs again, please use "Clone This Bug".