Skip to content

Instantly share code, notes, and snippets.

View carlpett's full-sized avatar

Calle Pettersson carlpett

View GitHub Profile
import logging
import subprocess
import salt.utils
log = logging.getLogger(__name__)
def primary_interface():
try:
import salt.utils.network as network
except Exception as e:
resource "openstack_networking_network_v2" "test-net" {
name = "test-net"
}
resource "openstack_networking_subnet_v2" "test-subnet" {
name ="test-subnet"
network_id = "${openstack_networking_network_v2.test-net.id}"
cidr = "10.1.2.0/24"
}
resource "openstack_networking_port_v2" "test-port" {
diff --git a/gophercloud/openstack/networking/v2/extensions/fwaas/rules/requests.go b/gophercloud/openstack/networking/v2/extensions/fwaas/rules/requests.go index 57a0e8b..1efc26d 100644
--- a/gophercloud/openstack/networking/v2/extensions/fwaas/rules/requests.go
+++ b/gophercloud/openstack/networking/v2/extensions/fwaas/rules/requests.go
@@ -116,7 +116,11 @@ func (opts CreateOpts) ToRuleCreateMap() (map[string]interface{}, error) {
r := make(map[string]interface{})
- r["protocol"] = opts.Protocol
+ if opts.Protocol == "any" {
+ r["protocol"] = nil
Oct 25 15:04:52 machine-name nomad[1359]: 2016/10/25 15:04:52.655335 [ERR] driver.docker: failed to wait for 2c72a69a8031f33de23f150769da9434f44283edb747c742bcf46f185cdccd4d; container already terminated
Oct 25 15:04:52 machine-name nomad[1359]: driver.docker: failed to wait for 2c72a69a8031f33de23f150769da9434f44283edb747c742bcf46f185cdccd4d; container already terminated
Oct 25 15:04:52 machine-name nomad[1359]: driver.docker: failed to wait for c8606136bff98f7b26fb53a463a2681b5d17ffa6053df13512631b348845e45b; container already terminated
Oct 25 15:04:52 machine-name nomad[1359]: driver.docker: failed to wait for e65f19378c46c84e1736b08536f02c60ccf00447d8d7050a3d5ff85bb1e7980c; container already terminated
Oct 25 15:04:52 machine-name nomad[1359]: client: task "exporter" for alloc "6cc7ec51-57a6-e84e-bb04-062e7cac7f03" failed: Wait returned exit code 0, signal 0, and error Post http://unix.sock/containers/e65f19378c46c84e1736b08536f02c60ccf00447d8d7050a3d5ff85bb1e7980c/wait: EOF
Oct 25 15:04:52 machine-name
wmi_dns_zone_transfer_requests_received_total{type="full/incremental"}
AXFRRequestReceived : 0
IXFRRequestReceived : 0
wmi_dns_zone_transfer_requests_sent_total{type="full/incremental/soa"}
AXFRRequestSent : 0
IXFRRequestSent : 0
ZoneTransferSOARequestSent : 0
wmi_dns_zone_transfer_response_received_total{type="full/incremental"}
AXFRResponseReceived : 0
IXFRResponseReceived : 0
address_book_operations_total{operation}
ABANRPersec ambiguous_name_resolution
ABBrowsesPersec browse
ABMatchesPersec find
ABPropertyReadsPersec property_read
ABSearchesPersec search
ABProxyLookupsPersec proxy_search
address_book_client_sessions
ABClientSessions
2017/02/16 20:53:13.521822 [INFO] consul-template v0.18.1 (9c62737)
2017/02/16 20:53:13.522833 [INFO] (runner) creating new runner (dry: true, once: false)
2017/02/16 20:53:13.526670 [DEBUG] (runner) final config: {"Consul":{"Address":"","Auth":{"Enabled":false,"Username":"","Password":""},"Retry":{"Attempts":5,"Backoff":250000000,"Enabled":true},"SSL":{"CaCert":"","CaPath":"","Cert":"","Enabled":false,"Key":"","ServerName":"","Verify":true},"Token":"","Transport":{"DialKeepAlive":30000000000,"DialTimeout":30000000000,"DisableKeepAlives":false,"MaxIdleConnsPerHost":5,"TLSHandshakeTimeout":10000000000}},"Dedup":{"Enabled":false,"MaxStale":2000000000,"Prefix":"consul-template/dedup/","TTL":15000000000},"Exec":{"Command":"","Enabled":false,"Env":{"Blacklist":[],"Custom":[],"Pristine":false,"Whitelist":[]},"KillSignal":2,"KillTimeout":30000000000,"ReloadSignal":null,"Splay":0,"Timeout":0},"KillSignal":2,"LogLevel":"trace","MaxStale":2000000000,"PidFile":"","ReloadSignal":1,"Syslog":{"Enabled":false,"Facility":"LO
@carlpett
carlpett / calltest.py
Created March 3, 2017 15:12
saltstack/salt #39717
from salt import client
from time import sleep
import objgraph
import gc
objgraph.show_growth(limit=3)
def loopetiloop():
i = 0
while True:
caller = client.Caller()
digraph "unnamed" {
node [style=filled fillcolor="#f8f8f8"]
subgraph cluster_L { L [shape=box fontsize=32 label="Type: inuse_space\lTime: May 25, 2017 at 10:06pm (CEST)\l7607.71kB of 7607.71kB total ( 100%)\lDropped 180 nodes (cum <= 38.04kB)\lDropped 1 edge (freq <= 7.61kB)\l"] }
N1 [label="github.com/martinlindhe/wmi_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather\n1536.14kB(20.19%)\nof 3092.59kB(40.65%)" fontsize=24 shape=box tooltip="github.com/martinlindhe/wmi_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather (3092.59kB)"]
N2 [label="bytes.makeSlice\n1044.13kB(13.72%)" fontsize=22 shape=box tooltip="bytes.makeSlice (1044.13kB)"]
N3 [label="compress/flate.NewWriter\n902.59kB(11.86%)" fontsize=21 shape=box tooltip="compress/flate.NewWriter (902.59kB)"]
N4 [label="github.com/martinlindhe/wmi_exporter/vendor/github.com/beorn7/perks/quantile.(*stream).merge\n524.09kB(6.89%)" fontsize=18 shape=box tooltip="github.com/martinlindhe/wmi_exporter/v
type StatefulSetStatus struct {
// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
// StatefulSet's generation, which is updated on mutation by the API Server.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
// replicas is the number of Pods created by the StatefulSet controller.
Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
// readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.