Skip to content

Instantly share code, notes, and snippets.

Read from filesystem extended attributes (through diskfile.py) for a HEAD request
Written to filesystem extended attributes (through diskfile.py) as part of a POST request
To set custom object metadata - https://prosuncsedu.wordpress.com/2015/12/09/set-metadata-on-openstack-swift-objects/
swift/obj/server.py
=====================
@pauldardeau
pauldardeau / gist:c23278b694382018aa3bcf23cf6e9704
Created August 18, 2016 20:03
swift proxy server request dispatch
swift/proxy/server.py
=====================
Application#__call__
Application#handle_request
Application#get_controller
InfoController /info
AccountController (no container and no object)
ContainerController (no object)
ReplicatedObjectController (depending on policy: see ObjectControllerRouter in controllers/obj.py)
XFS - http://xfs.org/docs/xfsdocs-xml-dev/XFS_Filesystem_Structure/tmp/en-US/html/Extended_Attributes.html
The attribute names can be up to 256 bytes in length, terminated by the first 0 byte. The intent is that they be printable ASCII (or other character set) names for the attribute. The values can be up to 64KB of arbitrary binary data.
Linux - http://man7.org/linux/man-pages/man7/xattr.7.html
The VFS imposes limitations that an attribute names is limited to 255
bytes and an attribute value is limited to 64 kB.
In the current ext2, ext3, and ext4 filesystem implementations, the
total bytes used by the names and values of all of a files extended
attributes must fit in a single filesystem block (1024, 2048 or 4096
bytes, depending on the block size specified when the filesystem was
Multi-Swift
===========
What
----
What does it take to be able to run multiple Swift clusters on shared hardware?
Assumptions
-----------
(a) Each cluster would have dedicated disk drives for storing data
@pauldardeau
pauldardeau / gist:559048ef35ce57cb4fb940bfce139f0d
Last active September 13, 2016 00:23
Swift data file path decoded
Example of decoded full data file path in Swift
===============================================
/srv/node/sdb1/objects/884/963/dd001dbc81e220b9368528fc70c7b963/1471554845.30599.data
--------- ^ ^ ^ ^ ^ ---------------- ^
^ | | | | | ^ |
| | | | | | | |
| | | | | | | |
devices | | | | | | |
dir | | | | | | |
@pauldardeau
pauldardeau / contentcompression.py
Created October 3, 2016 22:51
a quick look at swift content compression middleware
# Copyright (c) 2010-2016 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Java 8 on Ubuntu 14.04
https://www.liquidweb.com/kb/how-to-install-oracle-java-8-on-ubuntu-14-04-lts/
@pauldardeau
pauldardeau / gist:744de15198f229d5170bd3acaefe52a9
Last active November 23, 2016 17:09
Swift query container listings with prefix
paul@KSController:~$ swift list e-artist-songs
Eddie-Money--Eddie-Money--Two-Tickets-To-Paradise.mp3
Eddie-Money--No-Control--No-Control.mp3
Eddie-Money--No-Control--Shakin.mp3
Elton-John--Goodbye-Yellow-Brick-Road--Bennie-and-the-Jets.mp3
Elton-John--Madman-Across-the-Water--Levon.mp3
Elvis-Costello--Best-Of-Elvis-Costello--A-Good-Year-For-The-Roses.mp3
Elvis-Costello--Best-Of-Elvis-Costello--Accidents-Will-Happen.mp3
Elvis-Costello--Best-Of-Elvis-Costello--Alison.mp3
Elvis-Costello--Best-Of-Elvis-Costello--Almost-Blue.mp3
@pauldardeau
pauldardeau / gist:8428f3f74229f041acd196a6ee2c6d10
Created December 1, 2016 23:15
Swift - thoughts on jumbo frames
IRC discussion on 12/1/2016
15:21:17 pdardeau | this is probably a dumb question, is use of jumbo frames the norm │ _JZ_
| for swift deployments? │ a1|away
15:24:17 +notmyname | pdardeau: I've heard that question before. let me ask around │ abalfour
15:26:08 pdardeau | notmyname: thanks! │ AbyssOne
15:26:11 +notmyname | pdardeau: ok, I got an answer from some our support people :-) │ acorwin_
15:27:49 +notmyname | short answer: good technical idea, generally bad operationally │ admin6
15:28:43 +notmyname | so it's probably not worth it │ agarner
15:29:15 pdardeau | notmyname: thanks! i've heard similar things in the past, but │ ahale
@pauldardeau
pauldardeau / gist:2b0557498137d921e0d0259e17c0164e
Last active December 6, 2016 22:23
Quick Intro to Ceph from Swift Perspective
Quick Intro to Ceph from Swift Perspective
- Paul Dardeau
- December 6, 2016
Major Components of Ceph
- RADOS - core part of Ceph
- librados - library for talking with RADOS
- RBD - RADOS block device
- CephFS - POSIX distributed FS interface
- RADOSGW - HTTP gateway with S3/Swift compliant API