Skip to content

Instantly share code, notes, and snippets.

View voelzmo's full-sized avatar
:octocat:
Just here for the comments.

Marco Voelz voelzmo

:octocat:
Just here for the comments.
  • Heidelberg, Germany
View GitHub Profile
package linkedlist
import "errors"
type Element struct {
Val interface{}
}
type List struct{}
var ErrEmptyList = errors.New("empty list")
@voelzmo
voelzmo / gist:e7d72125bfbb333c470e6310d163989c
Created September 13, 2018 10:53
Deleting all queued bosh tasks
bosh -e bosh tasks --json | jq .Tables[].Rows[].id -Mr | xargs -n 1 bosh -e bosh cancel-task
@voelzmo
voelzmo / gist:82720f5ba8d1e0135bdca1dd7fc6515b
Created August 13, 2018 09:29
cf deployment log showing links updates and then fails
```
D, [2018-08-09T08:21:07.424094 #2566] [task:95] DEBUG -- DirectorJobRunner: (0.000224s) (conn: 47181971028360) SELECT * FROM "release_versions" WHERE (("release_versions"."release_id" = 12) AND ("version" = '195')) LIMIT 1
D, [2018-08-09T08:21:07.426649 #2566] [task:95] DEBUG -- DirectorJobRunner: (0.001116s) (conn: 47181971028360) SELECT "templates".* FROM "templates" INNER JOIN "release_versions_templates" ON ("release_versions_templates"."template_id" = "templates"."id") WHERE ("release_versions_templates"."release_version_id" = 12)
D, [2018-08-09T08:21:07.430141 #2566] [task:95] DEBUG -- DirectorJobRunner: (0.000407s) (conn: 47181971028360) SELECT * FROM "link_providers" WHERE (("link_providers"."deployment_id" = 4) AND ("instance_group" = 'consul') AND ("name" = 'consul_agent') AND ("type" = 'job')) LIMIT 1
D, [2018-08-09T08:21:07.431029 #2566] [task:95] DEBUG -- DirectorJobRunner: (0.000151s) (conn: 47181971028360) BEGIN
D, [2018-08-09T08:21:07.431895 #2566] [task:95] DEBUG -- DirectorJobRunner: (0.
module Bosh::OpenStackCloud
class CpiLambda
CONTEXT_CA_PATH = '/var/vcap/jobs/openstack_cpi/config/cacert_context.pem'
def self.create(cpi_config, cpi_log, ca_cert_from_config, ca_cert_from_context=CONTEXT_CA_PATH)
lambda do |context|
unless cpi_config.has_key?('cloud') && cpi_config['cloud'].has_key?('properties')
raise "Could not find cloud properties in the configuration"
end
@voelzmo
voelzmo / openstack_cli.rb
Created August 8, 2016 06:42
create lambda with context
json = JSON.load(ARGF.read)
cpi_lambda = lambda do
unless cpi_config.has_key?('cloud') && cpi_config['cloud'].has_key?('properties')
raise "Could not find cloud properties in the configuration"
end
cloud_properties = cpi_config['cloud']['properties']
@voelzmo
voelzmo / release_copy.rb
Last active September 4, 2018 11:07
bosh release copy script
#!/usr/bin/env ruby
require "cli"
require "cli/release"
require "cli/blob_manager"
require "blobstore_client"
require "cli/versions/versions_index"
require 'optparse'