Skip to content

Instantly share code, notes, and snippets.

diff --git a/swift/common/middleware/keystoneauth.py b/swift/common/middleware/keystoneauth.py
index 6a0b91b..200c05b 100644
--- a/swift/common/middleware/keystoneauth.py
+++ b/swift/common/middleware/keystoneauth.py
@@ -424,9 +424,9 @@ class KeystoneAuth(object):
# If we are not reseller admin and user is trying to delete its own
# account then deny it.
- if not container and not obj and req.method == 'DELETE':
+ if not container and not obj and req.method in ['PUT', 'DELETE']:
This file has been truncated, but you can view the full file.
swiftstack@paco-1-1:~$ sudo kinetic-swift-replicator /etc/swift/object-server.conf.d/ -o -v
object-replicator: Configuration option internal_client_conf_path not defined. Using default configuration, See internal-client.conf-sample for options
object-replicator: Running object replicator in script mode.
object-replicator: begining replication pass for '10.0.11.11:8123'
object-replicator: STDOUT: objects.01b58dbc9d589af72471d7e50f33bcb3.1436168402.19668.data.a5dc4f2c-fa71-464f-9286-859472ead253
object-replicator: STDOUT: objects.01b5a2fbbab413f34d12a29895d6c2e8.1436168261.41790.data.3b550ce4-5ce5-4396-a7a4-563fa2dc8b05
object-replicator: STDOUT: objects.01b8f0e2943843437043e0f87bc2b034.1436168280.14400.data.5b2dfd21-1e3e-4f98-8119-b54f2182deb2
object-replicator: STDOUT: objects.01b99cebc3ad9818f94f314fb447aab3.1436168287.76804.data.61862fd2-2398-4916-84b1-54d0288080a7
object-replicator: STDOUT: objects.0314046def2afa226d0f8e9c0f5400b3.1436168406.31625.data.aaa209c9-0c0c-4806-ad0a-e291caf55232
object-replicato
@charz
charz / check_object_0629.md
Last active August 29, 2015 14:23
FA is missing .durable file and can't retrieve object from object server in 40% disk failure in EC6+4

Available nodes

## qa01
swiftqa@swiftqa01:~$ ls -al /srv/node*/d*/objects-3/2170/972/87a0767a119155053615399f030dd972
total 28172
drwxr-xr-x 2 swift swift       44 Jun 25 12:55 .
drwxr-xr-x 3 swift swift       53 Jun 25 12:55 ..
-rw------- 1 swift swift 28841598 Jun 25 12:55 1435236883.13246#9.data

## qa04
@charz
charz / with_output-no-prefix (for Patch Set 1)
Last active August 29, 2015 14:16
example of --output-no-prefix (for Patch Set 1)
(pyswiftclient)[21:56][][charles@CharzMac: /tmp/test ] $ swift list charz --prefix f1/etc
f1/etc/account-server.conf-sample
f1/etc/container-reconciler.conf-sample
f1/etc/container-server.conf-sample
f1/etc/container-sync-realms.conf-sample
f1/etc/dispersion.conf-sample
f1/etc/drive-audit.conf-sample
f1/etc/memcache.conf-sample
f1/etc/mime.types-sample
f1/etc/object-expirer.conf-sample
@charz
charz / gist:903adf3e1a955133d22f
Created August 6, 2014 01:39
Test single drives with single server
TIMESTAMP=`date +%s`
for i in {1..300};
do
curl -X PUT http://192.168.1.82:6000/192.168.15.102%3A8123/270/AUTH_test/ssbench_0000${i}/${i} -H "content-type: application/data" -H "x-timestamp: ${TIMESTAMP}" -T testfile_1KB &
done
wait
@charz
charz / gist:d02c8cacbd241339e87d
Created August 6, 2014 01:35
Connection closed by peer
Aug 5 18:29:56 kin-paco02 object-server: ERROR __call__ error with PUT /192.168.15.102%3A8123/270/AUTH_test/ssbench_0000207/207 : #012Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/swift/obj/server.py", line 682, in __call__#012 res = method(req)#012 File "/usr/local/lib/python2.7/dist-packages/swift/common/utils.py", line 2422, in wrapped#012 return func(*a, **kw)#012 File "/usr/local/lib/python2.7/dist-packages/swift/common/utils.py", line 1023, in _timing_stats#012 resp = func(ctrl, *args, **kwargs)#012 File "/usr/local/lib/python2.7/dist-packages/swift/obj/server.py", line 391, in PUT#012 orig_metadata = disk_file.read_metadata()#012 File "/usr/local/lib/python2.7/dist-packages/swift/obj/diskfile.py", line 1353, in read_metadata#012 with self.open():#012 File "/usr/local/lib/python2.7/dist-packages/kinetic_swift-0.1-py2.7.egg/kinetic_swift/obj/server.py", line 139, in open#012 self._read()#012 File "/usr/local/lib/python2.7/dist-packages/kinet
@charz
charz / 1_upgrade_kernel.sh
Last active August 29, 2015 13:57
A batch files to install docker in ubuntu 12.04
#!/bin/bash
# install the backported kernel
sudo apt-get update
sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
# reboot
sudo reboot
@charz
charz / .prompt
Created March 4, 2014 08:20
My console prompt
# add git prompt, charles
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local LBLUE="\[\033[1;34m\]"
local RED="\[\033[0;31m\]"
local LRED="\[\033[1;31m\]"
@charz
charz / .vimrc
Last active August 29, 2015 13:56
My vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'Lokaltog/vim-easymotion'
@charz
charz / release_archive
Created January 23, 2014 03:08
Create a zip archive with git version
#!/bin/bash
SRC=pkg-name
VER=`cd ${SRC}; git describe`
echo 'Try to pack: '${VER}
cp -a ${SRC} ${SRC}_v${VER}
tar czvf ${SRC}_v${VER}.tar.gz --exclude .git --exclude ".git*" ${SRC}_v${VER}