FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 06-29-2011, 02:28 PM
Ales Kozumplik
 
Default Pulsing progress bar instead of the static popup during device discovery.

On machines with hundreds of devices Anaconda looks dead during device
discovery. Having a proper progress bar would be cooler but we don't know
how many devices will be there altogether.

Resolves: rhbz#616641
---
storage/__init__.py | 9 +++++----
storage/devicetree.py | 5 ++++-
2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 007f029..d9c89fe 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -403,8 +403,9 @@ class Storage(object):
if device.format.type == "luks" and device.format.exists:
self.__luksDevs[device.format.uuid] = device.format._LUKS__passphrase

- w = self.anaconda.intf.waitWindow(_("Examining Devices"),
- _("Examining storage devices"))
+ prog = self.anaconda.intf.progressWindow(_("Examining Devices"),
+ _("Examining storage devices"),
+ 100, 0.03, pulse=True)
self.iscsi.startup(self.anaconda.intf)
self.fcoe.startup(self.anaconda.intf)
self.zfcp.startup(self.anaconda.intf)
@@ -427,13 +428,13 @@ class Storage(object):
iscsi=self.iscsi,
dasd=self.dasd,
mpathFriendlyNames=self.mpathFriendlyNames)
- self.devicetree.populate()
+ self.devicetree.populate(prog)
self.fsset = FSSet(self.devicetree, self.anaconda.rootPath)
self.eddDict = get_edd_dict(self.partitioned)
self.anaconda.id.rootParts = None
self.anaconda.id.upgradeRoot = None
self.dumpState("initial")
- w.pop()
+ prog.pop()

@property
def devices(self):
diff --git a/storage/devicetree.py b/storage/devicetree.py
index b419026..0dc657f 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -2034,7 +2034,7 @@ class DeviceTree(object):

return ret

- def populate(self):
+ def populate(self, progressWindow):
""" Locate all storage devices. """
log.debug("DeviceTree.populate: ignoredDisks is %s ; exclusiveDisks is %s"
% (self._ignoredDisks, self.exclusiveDisks))
@@ -2074,6 +2074,7 @@ class DeviceTree(object):
log.info("devices to scan: %s" % [d['name'] for d in devices])
for dev in devices:
self.addUdevDevice(dev)
+ progressWindow.pulse()

# Having found all the disks, we can now find all the multipaths built
# upon them.
@@ -2095,6 +2096,7 @@ class DeviceTree(object):
self.__multipathConfigWriter.addMultipathDevice(mp )
self._addDevice(mp)
self.addUdevDevice(mp_info)
+ progressWindow.pulse()
for d in self.devices:
if not d.name in whitelist:
self.__multipathConfigWriter.addBlacklistDevice(d)
@@ -2126,6 +2128,7 @@ class DeviceTree(object):
log.info("devices to scan: %s" % [d['name'] for d in devices])
for dev in devices:
self.addUdevDevice(dev)
+ progressWindow.pulse()

self.populated = True

--
1.7.5.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-29-2011, 05:08 PM
Chris Lumens
 
Default Pulsing progress bar instead of the static popup during device discovery.

> On machines with hundreds of devices Anaconda looks dead during device
> discovery. Having a proper progress bar would be cooler but we don't know
> how many devices will be there altogether.

How much does the progress indicator bounce back and forth? Is it
really crazy, or fairly controlled?

> diff --git a/storage/devicetree.py b/storage/devicetree.py
> index b419026..0dc657f 100644
> --- a/storage/devicetree.py
> +++ b/storage/devicetree.py
> @@ -2034,7 +2034,7 @@ class DeviceTree(object):
>
> return ret
>
> - def populate(self):
> + def populate(self, progressWindow):
> """ Locate all storage devices. """
> log.debug("DeviceTree.populate: ignoredDisks is %s ; exclusiveDisks is %s"
> % (self._ignoredDisks, self.exclusiveDisks))

For master, I suggest making progressWindow=None the default and
adapting the rest of the patch to that. Remember that we can import
storage as a library elsewhere, and we won't always want to pass in an
interface component. I'm thinking of anaconda-cleanup and the storage
test code here.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-30-2011, 06:59 AM
Ales Kozumplik
 
Default Pulsing progress bar instead of the static popup during device discovery.

On machines with hundreds of devices Anaconda looks dead during device
discovery. Having a proper progress bar would be cooler but we don't know
how many devices will be there altogether.

Resolves: rhbz#616641
---
storage/__init__.py | 9 +++++----
storage/devicetree.py | 8 +++++++-
2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 007f029..d9c89fe 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -403,8 +403,9 @@ class Storage(object):
if device.format.type == "luks" and device.format.exists:
self.__luksDevs[device.format.uuid] = device.format._LUKS__passphrase

- w = self.anaconda.intf.waitWindow(_("Examining Devices"),
- _("Examining storage devices"))
+ prog = self.anaconda.intf.progressWindow(_("Examining Devices"),
+ _("Examining storage devices"),
+ 100, 0.03, pulse=True)
self.iscsi.startup(self.anaconda.intf)
self.fcoe.startup(self.anaconda.intf)
self.zfcp.startup(self.anaconda.intf)
@@ -427,13 +428,13 @@ class Storage(object):
iscsi=self.iscsi,
dasd=self.dasd,
mpathFriendlyNames=self.mpathFriendlyNames)
- self.devicetree.populate()
+ self.devicetree.populate(prog)
self.fsset = FSSet(self.devicetree, self.anaconda.rootPath)
self.eddDict = get_edd_dict(self.partitioned)
self.anaconda.id.rootParts = None
self.anaconda.id.upgradeRoot = None
self.dumpState("initial")
- w.pop()
+ prog.pop()

@property
def devices(self):
diff --git a/storage/devicetree.py b/storage/devicetree.py
index b419026..e9ff36a 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -2034,7 +2034,7 @@ class DeviceTree(object):

return ret

- def populate(self):
+ def populate(self, progressWindow=None):
""" Locate all storage devices. """
log.debug("DeviceTree.populate: ignoredDisks is %s ; exclusiveDisks is %s"
% (self._ignoredDisks, self.exclusiveDisks))
@@ -2074,6 +2074,8 @@ class DeviceTree(object):
log.info("devices to scan: %s" % [d['name'] for d in devices])
for dev in devices:
self.addUdevDevice(dev)
+ if progressWindow:
+ progressWindow.pulse()

# Having found all the disks, we can now find all the multipaths built
# upon them.
@@ -2095,6 +2097,8 @@ class DeviceTree(object):
self.__multipathConfigWriter.addMultipathDevice(mp )
self._addDevice(mp)
self.addUdevDevice(mp_info)
+ if progressWindow:
+ progressWindow.pulse()
for d in self.devices:
if not d.name in whitelist:
self.__multipathConfigWriter.addBlacklistDevice(d)
@@ -2126,6 +2130,8 @@ class DeviceTree(object):
log.info("devices to scan: %s" % [d['name'] for d in devices])
for dev in devices:
self.addUdevDevice(dev)
+ if progressWindow:
+ progressWindow.pulse()

self.populated = True

--
1.7.5.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-30-2011, 07:34 AM
Ales Kozumplik
 
Default Pulsing progress bar instead of the static popup during device discovery.

On 06/29/2011 07:08 PM, Chris Lumens wrote:

On machines with hundreds of devices Anaconda looks dead during device
discovery. Having a proper progress bar would be cooler but we don't know
how many devices will be there altogether.


How much does the progress indicator bounce back and forth? Is it
really crazy, or fairly controlled?


You can say it's controlled. On a Dell server it is pretty smooth, on
virt it is jumping a bit in the beginning.




For master, I suggest making progressWindow=None the default and
adapting the rest of the patch to that. Remember that we can import
storage as a library elsewhere, and we won't always want to pass in an
interface component. I'm thinking of anaconda-cleanup and the storage
test code here.


This is interesting point and and I agree. It is also related to the
discussion there was last night on IRC about having to pass around the
anaconda instance, though I wouldn't like to sound like I am suggesting
the same solution there. I tried to address the interface problem in my
multithreading UI experiments [1] and the best approach seemed to be
having a singleton object ('status', because I like to think of it as
something the control code announces, like a twitter message, without
caring whether someone consumes it) that is always obtainable via a
method. The storage code talks to this object as 'indicate progress' or
'display a warning', and does not really care if and when the UI carries
those requests out. The status object doesn't need to be passed around
at all, the methods that like to present something to the UI can request
it at any time. Before any InstallInterface object is instantiated
status silently ignores all the requests. Once the interface exists, the
status object is updated and starts processing those requests properly
(in the multithreading case that also meant asynchronously in general).
The benefits are no more passing the interface around and checking it
against None.


One issue remains: sometimes you need to hear back from the UI, like
'reinitialize disk vda?'. By default I think this situation should raise
an exception if proper interface does not exist yet for the behavior is
undefined. In tests this is easy to workaround by supplying a mock object.


Ales


[1] https://github.com/akozumpl/anaconda/commits/multi

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-30-2011, 02:20 PM
Chris Lumens
 
Default Pulsing progress bar instead of the static popup during device discovery.

> On machines with hundreds of devices Anaconda looks dead during device
> discovery. Having a proper progress bar would be cooler but we don't know
> how many devices will be there altogether.

Looks good.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org