Skip to content

Instantly share code, notes, and snippets.

View prysmakou's full-sized avatar

Aliaksandr Prysmakou prysmakou

View GitHub Profile
lxc.aa_profile = unconfined
# /etc/lxc/defaults.conf
This file has been truncated, but you can view the full file.
VERSION:
6.0.2-96d242f
REQUEST: [2014-04-23T14:11:09+03:00]
GET /v2/info HTTP/1.1
Host: api.192.168.122.185.xip.io
Accept: application/json
Content-Type: application/json
Async app staging
--->
request: post http://uaa.192.168.122.60.xip.io/oauth/token
headers: {"content-type"=>"application/x-www-form-urlencoded;charset=utf-8", "accept"=>"application/json;charset=utf-8", "authorization"=>"Basic Y2Y6"}
body: grant_type=password&username=nadmin&password=nadmin
<---
response: 200
headers: {"cache-control"=>"no-store", "content-type"=>"application/json;charset=UTF-8", "date"=>"Thu, 24 Apr 2014 14:09:26 GMT", "pragma"=>"no-cache", "server"=>"Apache-Coyote/1.1", "transfer-encoding"=>"chunked"}
body: {"access_token":"eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiJlOWZkYWE5OC0wNDVmLTRhNmEtYTA1YS0xMjNlY2I5YzQxYmUiLCJzdWIiOiI0MjMwYjQ1NC0zMjAyLTQ3YWItYjk3Mi1kNmMyNGEzOTNiNjAiLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIiwib3BlbmlkIiwicGFzc3dvcmQud3JpdGUiLCJzY2ltLnVzZXJpZHMiXSwiY2xpZW50X2lkIjoiY2YiLCJjaWQiOiJjZiIsImdyYW50X3R5cGUiOiJwYXNzd29yZCIsInVzZXJfaWQiOiI0MjMwYjQ1NC0zMjAyLTQ3YWItYjk3Mi1kNmMyNGEzOTNiNjAiLCJ1c2VyX25hbWUiOiJuYWRtaW4iLCJlbWFpbCI6Im5hZG1pbiIsImlhdCI6MTM5O
@prysmakou
prysmakou / bosh task 2 --debug
Created August 8, 2014 08:46
bosh upload release output
Director task 2
# Logfile created on 2014-08-08 08:39:22 +0000 by logger.rb/31641
I, [2014-08-08T08:39:22.799517 #2899] INFO -- : Director Version : 1.2682.0
I, [2014-08-08T08:39:22.799596 #2899] INFO -- : Enqueuing task: 2
I, [2014-08-08T08:39:23.660362 #3247] [0x8fe878] INFO -- : Looking for task with task id 2
D, [2014-08-08T08:39:23.664025 #3247] [0x8fe878] DEBUG -- : (0.001914s) SELECT * FROM "tasks" WHERE "id" = 2
I, [2014-08-08T08:39:23.668286 #3247] [0x8fe878] INFO -- : Starting task: 2
I, [2014-08-08T08:39:23.668453 #3247] [task:2] INFO -- : Creating job
D, [2014-08-08T08:39:23.669004 #3247] [task:2] DEBUG -- : (0.000302s) SELECT * FROM "tasks" WHERE "id" = 2
I, [2014-08-08T08:39:23.669943 #3247] [task:2] INFO -- : Performing task: 2
@prysmakou
prysmakou / bosh releases
Created August 8, 2014 11:24
на голом месте...
vagrant@vagrant-ubuntu-trusty-64:~/bosh-sample-release$ bosh releases
/home/vagrant/.rvm/gems/ruby-1.9.3-p547@bosh/gems/bosh_cli-1.2682.0/lib/cli/commands/release/list_releases.rb:59:in `block (2 levels) in build_releases_table': undefined method `join' for nil:NilClass (NoMethodError)
from /home/vagrant/.rvm/gems/ruby-1.9.3-p547@bosh/gems/bosh_cli-1.2682.0/lib/cli/commands/release/list_releases.rb:57:in `each'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p547@bosh/gems/bosh_cli-1.2682.0/lib/cli/commands/release/list_releases.rb:57:in `block in build_releases_table'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p547@bosh/gems/terminal-table-1.4.5/lib/terminal-table/table.rb:210:in `yield_or_eval'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p547@bosh/gems/terminal-table-1.4.5/lib/terminal-table/table.rb:17:in `initialize'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p547@bosh/gems/terminal-table-1.4.5/lib/terminal-table/table_helper.rb:5:in `new'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p547@bosh/gems/terminal-table-1.4.5/li
@prysmakou
prysmakou / gist:38ec5b7fda9845b2feca
Created February 25, 2015 05:38
example of logstash config file
input {
# file {
# type => "syslog"
# Wildcards work here :)
# path => [ "/var/log/syslog" ]
# }
tcp {
add_field => {
"cf_type" => "app"
}
@prysmakou
prysmakou / gist:6fb77b1f87952557232c
Created March 20, 2015 08:48
sshd log on 172.16.16.200
Mar 20 11:47:03 prism sshd[1615]: debug1: Forked child 31644.
Mar 20 11:47:03 prism sshd[31644]: Set /proc/self/oom_score_adj to 0
Mar 20 11:47:03 prism sshd[31644]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Mar 20 11:47:03 prism sshd[31644]: debug1: inetd sockets after dupping: 3, 3
Mar 20 11:47:03 prism sshd[31644]: Connection from 172.23.0.245 port 50253 on 172.16.16.200 port 22
Mar 20 11:47:03 prism sshd[31644]: debug1: Client protocol version 2.0; client software version OpenSSH_6.2
Mar 20 11:47:03 prism sshd[31644]: debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000
Mar 20 11:47:03 prism sshd[31644]: debug1: Enabling compatibility mode for protocol 2.0
Mar 20 11:47:03 prism sshd[31644]: debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
Mar 20 11:47:03 prism sshd[31644]: debug1: permanently_set_uid: 111/65534 [preauth]
➜ ~ ssh -v alex@172.16.16.200
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to 172.16.16.200 [172.16.16.200] port 22.
debug1: Connection established.
debug1: identity file /Users/alex/.ssh/id_rsa type 1
debug1: identity file /Users/alex/.ssh/id_rsa-cert type -1
debug1: identity file /Users/alex/.ssh/id_dsa type -1
debug1: identity file /Users/alex/.ssh/id_dsa-cert type -1
@prysmakou
prysmakou / cc_ng
Last active August 29, 2015 14:17
Staging fails to Diego if no buildpack specified
{"timestamp":1427700090.9898112,"message":"diego.staging.finished","log_level":"info","source":"cc.stager","data":{"request_guid":"e779d0ed-f536-4c08-5c00-42f3d3bbd8fb::c688b80e-3898-49e8-b081-1e9334e479a7","response":{"app_id":"05ae3c56-7c76-4887-a011-ab92f367bffb","task_id":"79cf440c2d314f3ba78e22765a6f17f3","buildpack_key":"","detected_buildpack":"","execution_metadata":"","detected_start_command":null,"error":{"id":"StagingError","message":"staging failed"}}},"thread_id":70253698755260,"fiber_id":70253725345860,"process_id":9628,"file":"/var/vcap/packages/cloud_controller_ng/cloud_controller_ng/lib/cloud_controller/diego/staging_completion_handler_base.rb","lineno":11,"method":"staging_complete"}
{"timestamp":1427700091.0033927,"message":"(0.000408s) BEGIN","log_level":"debug2","source":"cc.db","data":{"request_guid":"e779d0ed-f536-4c08-5c00-42f3d3bbd8fb::c688b80e-3898-49e8-b081-1e9334e479a7"},"thread_id":70253698755260,"fiber_id":70253725345860,"process_id":9628,"file":"/var/vcap/packages/cloud_controll
@prysmakou
prysmakou / gist:97dd155ea8ac89617e03
Created March 27, 2015 16:09
403 Forbidden details
[1] pry(main)> compute.servers.all
----------------------------- string to sign ----------------------------------------------
"GET\n\nFri, 27 Mar 2015 16:05:11 GMT\nx-tmrk-nonce:273257886\n/api/compute/vm\n"
----------------------------- string to sign ----------------------------------------------
excon.request
:chunk_size => 1048576
:ciphers => "HIGH:!SSLv2:!aNULL:!eNULL:!3DES"
:connect_timeout => 60
:debug_request => true
:debug_response => true