Wednesday, 2019-07-31

*** sameo has joined #kata-dev05:20
*** sameo has quit IRC06:03
kata-irc-bot<alessandro.randazzo> Hi All, I run the command 'sudo ./rootfs.sh alpine', but it terminates at row 313 saying: ''go command not found". That's weird cause I manually run the line code of the script 'go version | sed -E "s/^.+([0-9]+\.[0-9]+\.[0-9]+).*$/\1/g' and I get 1.12.7 as expected . Any hint?06:24
*** sameo has joined #kata-dev06:30
kata-irc-bot<greg.bock> PATH might be different, what if you use full path to go binary?06:32
kata-irc-bot<greg.bock> and are you root when you manually run the command?06:33
kata-irc-bot<greg.bock> (again pointing to a possible env/path issue)06:33
kata-irc-bot<alessandro.randazzo> I'm not root when I manually type 'go version' command and i get : go version go1.12.7 linux/amd6406:35
kata-irc-bot<alessandro.randazzo> I'm going to check my .profile06:35
kata-irc-bot<greg.bock> `which go`06:35
kata-irc-bot<alessandro.randazzo> '/usr/local/go/bin/go'06:36
kata-irc-bot<greg.bock> echo $PATH06:36
kata-irc-bot<greg.bock> and sudo echo $PATH06:36
kata-irc-bot<alessandro.randazzo> 'echo $PATH' : result---> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/alex/goprojects/bin06:37
kata-irc-bot<alessandro.randazzo> 'sudo echo $PATH': result --> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/alex/goprojects/bin06:38
kata-irc-bot<alessandro.randazzo> they are equals06:38
kata-irc-bot<greg.bock> does rootfs.sh redefine path ?06:40
kata-irc-bot<alessandro.randazzo> I don't know, it is not my own script ...is that from the repository06:42
*** jodh has joined #kata-dev07:25
*** sgarzare has joined #kata-dev07:27
*** pcaruana has quit IRC07:35
*** igordc has joined #kata-dev07:37
*** igordc has quit IRC07:38
*** gwhaley has joined #kata-dev07:41
kata-irc-bot<graham.whaley> @alessandro.randazzo @greg.bock - yeah, you probably want to pass the user PATH through to the sudo - we do this a lot throughout the scripts in kata: `sudo -E PATH=$PATH make` for instance etc...07:45
kata-irc-bot<graham.whaley> that, or you have to set root's PATH up to have your go in it.07:45
*** davidgiluk has joined #kata-dev08:03
*** lpetrut has joined #kata-dev08:04
kata-irc-bot<alessandro.randazzo> @graham.whaley , I run now: 'sudo -E PATH=$PATH ./rootfs.sh alpine' and something has changed ....below the new message : /home/alex/goprojects/src/github.com/kata-containers/osbuilder/rootfs-builder/alpine/rootfs_lib.sh: line 36: /sbin/apk.static: No such file or directory08:11
*** pcaruana has joined #kata-dev08:13
kata-irc-bot<graham.whaley> @alessandro.randazzo -ooh, 'apk' afaik is the Alpine package manager - so, that problem looks more Alpine specific and not so much rootfs.sh specific.... I'll have to defer to somebody else (maybe @jose.carlos.venegas.m) for that..08:14
kata-irc-bot<alessandro.randazzo> I don't think that I manually should install 'apk-tools-static' tools...08:51
kata-irc-bot<graham.whaley> @alessandro.randazzo - not on your host, no. I suspect something maybe has changed with the Alpine image/container that rootfs.sh is using. Are you using 'DOCKER=true' with the rootfs script? If you have docker installed, and you set DOCKER=true, then the rootfs script will use a docker container to do the build, which should then contain all the parts needed to do the build (and isolated from your host ;) )09:18
kata-irc-bot<alessandro.randazzo> I'm trying to install kata-runtime as standalone (no orchestrator ). So, I installed the kernel so far and I'm trying to build a rootfs image and I got that message...09:24
kata-irc-bot<graham.whaley> @alessandro.randazzo - sure - you can use docker to build the rootfs, but not integrate kata into docker. Just giving it as an option, that if you have docker installed on the machine you are building the rootfs on (or any other machine....), then you can do the rootfs build using a docker container, which contains all the pre-reqs required for the builds, so means you would not have to install any further tools etc. on your (build09:40
kata-irc-botmachine) host.09:40
kata-irc-bot<alessandro.randazzo> ok, so Do I need to go back and install docker and then installing rootfs with DOCKER=true option?09:43
kata-irc-bot<graham.whaley> you don't need to undo anything. Install docker on the machine where you want to build the rootfs, and then add the 'DOCKER=true' option to use docker to do the build. I know, installing docker additionally is a pain - but, I think either you install docker *or* install all the tools needed to do the rootfs build on the machine where you are building the rootfs.09:46
kata-irc-bot<alessandro.randazzo> since my final goal is to run some tests to compare runc and kata-runtime, I would like to avoid installing Docker. What are the other tools that I need to install in my host machine? apk-tools-static, for example?09:52
kata-irc-bot<graham.whaley> @alessandro.randazzo - probably all the things listed over in the Alpine rootfs subdir - maybe the list in the dockerfile: https://github.com/kata-containers/osbuilder/tree/master/rootfs-builder/alpine - but, tbh, I'm not even sure if you can (easily) build an Alpine rootfs on a non-alpine system - we need input from @jose.carlos.venegas.m and maybe @mvedovati knows?10:15
kata-irc-bot<mvedovati> @alessandro.randazzo, AFAIK building outside of a container works only if the host and target OS are the same10:18
kata-irc-bot<mvedovati> However if you want to try, just check what `rootfs-builder/alpine/rootfs_lib.sh` is doing and try to install the missing components on your system10:19
kata-irc-bot<mvedovati> (btw, the correct make variable for Docker build is `USE_DOCKER=true`)10:20
kata-irc-bot<mvedovati> or, you could just use runc to start a alpine container and build an alpine image from there ;)10:21
*** lpetrut has quit IRC10:24
*** pcaruana has quit IRC10:45
*** gwhaley has quit IRC11:05
*** gwhaley has joined #kata-dev11:59
*** pcaruana has joined #kata-dev12:10
*** noahm has quit IRC12:18
*** noahm has joined #kata-dev12:29
*** fuentess has joined #kata-dev12:44
*** lpetrut has joined #kata-dev12:50
*** lpetrut has quit IRC12:59
*** lpetrut has joined #kata-dev12:59
*** devimc has joined #kata-dev13:11
kata-irc-bot<alessandro.randazzo> @mvedovati I just checked the rootfs_lib.sh...is a very short script that stops at the row where trays to find '/sbin/apk.static' ...below the remaining part of the script : # Populate ROOTFS_DIR 'check_root mkdir -p "${ROOTFS_DIR}"  /sbin/apk.static \     -X ${MIRROR}/${OS_VERSION}/main \     -U \     --allow-untrusted \     --root ${ROOTFS_DIR}\     --initdb add ${BASE_PACKAGES} ${EXTRA_PKGS} ${PACKAGES}  mkdir -p14:41
kata-irc-bot${ROOTFS_DIR}{/root,/etc/apk,/proc} echo "${MIRROR}/${OS_VERSION}/main" >  ${ROOTFS_DIR}/etc/apk/repositories }'14:41
kata-irc-bot<mvedovati> ok, so you may just edit the script to point it to your local copy of `apk.static`14:45
kata-irc-bot<mvedovati> or add a symlink in `/sbin`14:45
kata-irc-bot<alessandro.randazzo> are you saying that if I try installing Ubuntu, since my host is based on Lubuntu it should be ok without any issue14:47
kata-irc-bot<alessandro.randazzo> @mvedovati , Does this happen because I haven't installed 'apk-tools-static' on my host? there is no 'apk.static' in '/sbin/'14:56
kata-irc-bot<graham.whaley> an idea @jose.carlos.venegas.m @mvedovati - so, if we are fairly certain you cannot build a rootfs image on a different host, will it be fairly easy to add an early check that has a look to see if your host and target rootfs match distros - and at least give a heavy warning or a turn-off-able error if they do not match ??14:59
kata-irc-bot<jose.carlos.venegas.m> @alessandro.randazzo It may work but never tried, I tried for centos from fedora host15:03
kata-irc-bot<mvedovati> @alessandro.randazzo, correct, you need the tool on your host15:04
kata-irc-bot<mvedovati> You can get it from: http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/apk-tools-static-2.10.4-r2.apk15:04
kata-irc-bot<jose.carlos.venegas.m> @graham.whaley yeah a warning may be good15:05
kata-irc-bot<mvedovati> @graham.whaley, @jose.carlos.venegas.m agree on the warning15:05
kata-irc-bot<mvedovati> that's something not "officially" supported15:05
kata-irc-bot<alessandro.randazzo> Yes, it'd be a good idea to insert a warning....anyway I'm going to install apk-tools :slightly_smiling_face: on my host15:07
kata-irc-bot<jose.carlos.venegas.m> @alessandro.randazzo interesting let us know how it goes15:11
kata-irc-bot<alessandro.randazzo> :+1:15:11
*** fuentess has quit IRC15:16
*** lpetrut has quit IRC15:34
*** eernst has joined #kata-dev15:49
*** sameo has quit IRC16:01
*** lpetrut has joined #kata-dev16:14
*** lpetrut has quit IRC16:15
*** lpetrut has joined #kata-dev16:15
kata-irc-bot<alessandro.randazzo> hey guys, I think everything has gone well... below my output during the rootfs image creation : 'INFO: Create symlink to /tmp in /var to create private temporal directories with systemd INFO: Install tmp.mount in ./etc/systemd/system cp: cannot stat './usr/share/systemd/tmp.mount': No such file or directory INFO: Create /home/alex/goprojects/src/github.com/kata-containers/osbuilder/rootfs-builder/rootfs-Alpine/etc INFO:16:16
kata-irc-botConfigure chrony file /home/alex/goprojects/src/github.com/kata-containers/osbuilder/rootfs-builder/rootfs-Alpine/etc/chrony.conf INFO: Pull Agent source code [OK] Pull Agent source code INFO: Build agent ~/goprojects/src/github.com/kata-containers/agent ~/goprojects/src/github.com/kata-containers/osbuilder/rootfs-builder rm -f kata-agent kata-agent.service go build -buildmode=pie -tags "" -o kata-agent \         -ldflags "-X16:16
kata-irc-botmain.version=1.9.0-alpha0-77e1b6b2af1aff59885ad5b2c508a37547deac67 -X main.seccompSupport=no " install -D kata-agent /home/alex/goprojects/src/github.com/kata-containers/osbuilder/rootfs-builder/rootfs-Alpine/usr/bin/kata-agent Installing systemd unit files... install -D -m 644 kata-agent.service /home/alex/goprojects/src/github.com/kata-containers/osbuilder/rootfs-builder/rootfs-Alpine/lib/systemd/system/kata-agent.service || exit 1;  install -D16:16
kata-irc-bot-m 644 kata-containers.target /home/alex/goprojects/src/github.com/kata-containers/osbuilder/rootfs-builder/rootfs-Alpine/lib/systemd/system/kata-containers.target || exit 1; ~/goprojects/src/github.com/kata-containers/osbuilder/rootfs-builder [OK] Agent installed INFO: Check init is installed [OK] init is installed INFO: Creating summary file INFO: Created summary file '/var/lib/osbuilder/osbuilder.yaml' inside rootfs'16:16
kata-irc-bot<alessandro.randazzo> I just sum up my steps : 1) downloaded apk-tools-static 2) untar the file by typing : tar -xvfz <filename> 3) moved apk.static under /sbin (that's actually a symbolic link to /usr/bin) 4) I run sudo -E PATH=$PATH ./rootfs.sh alpine . I don't know if it is the case of updating some document...anyway I am going to run kata-runtime check and we see what is still missing16:20
kata-irc-bot<mvedovati> awesome @alessandro.randazzo16:35
kata-irc-bot<mvedovati> any reason why you specifically wanted  to use Alpine as guest VM?16:36
*** igordc has joined #kata-dev16:36
*** lpetrut has quit IRC16:37
*** eernst has quit IRC16:38
*** sameo has joined #kata-dev16:41
kata-irc-bot<alessandro.randazzo> @mvedovati there is no particular reason except Alpine is very lightweight and my host is based on a lubuntu virtual machine, thus, my idea is not to weight so much my environment because my goal is to run some tests to compare two different runtime containers. Does it make sense?16:43
*** lpetrut has joined #kata-dev16:48
kata-irc-bot<mvedovati> It may be that a smaller image will result in a lower memory footprint, since there's less data to load in pages16:49
kata-irc-bot<mvedovati> @alessandro.randazzo about speed performances, with `AGENT_INIT=yes` the distro should not matter, it may with systemd as init16:50
kata-irc-bot<alessandro.randazzo> Ok, good to know it, but this flag where I should've put it?16:52
kata-irc-bot<james.o.hunt> @alessandro.randazzo - yes - see https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#create-a-local-rootfs-for-initrd-image and https://github.com/kata-containers/osbuilder#rootfs-with-the-agent-as-init.16:59
*** jodh has quit IRC17:00
*** lpetrut has quit IRC17:01
*** sgarzare has quit IRC17:08
*** gwhaley has quit IRC17:08
*** fuentess has joined #kata-dev17:10
*** igordc has quit IRC17:32
*** altlogbot_2 has quit IRC18:19
*** altlogbot_0 has joined #kata-dev18:19
*** igordc has joined #kata-dev18:36
*** davidgiluk has quit IRC18:58
*** sameo has quit IRC19:38
*** devimc has quit IRC19:38
*** devimc has joined #kata-dev19:39
*** eernst_ has joined #kata-dev20:28
*** khyr0n has joined #kata-dev20:34
*** khyr0n has quit IRC20:37
*** khyr0n has joined #kata-dev20:38
*** fuentess has quit IRC21:44
*** brtknr has quit IRC21:46
*** devimc has quit IRC22:10

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!