Skip to content

Instantly share code, notes, and snippets.

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
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']:
#!/bin/bash
TOKEN=AUTH_tk025422bc77c24bd0b123661e610f6c0c
ACCOUNT=$1
CONTANER=$2
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat "${CONTAINER}1" a1
echo
swift --os-auth-token ${TOKEN} --os-storage-url http://192.168.200.21/v1/AUTH_${ACCOUNT} stat "${CONTAINER}2" a2
$ dpkg -l |grep iotop
ii iotop 0.4.4-4 simple top-like I/O monitor
(test-iotop)$ python
Python 2.7.3 (default, Dec 18 2014, 19:10:20)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import iotop
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
@charz
charz / s3etag.sh
Created August 30, 2016 04:25 — forked from emersonf/s3etag.sh
A Bash script to compute ETag values for S3 multipart uploads on OS X.
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Usage: $0 file partSizeInMb";
exit 0;
fi
file=$1
if [ ! -f "$file" ]; then
@charz
charz / .bahs_profile
Created October 24, 2016 06:00
.ss_profile
if [ -f ~/.alias ]; then
. ~/.alias
fi
if [ -f ~/.prompt ]; then
. ~/.prompt
fi
if [ -f ~/.ss_profile ]; then
[root@fuel ~]# update-prepare prepare env 22
Warning: Permanently added '10.20.0.7' (ECDSA) to the list of known hosts.
W: Failed to fetch http://10.20.0.2:8080/mirrors/mos-repos/ubuntu/8.0/dists/mos8.0/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://10.20.0.2:8080/mirrors/mos-repos/ubuntu/8.0/dists/mos8.0/restricted/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://10.20.0.2:8080/mirrors/mos-repos/ubuntu/8.0/dists/mos8.0-security/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://10.20.0.2:8080/mirrors/mos-repos/ubuntu/8.0/dists/mos8.0-security/restricted/binary-amd64/Packages 404 Not Found
@charz
charz / 1.fuel2 command
Last active November 4, 2016 10:10
Upgrade operational MOS 8.0 env to MOS 9.1
[root@fuel ~]# fuel2 env redeploy --noop 22
Deployment task with id 570 for the environment 22 has been started.
[root@fuel ~]# fuel2 task show 570
+------------+--------------------------------------+
| Field | Value |
+------------+--------------------------------------+
| id | 570 |
| uuid | 9da95690-6a0c-4061-8d72-2eebcf46f965 |
| status | running |
@charz
charz / internal_logs.py
Created February 14, 2018 02:51 — forked from clayg/internal_logs.py
dig around in internal logs account
#!/usr/bin/env python
import argparse
import logging
import sys
import thread
import threading
from Queue import Queue
from datetime import datetime, timedelta
import hashlib
import sys
def etag_checksum_s3(filename, chunk_size=6 * 1024 * 1024):
md5s = []
with open(filename, 'rb') as f:
for data in iter(lambda: f.read(chunk_size), b''):
md5s.append(hashlib.md5(data).digest())
print("s3api segment(hex): %s"% hashlib.md5(data).hexdigest())