Bug 1016435 - virt-manager fails to start with OSError: [Errno 2] No such file or directory: '/root/.cache/virt-manager'
Summary: virt-manager fails to start with OSError: [Errno 2] No such file or directory...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 20
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1023425 1027744 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-08 07:47 UTC by Alexander Todorov
Modified: 2013-11-16 07:14 UTC (History)
8 users (show)

Fixed In Version: virt-manager-0.10.0-5.git1ffcc0cc.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-16 07:14:11 UTC


Attachments (Terms of Use)

Description Alexander Todorov 2013-10-08 07:47:09 UTC
Description of problem:

virt-manager fails to start over VNC when started from the console.

[root@ibm-ls22-01 ~]# virt-manager
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager", line 277, in <module>
    main()
  File "/usr/share/virt-manager/virt-manager", line 177, in main
    virtinstcli.setupLogging("virt-manager", options.debug, False, False)
  File "/usr/share/virt-manager/virtinst/cli.py", line 158, in setupLogging
    os.mkdir(vi_dir, 0751)
OSError: [Errno 2] No such file or directory: '/root/.cache/virt-manager'


Version-Release number of selected component (if applicable):
virt-manager-0.10.0-4.git79196cdf.fc20.noarch

How reproducible:
always

Steps to Reproduce:
1. Xvnc -SecurityTypes None :1 
2. export DISPLAY=:1
3. metacity &
4. virt-manager


Actual results:
Python traceback, fails to start

Expected results:
application starts


Additional info:
This is a regression from previous releases, I use this setup quite a lot and it works just fine.

Comment 1 Alexander Todorov 2013-10-08 07:55:19 UTC
Creating the directory manually works around this issue so far.

Comment 2 Dario Faggioli 2013-10-08 10:21:05 UTC
And I think I'm just ading that I see this when trying to run `virt-install' from console to.

I just ssh-ed to my host and did the following:

# virt-install --paravirt --name f20_64 --ram 2048 --vcpus 4 -f /dev/fedora_odyn/f20_64 --network bridge=virbr0 --location http://dl.fedoraproject.org/pub/alt/stage/20-Beta-TC1/Fedora/x86_64/os/ --graphics none

And that's what I see:

[Errno 2] No such file or directory: '/root/.cache/virt-manager'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-install", line 1073, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 1036, in main
    cli.setupLogging("virt-install", options.debug, options.quiet)
  File "/usr/share/virt-manager/virtinst/cli.py", line 158, in setupLogging
    os.mkdir(vi_dir, 0751)
OSError: [Errno 2] No such file or directory: '/root/.cache/virt-manager'

Comment 3 Dario Faggioli 2013-10-08 10:21:52 UTC
Oh, and I also confirm that `mkdir -p /root/.cache/virt-manager' does the trick here too.

Comment 4 Cole Robinson 2013-10-28 16:20:55 UTC
*** Bug 1023425 has been marked as a duplicate of this bug. ***

Comment 5 Dave Allan 2013-10-29 21:41:42 UTC
Seeing this on rawhide as well, virt-manager-0.10.0-4.git79196cdf.fc21.noarch

Comment 6 Giuseppe Scrivano 2013-10-31 17:47:41 UTC
XDG Base Directory Specification (Version 0.7) clearly states that if $XDG_CACHE_HOME is not defined, then a default equal to $HOME/.cache should be used to store user-specific data files.

I think virt-manager should create that directory if it doesn't already exist, in the same way as "mkdir -p $HOME/.cache/virt-manager" does.

Comment 7 Giuseppe Scrivano 2013-11-05 17:35:26 UTC
patch accepted upstream:

commit 5798c5b9b42732caf98876a6a708379190dd9c6b
Author: Giuseppe Scrivano <gscrivan@redhat.com>
Date:   Fri Nov 1 13:26:24 2013 +0100

    virt-manager: prefer os.makedirs to os.mkdir when creating cache dir
    
    Ensure the parent directories exist when attempting to create the
    cache directory.
    
    Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1016435
    
    Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Comment 8 Cole Robinson 2013-11-05 18:18:38 UTC
Since this can cause the app to fail to start if running as root, let's keep this open so users can track when a fixed update hits F20

Comment 9 Giuseppe Scrivano 2013-11-07 12:16:26 UTC
*** Bug 1027744 has been marked as a duplicate of this bug. ***

Comment 10 Fedora Update System 2013-11-10 17:10:15 UTC
virt-manager-0.10.0-5.git1ffcc0cc.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/virt-manager-0.10.0-5.git1ffcc0cc.fc20

Comment 11 Fedora Update System 2013-11-12 00:31:41 UTC
Package virt-manager-0.10.0-5.git1ffcc0cc.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing virt-manager-0.10.0-5.git1ffcc0cc.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-21095/virt-manager-0.10.0-5.git1ffcc0cc.fc20
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2013-11-16 07:14:11 UTC
virt-manager-0.10.0-5.git1ffcc0cc.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.