Skip to content

Instantly share code, notes, and snippets.

View kunthar's full-sized avatar
🖖
live long and prosper

Gokhan Boranalp kunthar

🖖
live long and prosper
View GitHub Profile
@kunthar
kunthar / gist:9e934497126309d924c3
Created September 9, 2015 13:05
caf compile steps
sudo port install cmake
gcc --version (gcc (MacPorts gcc49 4.9.3_0) 4.9.3)
which gcc (/opt/local/bin/gcc)
./configure --with-gcc=/opt/local/bin/g++
make
sudo make install
ls /usr/local/include/caf/ (files exist)
@kunthar
kunthar / make dev1
Created September 20, 2015 10:53
nkcluster error
λ kunthar : make dev1
erl -config util/dev1.config -args_file util/dev_vm.args \
-name dev1@127.0.0.1 -s nkcluster_app
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.4 (abort with ^G)
(dev1@127.0.0.1)1> 13:49:16.276 [notice] NkPACKET v0.4.0 has started.
=INFO REPORT==== 20-Sep-2015::13:49:16 ===
alarm_handler: {set,{system_memory_high_watermark,[]}}
@kunthar
kunthar / console output
Created September 20, 2015 10:59
nkcluster make
λ kunthar : make
./rebar get-deps
==> nkcluster (get-deps)
Pulling nkdist from {git,"https://github.com/Nekso/nkdist.git",
{branch,"develop"}}
Cloning into 'nkdist'...
Pulling nkpacket from {git,"https://github.com/Nekso/nkpacket.git",
{branch,"develop"}}
Cloning into 'nkpacket'...
Pulling nkdocker from {git,"https://github.com/Nekso/nkdocker.git",
~/development/erlang/nkcluster
λ kunthar : make
./rebar get-deps
==> nkcluster (get-deps)
Pulling nkdist from {git,"https://github.com/Nekso/nkdist.git",{tag,"v0.1.0"}}
Cloning into 'nkdist'...
Pulling nkpacket from {git,"https://github.com/Nekso/nkpacket.git",
{tag,"v0.4.0"}}
Cloning into 'nkpacket'...
Pulling nkdocker from {git,"https://github.com/Nekso/nkdocker.git",
@kunthar
kunthar / gist:7031835
Created October 17, 2013 20:40
Docker in action
root@panel /home/kunthar # uname -a
Linux panel.xxxxx.com 3.8.0-31-generic #46~precise1-Ubuntu SMP Wed Sep 11 18:21:16 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
root@panel /home/kunthar # docker pull base:latest
Pulling repository base
b750fe79269d: Download complete
27cf78414709: Download complete
root@panel /home/kunthar # docker images
REPOSITORY TAG ID CREATED SIZE
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.6G 1023M 2.6G 29% /
devtmpfs 42M 0 42M 0% /dev
tmpfs 122M 0 122M 0% /dev/shm
tmpfs 122M 8.4M 113M 7% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 122M 0 122M 0% /sys/fs/cgroup
root@FriendlyARM:~# uname -a
@kunthar
kunthar / quicksort.py
Created March 14, 2017 11:59
quicksort-with-lambda
def qsort(get_list):
if len(get_list) < 2:
return get_list
pivot = get_list.pop()
left = list(filter(lambda x: x <= pivot, get_list))
right = list(filter(lambda x: x > pivot, get_list))
return qsort(left) + [pivot] + qsort(right)
body = buffer.getvalue()
# Body is a string in some encoding.
# In Python 2, we can print it without knowing what the encoding is.
print(body)
Brief:
Instance failed block device setup
UnsupportedCinderAPIVersion: Nova does not support Cinder API version 1
Long form:
2017-05-22 15:30:44.317 2427 ERROR nova.compute.manager [req-b8bc9605-2b27-44b9-9e6d-c46712d619a6 028fac36ed63406bb2cff9abf31b2b51 91fd6f62d8f64338b5e923803f2bd1b5 - - -] [instance: aedf90ce-5a0c-48a3-98ee-1a6acf65a97b] Instance failed block device setup
2017-05-22 15:30:44.317 2427 ERROR nova.compute.manager [instance: aedf90ce-5a0c-48a3-98ee-1a6acf65a97b] Traceback (most recent call last):
2017-05-22 15:30:44.317 2427 ERROR nova.compute.manager [instance: aedf90ce-5a0c-48a3-98ee-1a6acf65a97b] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1584, in _prep_block_device
2017-05-22 15:30:44.317 2427 ERROR nova.compute.manager [instance: aedf90ce-5a0c-48a3-98ee-1a6acf65a97b] wait_func=self._await_block_device_map_created)
2017-05-22 15:30:44.317 2427 ERROR nova.compute.manager [instance: aedf90ce-5a0c-48a3-98ee-1a6acf65a97b] File "/usr/lib/python2.7/dist-pack
openstack project list
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| 077d2b52bc9e44a0b6d4396149309649 | demo |
| 7db9f9efe47e48e1936510d907dd198f | admin |
| 91fd6f62d8f64338b5e923803f2bd1b5 | ulakbus |
| ebc3e73ea4524a0e95ce776eaaeac79c | service |
+----------------------------------+---------+