unity8-lxc-setup crashed with FileNotFoundError in __main__: [Errno 2] No such file or directory: '/var/lib/lxc/unity8-lxc/rootfs/etc/hostname'

Bug #1418671 reported by Bryan Quigley
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Unity8 Desktop Preview in LXC
Fix Released
High
Christopher Townsend
unity8-lxc (Ubuntu)
Fix Released
High
Christopher Townsend

Bug Description

I just did:
sudo apt-add-repository ppa:unity8-desktop-session-team/unity8-preview-lxc
sudo apt-get update
sudo apt-get upgrade (nothing to do)
sudo apt-get install unity8-lxc

$ sudo unity8-lxc-setup
#################### 100.0% 364.5 kBps DONE

open: No such file or directory
not using seed file /var/lib/lxc/unity8-lxc/ubuntu-next.iso
Read /var/lib/lxc/unity8-lxc/ubuntu-next.iso. Target 0.0% complete.
No relevent local data found - I will be downloading the whole file. If that's not what you want, CTRL-C out. You should specify the local file is the old version of the file to download with -i (you might have to decompress it with gzip -d first). Or perhaps you just have no data that helps download the file
rename: Invalid cross-device link
rename: Invalid cross-device link
mount: /var/lib/lxc/unity8-lxc/ubuntu-next.iso: failed to setup loop device: No such file or directory
mount: /var/lib/lxc/unity8-lxc/iso/casper/filesystem.squashfs: failed to setup loop device: No such file or directory
Unpacking the ISO image...
umount: /var/lib/lxc/unity8-lxc/squashfs: not mounted
umount: /var/lib/lxc/unity8-lxc/iso: not mounted
Configuring the Unity8 LXC...
Traceback (most recent call last):
  File "/usr/bin/unity8-lxc-setup", line 227, in <module>
    with open(os.path.join(rootfs_path, "etc", "hostname"), "w+") as fd:
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/lxc/unity8-lxc/rootfs/etc/hostname'

Will delete and retry...

ProblemType: Crash
DistroRelease: Ubuntu 15.04
Package: unity8-lxc 1.0.2+15.04.20141217-0ubuntu1
ProcVersionSignature: Ubuntu 3.18.0-12.13-generic 3.18.4
Uname: Linux 3.18.0-12-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.15.1-0ubuntu4
Architecture: amd64
Date: Thu Feb 5 12:50:55 2015
ExecutablePath: /usr/bin/unity8-lxc-setup
InstallationDate: Installed on 2015-01-08 (27 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150108)
InterpreterPath: /usr/bin/python3.4
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/unity8-lxc-setup
PythonArgs: ['/usr/bin/unity8-lxc-setup']
SourcePackage: unity8-lxc
Title: unity8-lxc-setup crashed with FileNotFoundError in __main__: [Errno 2] No such file or directory: '/var/lib/lxc/unity8-lxc/rootfs/etc/hostname'
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/unity8-lxc-setup", line 227, in <module>
     with open(os.path.join(rootfs_path, "etc", "hostname"), "w+") as fd:
 FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/lxc/unity8-lxc/rootfs/etc/hostname'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
Bryan Quigley (bryanquigley) wrote :
tags: removed: need-duplicate-check
Changed in unity8-lxc (Ubuntu):
importance: Undecided → Medium
information type: Private → Public
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

https://bugs.launchpad.net/ubuntu/+source/testdrive/+bug/680138 Seems like it worked around a similar issue.
I have everything relevant to this command on the same btrfs filesystem.

I can reproduce with just:
zsync -i /var/lib/lxc/unity8-lxc/ubuntu-next.iso -o /var/lib/lxc/unity8-lxc/ubuntu-next.iso http://cdimage.ubuntu.com/ubuntu-desktop-next/daily-live/current/vivid-desktop-amd64.iso.zsync

Revision history for this message
Niklas Wenzel (nikwen) wrote :

I'm having this as well on utopic.

Changed in unity8-lxc (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel Kessel (dkessel) wrote :

Makes it impossible to setup the package on a current vivid daily system.

Revision history for this message
Christopher Townsend (townsend) wrote :

Thanks for reporting this bug! It seems like some issue in zsync, but I could definitely handle the error better and also implement the workaround as noted in bug #680138.

I'll work on getting a new build in the PPA soon.

Changed in unity8-lxc (Ubuntu):
importance: Medium → High
assignee: nobody → Christopher Townsend (townsend)
Changed in unity8-lxc (Ubuntu):
status: Confirmed → In Progress
Changed in unity8-preview-lxc:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Christopher Townsend (townsend)
milestone: none → 1.0.3
Revision history for this message
Christopher Townsend (townsend) wrote :

I've started a new build in the PPA with what I hope fixes this issue. Since I cannot reproduce the issue, I'm basing the change on the aforementioned bug.

Could anyone affected by this please try the updated package and let me know if it fixes it for you?

Thanks!

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Thank you very much for working on this. :)

This is what I got now:

nikwen@nikwen:~$ sudo unity8-lxc-setup --destroy
nikwen@nikwen:~$ sudo unity8-lxc-setup
#################### 100.0% 316.0 kBps DONE

open: No such file or directory
not using seed file /var/lib/lxc/unity8-lxc/ubuntu-next.iso
Read /var/lib/lxc/unity8-lxc/ubuntu-next.iso. Target 0.0% complete.
No relevent local data found - I will be downloading the whole file. If that's not what you want, CTRL-C out. You should specify the local file is the old version of the file to download with -i (you might have to decompress it with gzip -d first). Or perhaps you just have no data that helps download the file
downloading from http://cdimage.ubuntu.com/ubuntu-desktop-next/daily-live/current/vivid-desktop-amd64.iso:
-------------------- 2.5% 475.2 kBps 36:08 ETA

I then aborted because I'll do the download at some other point in the future.
At least the part where it was crashing before seems to have been fixed now. :)

Revision history for this message
Christopher Townsend (townsend) wrote :

Hi Niklas,

Thanks for confirming:)

Revision history for this message
Agmenor (agmenor) wrote : Re: [Bug 1418671] Re: unity8-lxc-setup crashed with FileNotFoundError in __main__: [Errno 2] No such file or directory: '/var/lib/lxc/unity8-lxc/rootfs/etc/hostname'

Hello!

`sudo unity8-lxc-setup` is now working for me too. I tried it until the
end of the download and the setup.
However, like before, launching the session from lightdm still doesn't
work. I reported it at
https://bugs.launchpad.net/unity8-preview-lxc/+bug/1420518.

Keep up the good work,
Agmenor

On 02/10/2015 08:53 PM, Niklas Wenzel wrote:
> Thank you very much for working on this. :)
>
> This is what I got now:
>
> nikwen@nikwen:~$ sudo unity8-lxc-setup --destroy
> nikwen@nikwen:~$ sudo unity8-lxc-setup
> #################### 100.0% 316.0 kBps DONE
>
> open: No such file or directory
> not using seed file /var/lib/lxc/unity8-lxc/ubuntu-next.iso
> Read /var/lib/lxc/unity8-lxc/ubuntu-next.iso. Target 0.0% complete.
> No relevent local data found - I will be downloading the whole file. If that's not what you want, CTRL-C out. You should specify the local file is the old version of the file to download with -i (you might have to decompress it with gzip -d first). Or perhaps you just have no data that helps download the file
> downloading from http://cdimage.ubuntu.com/ubuntu-desktop-next/daily-live/current/vivid-desktop-amd64.iso:
> -------------------- 2.5% 475.2 kBps 36:08 ETA
>
> I then aborted because I'll do the download at some other point in the future.
> At least the part where it was crashing before seems to have been fixed now. :)
>

Revision history for this message
vasilisc (vasilisc) wrote :

me help this:
1) root console
sudo -i
2) exec command without sudo
unity8-lxc-setup

Revision history for this message
Daniel Kessel (dkessel) wrote :

I can confirm that vasilisc's workaround works with the current package in vivid.

However - afterwards, I experienced bug 1425199 when trying to log into the session, which also stops me from using the Unity8 session at all.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8-lxc - 1.0.3+15.04.20150305.1-0ubuntu1

---------------
unity8-lxc (1.0.3+15.04.20150305.1-0ubuntu1) vivid; urgency=medium

  [ Chris Townsend ]
  * Bump version to 1.0.3.
  * Add an lxc-wait after lxc-start to make sure the container is
    actually running before proceeding to the lxc-attach. Also, have to
    add an additional half second sleep to account for an lxc race where
    lxc-wait reports the container is running when in reality, it may
    not be. (LP: #1425663)
  * Add config entry to automount sys to work around a new LXC behavior
    in 15.04 and later. (LP: #1420468)
  * Disable the new autodev feature in LXC as it only creates a minimal
    /dev in the container and we need a full /dev. (LP: #1425684)
  * Do not include the default lxc network config as using the
    'flags=up' from it confuses NetworkManager inside the container.
    (LP: #1427743)
  * Fix issue where zsync doesn't seem to handle cross linking across
    filesystems and also detect if the ISO did not download and throw an
    error. (LP: #1418671)

  [ CI Train Bot ]
  * New rebuild forced.
 -- CI Train Bot <email address hidden> Thu, 05 Mar 2015 14:48:22 +0000

Changed in unity8-lxc (Ubuntu):
status: In Progress → Fix Released
Changed in unity8-preview-lxc:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.