Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 612820 Details for
Bug 857424
[PATCH] Multiple storage volume in a same storage pool cannot be created with virt-install's --disk options
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
An experimental patch makes allowing multiple --disk options to create multi-volumes in same storage pool
0001-made-parameter-passed-from-StorageVolume.find_free_n.patch (text/plain), 2.78 KB, created by
Satoru SATOH
on 2012-09-14 11:31:57 UTC
(
hide
)
Description:
An experimental patch makes allowing multiple --disk options to create multi-volumes in same storage pool
Filename:
MIME Type:
Creator:
Satoru SATOH
Created:
2012-09-14 11:31:57 UTC
Size:
2.78 KB
patch
obsolete
>From 6310ee4b8f9fbc710b18cb12954ad91ddc1d15e0 Mon Sep 17 00:00:00 2001 >From: Satoru SATOH <ssato@redhat.com> >Date: Thu, 13 Sep 2012 12:35:09 +0900 >Subject: [PATCH] added parameter passed from StorageVolume.find_free_name > to _utils.generate_name and made it incremented by itertools.count > >--- > virtinst/Storage.py | 5 +++-- > virtinst/cli.py | 9 +++++++-- > 2 files changed, 10 insertions(+), 4 deletions(-) > >diff --git a/virtinst/Storage.py b/virtinst/Storage.py >index 8efef74..542105f 100644 >--- a/virtinst/Storage.py >+++ b/virtinst/Storage.py >@@ -1008,7 +1008,7 @@ class StorageVolume(StorageObject): > get_volume_for_pool = staticmethod(get_volume_for_pool) > > def find_free_name(name, pool_object=None, pool_name=None, conn=None, >- suffix="", collidelist=None): >+ suffix="", collidelist=None, start_num=0): > """ > Finds a name similar (or equal) to passed 'name' that is not in use > by another pool >@@ -1035,7 +1035,8 @@ class StorageVolume(StorageObject): > pool_object.refresh(0) > > return _util.generate_name(name, pool_object.storageVolLookupByName, >- suffix, collidelist=collidelist) >+ suffix, collidelist=collidelist, >+ start_num=start_num) > find_free_name = staticmethod(find_free_name) > > def lookup_pool_by_name(pool_object=None, pool_name=None, conn=None): >diff --git a/virtinst/cli.py b/virtinst/cli.py >index c5b9b17..267b5f1 100644 >--- a/virtinst/cli.py >+++ b/virtinst/cli.py >@@ -30,6 +30,7 @@ import difflib > import tempfile > import optparse > import shlex >+import itertools > > import libvirt > >@@ -1476,7 +1477,10 @@ def parse_security(guest, security): > # --disk parsing # > ################## > >-def _parse_disk_source(guest, path, pool, vol, size, fmt, sparse): >+_CNTR = itertools.count() >+ >+def _parse_disk_source(guest, path, pool, vol, size, fmt, sparse, >+ counter=_CNTR): > abspath = None > volinst = None > volobj = None >@@ -1500,7 +1504,8 @@ def _parse_disk_source(guest, path, pool, vol, size, fmt, sparse): > vname = virtinst.Storage.StorageVolume.find_free_name(conn=guest.conn, > pool_name=pool, > name=guest.name, >- suffix=".img") >+ suffix=".img", >+ start_num=counter.next()) > volinst = vc(pool_name=pool, name=vname, conn=guest.conn, > allocation=0, capacity=(size and > size * 1024 * 1024 * 1024)) >-- >1.7.11.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 857424
: 612820