Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Can rkt be installed on Ubuntu Utopic? #1320

Closed
jaypipes opened this issue Aug 22, 2015 · 9 comments
Closed

Can rkt be installed on Ubuntu Utopic? #1320

jaypipes opened this issue Aug 22, 2015 · 9 comments

Comments

@jaypipes
Copy link

Hi!

I don't want to use virtualbox. I have a local Ubuntu Utopic machine and I tried installing and running the etcd ACI based on the getting started guide for Ubuntu Vivid (https://github.com/coreos/rkt/blob/master/Documentation/getting-started-ubuntu-vivid.md).

rkt installs OK, and its possible to grab the etcd ACI just fine. However, when I go to run the image with rkt, I get issues:

jaypipes@uberbox:~/rkt-v0.8.0$ sudo ./rkt run coreos.com/etcd:v2.0.9
rkt: searching for app image coreos.com/etcd:v2.0.9
rkt: found image in local store, skipping fetching from https://github.com/coreos/etcd/releases/download/v2.0.9/etcd-v2.0.9-linux-amd64.aci
2015/08/22 19:41:16 Preparing stage1
2015/08/22 19:41:16 Writing image manifest
2015/08/22 19:41:16 Loading image sha512-91e98d7f1679a097c878203c9659f2a26ae394656b3147963324c61fa3832f15
2015/08/22 19:41:16 Writing pod manifest
2015/08/22 19:41:16 Setting up stage1
2015/08/22 19:41:16 Wrote filesystem to /var/lib/rkt/pods/run/902887d9-0e7c-4946-94a9-c26667c861fe
2015/08/22 19:41:16 Pivoting to filesystem /var/lib/rkt/pods/run/902887d9-0e7c-4946-94a9-c26667c861fe
2015/08/22 19:41:16 Execing /init
Failed to read link /sys/fs/cgroup/blkio: No such file or directory

I went ahead and apt-get install'd libvirt-bin after a little bit of googling led me to think that cgroups were properly set up by installing libvirt-bin, but unfortunately, the problem persisted, though with a failure to read a different link:

jaypipes@uberbox:~/rkt-v0.8.0$ sudo ./rkt run coreos.com/etcd:v2.0.9
rkt: searching for app image coreos.com/etcd:v2.0.9
rkt: found image in local store, skipping fetching from https://github.com/coreos/etcd/releases/download/v2.0.9/etcd-v2.0.9-linux-amd64.aci
2015/08/22 19:44:07 Preparing stage1
2015/08/22 19:44:07 Writing image manifest
2015/08/22 19:44:07 Loading image sha512-91e98d7f1679a097c878203c9659f2a26ae394656b3147963324c61fa3832f15
2015/08/22 19:44:07 Writing pod manifest
2015/08/22 19:44:07 Setting up stage1
2015/08/22 19:44:07 Wrote filesystem to /var/lib/rkt/pods/run/0bac9301-395c-4a1c-8695-29a0fbbdad0a
2015/08/22 19:44:07 Pivoting to filesystem /var/lib/rkt/pods/run/0bac9301-395c-4a1c-8695-29a0fbbdad0a
2015/08/22 19:44:07 Execing /init
Failed to read link /sys/fs/cgroup/cpuacct: No such file or directory

Any ideas? Is it possible to run rkt and ACIs on Ubuntu Utopic?

Thanks much in advance!
-jay

@jaypipes
Copy link
Author

BTW, each time I run the sudo ./rkt run coreos.com/etrcd:v2.0.9 command, I will get a different failed read link. Sometimes it is /sys/fs/cgroup/cpuacct. Sometime it's /sys/fs/cgroup/memory, sometimes it's /sys/fs/cgroup/cpuset, etc...

@jaypipes
Copy link
Author

Also note that every failed rkt run command results in an entry in /var/lib/rkt/pods/run/:

jaypipes@uberbox:~/rkt-v0.8.0$ sudo ls -l /var/lib/rkt/pods/run
total 32
drwx------ 3 root root 4096 Aug 22 19:44 0bac9301-395c-4a1c-8695-29a0fbbdad0a
drwx------ 3 root root 4096 Aug 22 20:00 3ee3049c-4363-4ee1-97cf-700f3ac0a4b9
drwx------ 3 root root 4096 Aug 22 19:58 59e0f0c2-30a7-4ef5-8b7a-97cd1a34a4fa
drwx------ 3 root root 4096 Aug 22 19:41 902887d9-0e7c-4946-94a9-c26667c861fe
drwx------ 3 root root 4096 Aug 22 20:00 a341d39c-ddce-4325-9f8f-168d453e8ff0
drwx------ 3 root root 4096 Aug 22 20:00 c9f40535-b844-4c11-81c1-50137469a052
drwx------ 3 root root 4096 Aug 22 19:59 d317edd0-d068-4eb2-ae68-70d711aa6e48
drwx------ 3 root root 4096 Aug 22 19:40 d8a082eb-9c97-4899-a323-678668f7f87c

Is that intended?

@ppalucki
Copy link
Contributor

Maybe this somehow help to solve an issue. The error originates here systemd-nspawn

I've experience similar issues but related to missing "systemd cgroup hierarchy", which in ubuntu 14.04 LTS is provided by systemd-logind service (which was broken in my situation).

update: named "systemd" hierarchy is also provided by "cgmanager package"

IMO docs should explicitly inform about these requirements.

In your cause it looks like you don't have a docker installed, which mounts cgroup hierarchies (that is by default available on semaphore CI - that's why it passes functional tests check)

@ppalucki
Copy link
Contributor

related ones #1076 and #1313

@iaguis
Copy link
Member

iaguis commented Aug 27, 2015

I tried to run rkt in Ubuntu Utopic (14.10) and after installing the cgroupfs-mount package it worked fine.

@gdm85
Copy link

gdm85 commented Sep 5, 2015

Same issue here, but on Trusty (14.04.3 LTS). I tried the workaround specified in #1076:

mkdir /sys/fs/cgroup/systemd/user
echo $$ > /sys/fs/cgroup/systemd/user/cgroup.procs

Without any success. I am using rkt 0.8.0 and I do not have docker installed.

Edit: with the workaround in this comment I could fix it; what I do now is unmount and remount cgroups, and it seems to work.

@iaguis
Copy link
Member

iaguis commented Sep 16, 2015

Freshly installed Ubuntu Utopic:

iaguis@iaguis-VirtualBox:~/rkt-v0.8.1$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="14.10 (Utopic Unicorn)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.10"
VERSION_ID="14.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
iaguis@iaguis-VirtualBox:~/rkt-v0.8.1$ sudo ./rkt run --mds-register=false coreos.com/etcd:v2.0.9
rkt: searching for app image coreos.com/etcd:v2.0.9
prefix: "coreos.com/etcd"
key: "https://coreos.com/dist/pubkeys/aci-pubkeys.gpg"
gpg key fingerprint is: 8B86 DE38 890D DB72 9186  7B02 5210 BD88 8818 2190
    CoreOS ACI Builder <release@coreos.com>
Trusting "https://coreos.com/dist/pubkeys/aci-pubkeys.gpg" for prefix "coreos.com/etcd" without fingerprint review.
Added key for prefix "coreos.com/etcd" at "/etc/rkt/trustedkeys/prefix.d/coreos.com/etcd/8b86de38890ddb7291867b025210bd8888182190"
Downloading signature from https://github.com/coreos/etcd/releases/download/v2.0.9/etcd-v2.0.9-linux-amd64.aci.asc
Downloading signature: [=======================================] 819 B/819 B
Downloading ACI: [=============================================] 3.79 MB/3.79 MB
rkt: signature verified:
  CoreOS ACI Builder <release@coreos.com>
2015/09/16 14:53:07 Preparing stage1
2015/09/16 14:53:18 Writing image manifest
2015/09/16 14:53:19 Loading image sha512-91e98d7f1679a097c878203c9659f2a26ae394656b3147963324c61fa3832f15
2015/09/16 14:53:19 Writing pod manifest
2015/09/16 14:53:19 Setting up stage1
2015/09/16 14:53:19 Wrote filesystem to /var/lib/rkt/pods/run/3c0b2368-7130-42a6-8105-1a891682165e
2015/09/16 14:53:19 Pivoting to filesystem /var/lib/rkt/pods/run/3c0b2368-7130-42a6-8105-1a891682165e
2015/09/16 14:53:19 Execing /init
Failed to read link /sys/fs/cgroup/memory: No such file or directory

Now I install cgroup-lite:

iaguis@iaguis-VirtualBox:~$ sudo apt-get install cgroup-lite
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  cgroup-lite
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 4.100 B of archives.
After this operation, 58,4 kB of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu/ utopic/universe cgroup-lite all 1.10 [4.100 B]
Fetched 4.100 B in 0s (44,0 kB/s)
Selecting previously unselected package cgroup-lite.
(Reading database ... 198043 files and directories currently installed.)
Preparing to unpack .../cgroup-lite_1.10_all.deb ...
Unpacking cgroup-lite (1.10) ...
Processing triggers for ureadahead (0.100.0-16) ...

And try again:

iaguis@iaguis-VirtualBox:~/rkt-v0.8.1$ sudo ./rkt run --mds-register=false coreos.com/etcd:v2.0.9
rkt: searching for app image coreos.com/etcd:v2.0.9
rkt: found image in local store, skipping fetching from https://github.com/coreos/etcd/releases/download/v2.0.9/etcd-v2.0.9-linux-amd64.aci
2015/09/16 14:58:47 Preparing stage1
2015/09/16 14:58:48 Writing image manifest
2015/09/16 14:58:48 Loading image sha512-91e98d7f1679a097c878203c9659f2a26ae394656b3147963324c61fa3832f15
2015/09/16 14:58:49 Writing pod manifest
2015/09/16 14:58:49 Setting up stage1
2015/09/16 14:58:49 Wrote filesystem to /var/lib/rkt/pods/run/5ae55435-fc35-4f1d-b15a-89073884f080
2015/09/16 14:58:49 Pivoting to filesystem /var/lib/rkt/pods/run/5ae55435-fc35-4f1d-b15a-89073884f080
2015/09/16 14:58:49 Execing /init
[  642.833522] etcd[4]: 2015/09/16 12:58:49 etcd: no data-dir provided, using default data-dir ./default.etcd
[  642.834462] etcd[4]: 2015/09/16 12:58:49 etcd: listening for peers on http://localhost:2380
[  642.835015] etcd[4]: 2015/09/16 12:58:49 etcd: listening for peers on http://localhost:7001
[  642.835725] etcd[4]: 2015/09/16 12:58:49 etcd: listening for client requests on http://localhost:2379
[  642.836425] etcd[4]: 2015/09/16 12:58:49 etcd: listening for client requests on http://localhost:4001
[  642.837704] etcd[4]: 2015/09/16 12:58:49 etcdserver: datadir is valid for the 2.0.1 format
[  642.838270] etcd[4]: 2015/09/16 12:58:49 etcdserver: name = default
[  642.839372] etcd[4]: 2015/09/16 12:58:49 etcdserver: data dir = default.etcd
[  642.839950] etcd[4]: 2015/09/16 12:58:49 etcdserver: member dir = default.etcd/member
[  642.840576] etcd[4]: 2015/09/16 12:58:49 etcdserver: heartbeat = 100ms
[  642.841187] etcd[4]: 2015/09/16 12:58:49 etcdserver: election = 1000ms
[  642.841716] etcd[4]: 2015/09/16 12:58:49 etcdserver: snapshot count = 10000
[  642.842515] etcd[4]: 2015/09/16 12:58:49 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001
[  642.847474] etcd[4]: 2015/09/16 12:58:49 etcdserver: initial advertise peer URLs = http://localhost:2380,http://localhost:7001
[  642.864863] etcd[4]: 2015/09/16 12:58:49 etcdserver: initial cluster = default=http://localhost:2380,default=http://localhost:7001
[  642.870187] etcd[4]: 2015/09/16 12:58:49 etcdserver: start member ce2a822cea30bfca in cluster 7e27652122e8b2ae
[  642.879796] etcd[4]: 2015/09/16 12:58:49 raft: ce2a822cea30bfca became follower at term 0
[  642.888922] etcd[4]: 2015/09/16 12:58:49 raft: newRaft ce2a822cea30bfca [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
[  642.889552] etcd[4]: 2015/09/16 12:58:49 raft: ce2a822cea30bfca became follower at term 1
[  642.894250] etcd[4]: 2015/09/16 12:58:49 etcdserver: added local member ce2a822cea30bfca [http://localhost:2380 http://localhost:7001] to cluster 7e27652122e8b2ae
[  644.148716] etcd[4]: 2015/09/16 12:58:51 raft: ce2a822cea30bfca is starting a new election at term 1
[  644.149347] etcd[4]: 2015/09/16 12:58:51 raft: ce2a822cea30bfca became candidate at term 2
[  644.150871] etcd[4]: 2015/09/16 12:58:51 raft: ce2a822cea30bfca received vote from ce2a822cea30bfca at term 2
[  644.151713] etcd[4]: 2015/09/16 12:58:51 raft: ce2a822cea30bfca became leader at term 2
[  644.161509] etcd[4]: 2015/09/16 12:58:51 raft.node: ce2a822cea30bfca elected leader ce2a822cea30bfca at term 2
[  644.171451] etcd[4]: 2015/09/16 12:58:51 etcdserver: published {Name:default ClientURLs:[http://localhost:2379 http://localhost:4001]} to cluster 7e27652122e8b2ae

Should we add a special section in the documentation telling the user to install that package?

@ppalucki
Copy link
Contributor

@iaguis +1 for docs and deb package maintainer should also know about this cgroup-lite dependency, linking #1307

@jonboulle
Copy link
Contributor

Documentation would be great, please!

On Wed, Sep 16, 2015 at 8:02 AM, Pawel Palucki notifications@github.com
wrote:

@iaguis https://github.com/iaguis +1 for docs and deb package
maintainer should also know about this cgroup-lite dependency, linking
#1307 #1307


Reply to this email directly or view it on GitHub
#1320 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants