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

Conversation

@bison
Copy link
Contributor

@bison bison commented Nov 15, 2016

Adds a working rkt enter implementation for the fly stage1. It just
chroots into the pod's rootfs and execs its arguments.

Fixes #2957

Adds a working `rkt enter` implementation for the fly stage1.  It just
chroots into the pod's rootfs and execs its arguments.

Fixes #2957
@squeed
Copy link
Contributor

squeed commented Nov 16, 2016

A few small suggestions, but looks great!

Copy link
Member

@lucab lucab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two notes for possible followups, but per-se this LGTM.

func execArgs() error {
argv0 := flag.Arg(0)
argv := flag.Args()
envv := []string{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: fly should write env var in a stage1 file (under /rkt/env/) and here we should set them back and ensuring that there is a sane $TERM set.

if err := syscall.Chroot(root); err != nil {
log.FatalE("Failed to chroot", err)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: we should have uid/gid/supp-gid for the original application at this point and set them back here.

@lucab lucab added this to the v1.20.0 milestone Nov 18, 2016
@lucab lucab merged commit cc3d8e8 into rkt:master Nov 21, 2016
Quentin-M added a commit to Quentin-M/stackanetes that referenced this pull request Dec 5, 2016
Kubernetes relies on `rkt enter` to execute lifecycle hooks, however
before rkt 1.20, this command is not available with rkt stage1-fly,
which is used in nova-libvirt.

See rkt/rkt#3377
Quentin-M added a commit to Quentin-M/stackanetes that referenced this pull request Dec 6, 2016
Kubernetes relies on `rkt enter` to execute lifecycle hooks, however
before rkt 1.20, this command is not available with rkt stage1-fly,
which is used in nova-libvirt.

See rkt/rkt#3377
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants