Bug 28950 - loop-Mount legt immer neues Loopback-Device an
loop-Mount legt immer neues Loopback-Device an
Status: CLOSED WONTFIX
Product: UCS
Classification: Unclassified
Component: Virtualization - Xen
UCS 2.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
:
Depends on: 18690
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-27 12:11 CEST by Philipp Hahn
Modified: 2023-06-28 10:46 CEST (History)
1 user (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):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2012-10-27 12:11:05 CEST
+++ This bug was initially created as a clone of Bug #18690 +++
Für CDROM-Devices in HVM-Xen-Domains ist es notwendig, diese per "file"-Backend einzubinden. Dabei ist aufgefallen daß Xen für jedes ISO-Image erneut ein Loopback-Device pro Domain anlegt, obwohl sich die Domain eigentlich ein einziges Device teilen sollten.
Ursache ist vermutlich <http://lists.xen.org/archives/html/xen-changelog/2005-12/msg00134.html>, denn in /etc/xen/scripts/block:261 wird $XENBUS_BASE_PATH ohne das $XENBUS_TYPE benutzt, wie ein 'set -x' zeigt:

# xenstore-ls -f | grep node
/local/domain/0/backend/vbd/29/832/node = "/dev/loop0"
/local/domain/0/backend/vbd/30/832/node = "/dev/loop1"

# less /var/log/xen/xen-hotplug.log
+ '[' '*' = '*' ']'
+ found=
++ xenstore-list backend
+ for dom in '$(xenstore-list "$XENBUS_BASE_PATH")'
++ xenstore-list backend/vkbd
+ for domdev in '$(xenstore-list "$XENBUS_BASE_PATH/$dom")'
++ xenstore_read_default backend/vkbd/29/node ''
++ xenstore-read backend/vkbd/29/node

In Xen-4.1 ist das bereits korrigiert:
# less ~/src/extern/xen/tools/hotplug/Linux/block
  local base_path="$XENBUS_BASE_PATH/$XENBUS_TYPE"
  for dom in $(xenstore-list "$base_path")
  do
    for dev in $(xenstore-list "$base_path/$dom")
    do
      d=$(xenstore_read_default "$base_path/$dom/$dev/physical-device" "")


--- /etc/xen/scripts/block.orig 2012-10-27 11:50:37.000000000 +0200
+++ /etc/xen/scripts/block      2012-10-27 11:51:59.000000000 +0200
@@ -258,15 +258,15 @@
             if [ "${f:62}" = "*" ]
             then
               found=""
-              for dom in $(xenstore-list "$XENBUS_BASE_PATH")
+              for dom in $(xenstore-list "$XENBUS_BASE_PATH/$XENBUS_TYPE")
               do
-                for domdev in $(xenstore-list "$XENBUS_BASE_PATH/$dom")
+                for domdev in $(xenstore-list "$XENBUS_BASE_PATH/$XENBUS_TYPE/$dom")
                 do
                   d=$(xenstore_read_default \
-                        "$XENBUS_BASE_PATH/$dom/$domdev/node" "")
+                        "$XENBUS_BASE_PATH/$XENBUS_TYPE/$dom/$domdev/node" "")
                   if [ "$d" = "$dev" ]
                   then
-                    f=$(xenstore_read "$XENBUS_BASE_PATH/$dom/$domdev/params")
+                    f=$(xenstore_read "$XENBUS_BASE_PATH/$XENBUS_TYPE/$dom/$domdev/params")
                     found=1
                     break 2
                   fi

Der Patch korrigiert erstmal nur die Erkennung des Sharing, es werden aber weiterhin für jede neue VM neue Loopback-Devices angelegt, Das ist auch mit Xen-4,2 noch so.

Ticket#: 2012072721006183
Comment 1 Stefan Gohmann univentionstaff 2016-04-25 07:52:50 CEST
This issue has been filed against UCS 2.4.

UCS 2.4 is out of maintenance and many UCS components have vastly changed in
later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug".
In this case please provide detailed information on how this issue is affecting
you.