__ __ __
____ ___ / /_/ /_ ____ _/ /_
/ __ \/ _ \/ __/ __ \/ __ `/ __/
/ / / / __/ /_/ /_/ / /_/ / /_
/_/ /_/\___/\__/_.___/\__,_/\__/
A utility for issuing ICMP requests.
Send ICMP echo and receive response:
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
defer func() { | |
if e := recover(); e != nil { | |
fmt.Printf("Recovered from '%v'\n", e) |
perl -e 'for ($i = 0; $i < 20; $i++ ) { $foo .= "A" x (1024 * 1024); }; print "Success\n"' |
Objectives: | |
1. Avoid file system implementation bias on libcontainer API | |
2. Make the caller of the API responsible for storing/persisting the state necessary to re-create | |
a container from the underlying cgroups, etc. | |
3. Ideally, clarify the notion of ownership in the API to avoid write conflicts due to misunderstanding. | |
At a minimum this needs to be clearly documented. | |
Current situation | |
Caller passes a file system path on Create. libcontainer stores a "memento" (file) there sufficient to |
package temp_test | |
import ( | |
. "github.com/onsi/ginkgo" | |
) | |
var _ = Describe("Blah", func() { | |
var f func() |
__ __ __
____ ___ / /_/ /_ ____ _/ /_
/ __ \/ _ \/ __/ __ \/ __ `/ __/
/ / / / __/ /_/ /_/ / /_/ / /_
/_/ /_/\___/\__/_.___/\__,_/\__/
A utility for issuing ICMP requests.
Send ICMP echo and receive response:
package cgo_ginkgo_test | |
import ( | |
. "github.com/onsi/ginkgo" | |
. "github.com/onsi/gomega" | |
"testing" | |
) | |
func TestCgoGinkgo(t *testing.T) { |
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/cloudfoundry-incubator/garden" | |
"github.com/cloudfoundry-incubator/garden/client" | |
"github.com/cloudfoundry-incubator/garden/client/connection" | |
) |
exec 1<&- | |
exec 1<>/tmp/somescript.log | |
exec 2>&1 |
Ensure garden-linux is booted with -allowHostAccess=true (and a reasonable grace time like 500m). | |
============================================================================================================= | |
IPv4 experiment | |
Start a netcat server: | |
nc -l <host IP> 5000 | |
Create a privileged container: | |
curl -H "Content-Type: application/json" -XPOST http://127.0.0.1:7777/containers -d '{"rootfs":"docker:///ubuntu","privileged":true}' |
# Cloud Foundry Java Buildpack | |
# Copyright (c) 2013 the original author or authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |