Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.
Merged
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
123 changes: 71 additions & 52 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (daemon *Daemon) initRunV(c *apitypes.HyperConfig) error {

daemon.Hypervisor = c.Driver
glog.Infof("The hypervisor's driver is %s", c.Driver)
daemon.Factory = factory.NewFromPolicy(c.Kernel, c.Initrd, c.VmFactoryPolicy)
daemon.Factory = factory.NewFromPolicy(c.Kernel, c.Initrd, c.EnableVsock, c.VmFactoryPolicy)

return nil
}
Expand Down
5 changes: 4 additions & 1 deletion daemon/pod/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,10 @@ func (c *Container) addToSandbox() error {
Stdout: c.streams.Stdout(),
Stderr: c.streams.Stderr(),
}
c.p.sandbox.Attach(tty, c.Id(), nil)
if err := c.p.sandbox.Attach(tty, c.Id()); err != nil {
c.Log(ERROR, err)
return err
}

c.status.Created(time.Now())
return nil
Expand Down
5 changes: 2 additions & 3 deletions daemon/pod/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func startSandbox(f factory.Factory, cpu, mem int, kernel, initrd string) (vm *h
Kernel: kernel,
Initrd: initrd,
}
vm, err = hypervisor.GetVm("", config, false, hypervisor.HDriver.SupportLazyMode())
vm, err = hypervisor.GetVm("", config, false)
}
if err != nil {
hlog.Log(ERROR, "failed to create a sandbox (cpu=%d, mem=%d kernel=%s initrd=%d): %v", cpu, mem, kernel, initrd, err)
Expand All @@ -44,8 +44,7 @@ func startSandbox(f factory.Factory, cpu, mem int, kernel, initrd string) (vm *h
}

func associateSandbox(id string, vmData []byte) (vm *hypervisor.Vm, err error) {
vm = hypervisor.NewVm(id, 0, 0, false)
err = vm.AssociateVm(vmData)
vm, err = hypervisor.AssociateVm(id, vmData)
if err != nil {
return nil, err
}
Expand Down
3 changes: 3 additions & 0 deletions package/dist/etc/hyper/config
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Initrd=/var/lib/hyper/hyper-initrd.img
# This is only useful for hypernetes, to disable the iptables setup by hyperd
# DisableIptables=false

# Enable vsock support. This only works with libvirt/qemu hypervisor and template disabled
# EnableVsock=false

# VmFactoryPolicy defines the policies to create factories
# VmFactoryPolicy = [FactoryConfig,]*FactoryConfig
# FactoryConfig = {["cache":NUMBER,]["template":(true|false),]"cpu":NUMBER,"memory":NUMBER}
Expand Down
2 changes: 2 additions & 0 deletions types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type HyperConfig struct {
Bridge string
BridgeIP string
DisableIptables bool
EnableVsock bool
DefaultLog string
DefaultLogOpt map[string]string

Expand Down Expand Up @@ -62,6 +63,7 @@ func NewHyperConfig(config string) *HyperConfig {
driver, _ := cfg.GetValue(goconfig.DEFAULT_SECTION, "Hypervisor")
c.Driver = strings.ToLower(driver)
c.DisableIptables = cfg.MustBool(goconfig.DEFAULT_SECTION, "DisableIptables", false)
c.EnableVsock = cfg.MustBool(goconfig.DEFAULT_SECTION, "EnableVsock", false)
c.DefaultLog, _ = cfg.GetValue(goconfig.DEFAULT_SECTION, "Logger")
c.DefaultLogOpt, _ = cfg.GetSection("Log")
c.VmFactoryPolicy, _ = cfg.GetValue(goconfig.DEFAULT_SECTION, "VmFactoryPolicy")
Expand Down
3 changes: 3 additions & 0 deletions vendor/github.com/RoaringBitmap/roaring/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions vendor/github.com/RoaringBitmap/roaring/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions vendor/github.com/RoaringBitmap/roaring/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions vendor/github.com/RoaringBitmap/roaring/CONTRIBUTORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading