Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .github/linters/.cspell.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"version": "0.2",
"dictionaryDefinitions": [
{
"name": "project-dict",
"path": "urunc-dict.txt"
}
"dictionaryDefinitions": [
{
"name": "project-dict",
"path": "urunc-dict.txt"
}
],
"dictionaries": ["project-dict"],
"words": [ ],
"dictionaries": [
"project-dict"
],
"words": [],
"ignorePaths": [
"node_modules",
"vendor",
Expand Down Expand Up @@ -40,15 +42,14 @@
],
"ignoreRegExpList": [
"http[s]?://\\S+",
"`[^`]+`",
"`[^`\\n]+`",
"\\$[^\\s]+",
"/^Signed-off-by:.*$/gm",
"/^Reviewed-by:.*$/gm",
"/^Approved-by:.*$/gm",
"/^Co-authored-by:.*$/gm",
"/^Tested-by:.*$/gm",
"/^Acked-by:.*$/gm",
"`[^`]+`",
"```[\\s\\S]*?```"
]
}
}
43 changes: 21 additions & 22 deletions .github/linters/urunc-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Containerd
Containerfile
Crictl
DIRSYNC
Dcos
Debugf
Devmapper
Dockerfiles
Expand All @@ -32,7 +31,6 @@ LAZYTIME
LIBCONTAINER
LOGLEVEL
LOGPIPE
Liste
MANDLOCK
Mainas
Mewz
Expand Down Expand Up @@ -67,7 +65,6 @@ PROJECTNAME
Poststart
Poststop
Prestart
Prettyfier
Privs
Qdisc
RDONLY
Expand Down Expand Up @@ -105,7 +102,6 @@ Vcpu
Virt
Warnf
Zerolog
abcshd
ananos
annot
artefacts
Expand All @@ -121,7 +117,6 @@ buildkit's
bunix
bunix's
bunnyfile
burdain
bytemsg
chttp
clis
Expand All @@ -146,7 +141,6 @@ dind
dirsync
distro
distros
djaidwnduwk
dmsetup
downscript
dpkg
Expand All @@ -156,8 +150,6 @@ encoded
endmacro
epoll
errdefs
etest
etesting
etfs
execve
execve's
Expand All @@ -175,7 +167,6 @@ golangci
goscall
gosec
govalidator
grou
groupid
headerlink
htmlmin
Expand All @@ -191,7 +182,6 @@ inlinehilite
inspectp
iobase
iosize
isues
iversion
jackpal
javascripts
Expand All @@ -207,7 +197,6 @@ lazytime
lenag
lenpg
leasesapi
levarage
libc
libcontainer
libseccomp
Expand Down Expand Up @@ -265,7 +254,6 @@ paravirtual
pids
pluginid
posixacl
practises
prctl
prebuild
privs
Expand All @@ -282,9 +270,7 @@ rdev
rdinit
reexec
relatime
remobe
resourcecontrol
rhandling
rootflags
rootfs
rootfstype
Expand All @@ -298,10 +284,8 @@ runp
runtimeclasses
runtimespec
sandboxing
scontroller
seabios
seccomp
secomp
setgroup
settime
sgid
Expand All @@ -311,12 +295,10 @@ sigaction
sigreturn
sigstr
sirupsen
socker
stretchr
strictatime
subtest
superfences
sworker
symfollow
syscall
syscalls
Expand All @@ -328,7 +310,6 @@ tmpfs
tmpl
tomlq
traefik
triger
ttrpc
twemoji
typesapi
Expand All @@ -347,15 +328,13 @@ userns
urfave
urunc
urunc's
urunce
uruncts
urunit
urunit's
veth
virt
virtio
vishvananda
vlaid
vmcons
vnet
yourdockerhubid
Expand Down Expand Up @@ -402,7 +381,6 @@ vsock
Gkeka
Panagiotis
Mavrikos
zyfy
Dionisia
Koronellou
sankalp
Expand All @@ -421,3 +399,24 @@ ESRCH
Prafful
praffq
libcontainers
daemonset
devroom
eksctl
FOSDEM
keypair
MMIO
Muen
Opam
paravirtualization
sandboxed
snapshotters
WASI
Prettyfier
abcshd
djaidwnduwk
etest
etesting
scontroller
sworker
urunce
zyfy
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
* Update instructions for installing Go and remove obsolete image references
* Add tutorial for using `urunc` with kind
* Centralize the version definition of the tools mentioned in docs
* Add instructions fo using blockfile snapshotter with `urunc`
* Add instructions for using blockfile snapshotter with `urunc`
* Provide documentation for using the new [monitors-build repository](https://github.com/urunc-dev/monitors-build)

## New Contributors
Expand Down Expand Up @@ -180,7 +180,7 @@ Big thanks for all new contributors in `urunc`:
- `SupportsFS()` takes as an argument a filesystem type and checks if the unikernel supports that type.
- Partial unit tests for pkg/unikontainers
- Refactor devmapper snapshot handling
- Define new environment variable `USE_DEVMAPPER_AS_BLOCK`to use devmapper's snapshot as a block image for the unikernel
- Define new environment variable `USE_DEVMAPPER_AS_BLOCK` to use devmapper's snapshot as a block image for the unikernel
- Handle newer versions of Unikraft unikernels
- Enable NAT and IP forwarding in static networking

Expand All @@ -196,7 +196,7 @@ Big thanks for all new contributors in `urunc`:

#### Misc
* Bug fixes
* Refactor handling of normal containers and replaces constants in paths and annotations
* Refactor handling of normal containers and replace constants in paths and annotations
* Unikraft FC boot on arm64
* Huge refactor and update of `urunc`'s documentation. The documentation is available at https://nubificus.github.io/urunc/

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ clean:
lint:
$(CNTR_TOOL) $(LINT_CNTR_OPTS) $(LINT_CNTR_IMG) $(LINT_CNTR_CMD)

# Dcos targets
# Docs targets
## docs Build and serve urunc's docs locally
.PHONY: docs
docs:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ inside the unikernel through the respective VM process.

## Quick start

The easiest and fastest way to try out `urunc` would be with `docker`
The easiest and fastest way to try out `urunc` would be with `docker`.
Before doing so, please make sure that the host system satisfies the
following dependencies:

Expand Down Expand Up @@ -145,7 +145,7 @@ supported VM/Sandbox monitors and unikernels:
| Unikraft | QEMU, Firecracker | x86 | Initrd, 9pfs |
| MirageOS | QEMU, Solo5-hvt, Solo5-spt | x86,aarch64 | Block/Devmapper |
| Mewz | QEMU | x86 | In-memory |
| Linux | QEMU, Firecracker, Cloud-HYpervisor | x86,aarch64 | Initrd, Block/Devmapper, 9pfs, Virtiofs |
| Linux | QEMU, Firecracker, Cloud-Hypervisor | x86,aarch64 | Initrd, Block/Devmapper, 9pfs, Virtiofs |
| Hermit | QEMU | x86 | Initrd |

We plan to add support for more unikernel frameworks and other platforms too.
Expand Down Expand Up @@ -210,7 +210,7 @@ document](https://urunc.io/developer-guide/contribute/).
## Security policy

In case of a security vulnerability, please refer to the
[Security Policy document](https://urunc.io/developer-guide/security/).
[Security Policy document](https://urunc.io/developer-guide/security/)
for guidelines on how to report it responsibly.

## Changelog
Expand All @@ -226,5 +226,5 @@ for more information on what changed in the latest and previous releases.

We kindly invite everyone interested in `urunc` to join our
[Slack channel](https://cloud-native.slack.com/archives/C08V201G35J).
To directly communicate with the maintainers, feel free to drop an email At
To directly communicate with the maintainers, feel free to drop an email at
[`urunc`'s maintainers' mailing list](cncf-urunc-maintainers@lists.cncf.io )
20 changes: 10 additions & 10 deletions cmd/urunc/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ var createCommand = &cli.Command{
}

// createUnikontainer creates a Unikernel struct from bundle data,
// initializes it's base dir and state.json,
// setups terminal if required and spawns reexec process,
// initializes its base dir and state.json,
// sets up terminal if required and spawns reexec process,
// waits for reexec process to notify, executes CreateRuntime hooks,
// sends ACK to reexec process
func createUnikontainer(cmd *cli.Command, uruncCfg *unikontainers.UruncConfig) (err error) {
Expand All @@ -99,7 +99,7 @@ func createUnikontainer(cmd *cli.Command, uruncCfg *unikontainers.UruncConfig) (
// We have already made sure in main.go that root is not nil
rootDir := cmd.String("root")

// bundle option cli option is optional. Therefore the bundle directory
// bundle cli option is optional. Therefore the bundle directory
// is either the CWD or the one defined in the cli option
bundlePath := cmd.String("bundle")
if bundlePath == "" {
Expand Down Expand Up @@ -144,7 +144,7 @@ func createUnikontainer(cmd *cli.Command, uruncCfg *unikontainers.UruncConfig) (
}()

// Create log pipe for nsenter
// NOTE: We might want to switch form pipe to socketpair for logs too.
// NOTE: We might want to switch from pipe to socketpair for logs too.
logPipeParent, logPipeChild, err := os.Pipe()
if err != nil {
err = fmt.Errorf("failed to create pipe for logs: %w", err)
Expand All @@ -167,7 +167,7 @@ func createUnikontainer(cmd *cli.Command, uruncCfg *unikontainers.UruncConfig) (
// Start reexec process
metrics.Capture(m.TS03)
// setup terminal if required and start reexec process
// TODO: This part of code needs better rhandling. It is not the
// TODO: This part of code needs better handling. It is not the
// job of the urunc create to setup the terminal for reexec.
// The main concern is the nsenter execution before the reexec.
// If anything goes wrong and we mess up with nsenter debugging
Expand Down Expand Up @@ -298,7 +298,7 @@ func createReexecCmd(initSock *os.File, logPipe *os.File) *exec.Cmd {
// first file we added in ExtraFiles, its file descriptor should be 2+1=3,
// since 0 is stdin, 1 is stdout and 2 is stderr. Similarly, the logPipeChild
// should be right after initSockChild, hence 4
// NOTE: THis might need bette rhandling in the future.
// NOTE: This might need better handling in the future.
reexecCommand.Env = append(reexecCommand.Env, "_LIBCONTAINER_INITPIPE=3")
reexecCommand.Env = append(reexecCommand.Env, "_LIBCONTAINER_LOGPIPE=4")
logLevel := strconv.Itoa(int(logrus.GetLevel()))
Expand Down Expand Up @@ -384,7 +384,7 @@ func reexecUnikontainer(cmd *cli.Command) error {

// get Unikontainer data from state.json
// TODO: We need to find a better way to synchronize and make sure
// the pid is written from urunc` create. Right now we rely on receiving
// the pid is written from urunc create. Right now we rely on receiving
// the AckReexec message, however this is not optimal and we might lose
// time because urunc create tries to write in a socket that the reexec
// process has not created yet.
Expand Down Expand Up @@ -419,7 +419,7 @@ func reexecUnikontainer(cmd *cli.Command) error {
// preparation the error will get manifested later. However, if environment
// setup goes well and the socket was not cleaned up correctly,
// we execve the monitor and we rely on Go's close-on-exec feature in all file
// descriptors. THerefore, we might want to rethink this in future and not rely
// descriptors. Therefore, we might want to rethink this in future and not rely
// on Go, but this requires quite a lot of changes.
if awaitErr != nil {
awaitErr = fmt.Errorf("error waiting START message: %w", awaitErr)
Expand All @@ -438,8 +438,8 @@ func reexecUnikontainer(cmd *cli.Command) error {
// ignore any errors, since it is a simple socket cleanup and the process exits.
// If unikontainers.Exec succeeds though, then we will never execute this
// cleanup, since we execve to the monitor process. In that case, we rely
// once more in Go's close on exec handling of all file descriptors.
// In the future, we might want to revisit this and rely less in Go.
// once more on Go's close on exec handling of all file descriptors.
// In the future, we might want to revisit this and rely less on Go.
defer func() {
tmpErr := unikontainer.DestroyConn(unikontainers.FromReexec)
if tmpErr != nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/urunc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func reviseRootDir(cmd *cli.Command) error {
return err
}
if root == "/" {
// This can happen if --root argument is.
// This can happen if --root argument is:
// - "" (i.e. empty);
// - "." (and the CWD is /);
// - "../../.." (enough to get to /);
Expand Down Expand Up @@ -210,7 +210,7 @@ func configLogrus(cmd *cli.Command, cfg unikontainers.UruncLog) error {
logLevel := max(cfgLogLevel, cliLogLevel)
logrus.SetLevel(logLevel)

// If loglevel is debug or lower, enable report caller with prettyfier for text format
// If loglevel is debug or lower, enable report caller with prettifier for text format
if logLevel >= logrus.DebugLevel {
logrus.SetReportCaller(true)
// Shorten function and file names reported by the logger, by
Expand Down
Loading
Loading