Clear out the guests list properly using jQuery

Clear out the guests list properlt using jQuery empty().
Setting the html to '' as previous can result in browser memory leaks.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
bug fix: Properly display missing parameter

The exception instance was being used as the missing parameter what is
causing errors like below:

TypeError: coercing to Unicode: need string or buffer, exceptions.KeyError found

To fix use the string representation for the exception instance.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Packaging: removed start of kimchid from RPM and DEB files

It's not a good practice to start services automatically in the end of RPM
or DEB installation. So, this patch is removing any reference to start the
kimchid service automatically.

Tested on Fedora 19 and RHEL 6.5.

Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com>
Github bug #327: NFS pool workaround: i18n changes

Adding the warning/status messages used by the workaround

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Github bug #327: NFS pool workaround: timeout adjustments

Adding a smaller timeout in the 'prepare()' method of
libvirtstoragepool ('mount' and 'umount' commands).

Fixing an error in utils/run_command() that prevented the
TimeoutExpired exception to be raised sometimes.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Github bug #327: NFS pool workaround: model changes

Implementing a workaround in '_get_storagepool_vols_num',
'lookup', 'activate' and 'deactivate' methods to avoid
libvirt calls in NFS pools when the corresponding NFS server
is unreachable.

In the 'lookup' method the state of the pool returned in
such scenario is 'inaccessible' to warn the UI that the pool
isn't available for normal operation.

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
issue #325: Use RamSession instead of FileSession

There is a readers/writes problem in cherry.sessions.FileSession
implementation which makes it non thread safe.

From https://groups.google.com/forum/#!topic/cherrypy-users/biitlom41T8
"When the session tool is turned on it hooks the lib.session.save
function onto 'before_finalize' so that the session data is always
re-saved at the end of each request.  For RamSession this is fine
because save just overwrites a dictionary value.  FileSession uses
pickle.dump to write the session data to file and uses pickle.load to
load it. If two requests overlap in just the wrong way then it's
possible that pickle.load gets called halfway through the pickle.dump
which throws an EOFError. More concurrent requests will increase the
chance of this happening."

For reference: http://www.stderr.org/doc/cherrypy-doc/html/howto/node17.html

On Host tab, more concurrent requests happen, specially while creating a
debug report: /host/stats and /tasks/<id>. Because that the problem was
identified there.

To solve this issue, there are 2 options:
1) overwrite cherrypy.session.FileSession._load to fix the
readers/writers and make it thread safe;
or
2) Use RamSession instead of FileSession

As using RamSession makes the application faster because it will not need to
read/write file for each request, this is the best solution in this case.

This patch also uses acquire_lock() and release_lock() for each
read/write session data occurrence.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Fix screenshot and debugrepots path issue.