intelsdi-x / rkt Goto Github PK
View Code? Open in Web Editor NEWThis project forked from rkt/rkt
rkt is an App Container runtime for Linux
License: Apache License 2.0
This project forked from rkt/rkt
rkt is an App Container runtime for Linux
License: Apache License 2.0
Seems that there are no env variables which should available when entering into stage2 of application
It could be very helpfull to skip some functional kvm tests (which are still broken) during buiding and testing phase on CI
This caused that some commands, like "clear" doesn't work
In a case of have the same env in a host and rkr runcmd, there will be append to the Enviroment type twice, and use that one from a host.
IMHO SetEnv from cmd should be desired. Can use assertValid in MergeEnv function and add override envs
[ 0.269978] inspect[71]: Capability set: effective: chown, dac_override, dac_read_search, fowner, fsetid, kill, setgid, setuid, setpcap, linux_immutable, net_bind_service, net_broadcast, net_admin, net_raw, ipc_lock, ipc_owner, sys_module, sys_rawio, sys_chroot, sys_ptrace, sys_psacct, sys_admin, sys_boot, sys_nice, sys_resource, sys_time, sys_tty_config, mknod, lease, audit_write, audit_control, setfcap, mac_override, mac_admin, syslog, wake_alarm, block_suspend, audit_read
[ 0.269978] inspect[71]: Capability set: permitted: chown, dac_override, dac_read_search, fowner, fsetid, kill, setgid, setuid, setpcap, linux_immutable, net_bind_service, net_broadcast, net_admin, net_raw, ipc_lock, ipc_owner, sys_module, sys_rawio, sys_chroot, sys_ptrace, sys_psacct, sys_admin, sys_boot, sys_nice, sys_resource, sys_time, sys_tty_config, mknod, lease, audit_write, audit_control, setfcap, mac_override, mac_admin, syslog, wake_alarm, block_suspend, audit_read
[ 0.270978] inspect[71]: Capability set: inheritable:
Failed to remove temporary data directory "/tmp/datadir-453325704": remove /tmp/datadir-453325704/pods/run/3b0f9f5b-d73b-49a2-8ea1-77fb1b5024e8/stage1/rootfs/sys: device or resource busy
from
testing.func·006()
/usr/local/go/src/testing/testing.go:441 +0x181
github.com/coreos/rkt/tests.(*dirDesc).cleanup(0xc2082e03c0)
/home/ppalucki/work/go/src/github.com/coreos/rkt/build-rkt-0.7.0+git/gopath/src/github.com/coreos/rkt/tests/rkt_tests.go:70 +0x228
github.com/coreos/rkt/tests.(*rktRunCtx).cleanup(0xc2081b8b10)
/home/ppalucki/work/go/src/github.com/coreos/rkt/build-rkt-0.7.0+git/gopath/src/github.com/coreos/rkt/tests/rkt_tests.go:144 +0xc7
Steps to reproduce:
sudo ./rkt prepare --pod-manifest nginx_default.json --stage1-path stage1-kvm.aci
sudo ./rkt run-prepared $UUID
Got error:
kvm: network unit created: "interface-eth0.service" in "stage1/rootfs/usr/lib/systemd/system" (iface="eth0", addr="172.16.28.85/24")
stage1: warning: no volume specified for mount point "k8s-managed-etc-hosts", implicitly creating an "empty" volume. This volume will be removed when the pod is garbage-collected.
stage1: failed to configure systemd: mkdir stage1/rootfs/opt/stage2/nginx/rootfs/etc/hosts: not a directory
test 'TestCgroups' fails with
[ 0.217983] inspect[71]: check-cgroups: FAIL
because nspwan remount (bind remounts) whole cgroups as read-only
systemd-nspawn limits access to various kernel interfaces in the container to read-only, such as /sys, /proc/sys or /sys/fs/selinux. Network interfaces and the system clock may not be changed from within the container. Device nodes may not be created. The host system cannot be rebooted and kernel modules may not be loaded from within the container.
http://www.freedesktop.org/software/systemd/man/systemd-nspawn.html
how it is done in nspwan.c can be seen here
[ 0.264975] ace-validator[85]: 2015/07/09 19:35:25 WARN: "/db" is not a mount point (againts "/") fsid are equal: syscall.Fsid{X__val:[2]int32{-926896844, 1387030233}} == syscall.Fsid{X__val:[2]int32{-926896844, 1387030233}}
if sfs1.Fsid == sfs2.Fsid {
return fmt.Errorf("%q is not a mount point", d)
}
https://github.com/appc/spec/blob/master/ace/validator.go#L485
according to http://man7.org/linux/man-pages/man2/statfs.2.html
Nobody knows what f_fsid is supposed to contain (but see below).
...
The f_fsid field
Solaris, Irix and POSIX have a system call statvfs(2) that returns a
struct statvfs (defined in <sys/statvfs.h>) containing an unsigned
long f_fsid. Linux, SunOS, HP-UX, 4.4BSD have a system call statfs()
that returns a struct statfs (defined in <sys/vfs.h>) containing a
fsid_t f_fsid, where fsid_t is defined as struct { int val[2]; }.
The same holds for FreeBSD, except that it uses the include file
<sys/mount.h>.
The general idea is that f_fsid contains some random stuff such that
the pair (f_fsid,ino) uniquely determines a file. Some operating
systems use (a variation on) the device number, or the device number
combined with the filesystem type. Several operating systems
restrict giving out the f_fsid field to the superuser only (and zero
it for unprivileged users), because this field is used in the
filehandle of the filesystem when NFS-exported, and giving it out is
a security concern.
Under some operating systems, the fsid can be used as the second
argument to the sysfs(2) system call.
http://golang.org/pkg/path/filepath/#Dir
"""
Dir returns all but the last element of path, typically the path's directory. After dropping the final
element, the path is Cleaned and trailing slashes are removed. If the path is empty, Dir returns ".". If
the path consists entirely of separators, Dir returns a single separator. The returned path does not
end in a separator unless it is the root directory.
"""
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.