Skip to content

Instantly share code, notes, and snippets.

2018-02-24 05:24:42.110 10474 ERROR cinder.volume.drivers.rbd [req-697ed7e8-c600-4774-ac75-8e4f703b2421 - - - - -] Error connecting to ceph cluster.: PermissionDeniedError: error connecting to the cluster
2018-02-24 05:24:42.110 10474 ERROR cinder.volume.drivers.rbd Traceback (most recent call last):
2018-02-24 05:24:42.110 10474 ERROR cinder.volume.drivers.rbd File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/rbd.py", line 321, in _do_conn
2018-02-24 05:24:42.110 10474 ERROR cinder.volume.drivers.rbd client.connect()
2018-02-24 05:24:42.110 10474 ERROR cinder.volume.drivers.rbd File "rados.pyx", line 785, in rados.Rados.connect (rados.c:8969)
2018-02-24 05:24:42.110 10474 ERROR cinder.volume.drivers.rbd PermissionDeniedError: error connecting to the cluster
2018-02-24 05:24:42.110 10474 ERROR cinder.volume.drivers.rbd
2018-02-24 05:24:42.112 10474 DEBUG cinder.utils [req-697ed7e8-c600-4774-ac75-8e4f703b2421 - - - - -] Failed attempt 2 _print_stop /usr/lib/python2.7/site-packages/cinder/ut
➜ demo git:(master) ✗ virtctl console testvm-nocloud --kubeconfig=/home/shiywang/.kube/config
Escape sequence is ^]
login as 'cirros' user. default password: 'gocubsgo'. use 'sudo' for root.
cirros login: root
Password:
Login incorrect
cirros login: root
Password:
Login incorrect
cirros login: cirros
➜ demo git:(master) ✗ ifconfig
br-a75bb6e277bf: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.18.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:7c:ff:d6:7c txqueuelen 0 (Ethernet)
RX packets 69474 bytes 4331479 (4.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 89674 bytes 288151546 (274.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
func Max(a, b int) int {
if a > b {
return a
}
return b
}
func Sum(i, j int, num []int) int {
package main
import (
"fmt"
)
func Min(a,b,c,d int) int {
if c < a && c < b && c < d {
return c
}
package main
import (
"fmt"
)
var max = 10000000000000
func Min(a, b int) int {
if a < b {
func Max(a, b int) int {
if a > b {
return a
}
return b
}
func backPack(idx, size int, weight []int) int {
if idx >= len(weight) {
return 0
func Max(a, b int) int {
if a > b {
return a
}
return b
}
// func solve(idx int, nums, memory []int) int {
// if idx < 0 {
// return 0
func solve(idx int, nums, memory []int) int {
if idx < 0 {
return 0
}
if memory[idx] != -1 {
return memory[idx]
}
memory[idx] = Max(nums[idx]+solve(idx-2, nums, memory), solve(idx-1, nums, memory))
return memory[idx]
}
func solve(idx int, nums []int) int {
if idx < 0 {
return 0
}
return Max(nums[idx]+solve(idx-2, nums), solve(idx-1, nums))
}
func rob(nums []int) int {
return solve(len(nums)-1, nums)
}