Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🦀

Brent Salisbury nerdalert

💭
🦀
View GitHub Profile
View gist:2f8fbe25acb5ab655369b91428798926
(='o'=)[brent@cent8-120:images$]$ make fedora
cd ../../go-controller ; make
make[1]: Entering directory '/home/brent/oshift-localsh/ovn-kubernetes/go-controller'
hack/build-go.sh cmd/ovnkube cmd/ovn-k8s-cni-overlay cmd/ovn-kube-util hybrid-overlay/cmd/hybrid-overlay-node
+ for bin in "$@"
++ basename cmd/ovnkube
+ binbase=ovnkube
+ go build -v -mod vendor -gcflags '' -ldflags '-B 0xfb71617a2fc1ee65958105727d8da6df3a9f4905 -X github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics.Commit=2b0b09167baecde744698e9b7e91672dd4458eed -X github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics.Branch=master -X github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics.BuildUser=brent -X github.com/ovn-org/ovn-kubernetes/go-controller/pkg/metrics.BuildDate=2020-03-31' -o /home/brent/oshift-localsh/ovn-kubernetes/go-controller/_output/go/bin/ovnkube ./cmd/ovnkube
+ for bin in "$@"
View CNO-Error.txt
namespace/openshift-network-operator created
customresourcedefinition.apiextensions.k8s.io/networks.operator.openshift.io created
customresourcedefinition.apiextensions.k8s.io/operatorpkis.network.operator.openshift.io created
clusterrolebinding.rbac.authorization.k8s.io/default-account-cluster-network-operator created
deployment.apps/network-operator created
clusteroperator.config.openshift.io/network created
/home/brent/code/go/src/github.com/openshift/cluster-network-operator/hack
Network operator pod not available yet on attempt 1
Creating OVN CNO config
network.config.openshift.io/cluster created
View scope-closure.rs
let stream = pinger.and_then(move |pinger| Ok(pinger.chain(ip).stream()));
let future = stream.and_then(|stream| {
stream.take(1).for_each(|mb_time| {
match mb_time {
Some(time) => {
// I need to capture this data (Duration) and get it back to the main scope
println!("Time => {:?}", time);
}
None => println!("timeout"),
View inspect.go
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Check that the image name in the Docker Container matches the image name being inspected
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func checkDockerImageName(dockerImage string, containerID string) bool {
if containerID == "" {
errMessage := "The container id/name is blank!"
printError(errMessage)
inspectionData.ProcessesResults = append(inspectionData.ProcessesResults, formatHTMLError(errMessage))
return false
}
View macvlan-global.md

Macvlan Global Driver

Setup

  • The same functionality is preserved as in the instructions in the experimental Macvlan README. To run the driver locally dockerd daemon label is used for local driver registration like so: dockerd --label com.docker.network.driver.macvlan=local

  • By running the drivers globally it enables the user to have globally distributed IPAM and DNS support via the libnetwork IPAM/DNS excellence.

  • To run the PoC binary download this tar and extract to the /usr/bin/ directory from here: dockerd-binaries Note: (backup your Docker binaries prior if you dont want them overwritten by the extracted binaries).

View vlan_ip_link_example.md
View upgrade_iproute2_instructions.sh
# DL the src code from http://www.kernel.org/pub/linux/utils/net/iproute2/
# Ubuntu 4.0.0-1:
apt-get install -y libdb4o-cil-dev libdb-dev bison flex build-essential gcc module-init-tools
wget https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.1.1.tar.xz
tar xvf iproute2-4.1.1.tar.xz
cd iproute2-4.1.1
make
# This will build the new `ip` binary in the ip directory.
# Next backup your old ip binary if you want:
View docker-experimental-dhcp-ipam-driver.md

Experimental Docker Libnetwork DHCP Driver

The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0 Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.

This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.

Getting Started

View Docker_Swarm_Network_Event_API_Stream.md

Example Viewing Docker Events via the Swarm/Docker API Event Stream

QuickStart

Example Docker event stream:

# (Optionally) grab the latest experimental for Macvlan/Ipvlan.
$ wget https://experimental.docker.com/builds/Linux/x86_64/docker-latest
View gistify653521.sh
####################################
# Macvlan Bridge Mode with Netlink #
####################################
#!/bin/bash
# add the namespaces
ip netns add ns1
ip netns add ns2
You can’t perform that action at this time.