Skip to content

Instantly share code, notes, and snippets.

View krisis's full-sized avatar

Krishnan Parthasarathi krisis

  • San Francisco Bay Area, CA
View GitHub Profile
@krisis
krisis / analysis.md
Last active November 18, 2016 08:29
issue/3111

Test description

The python script used minio1 to perform the multipart upload. minio2 was brought down and back up while many concurrent multipart uploads were ongoing.

Backend after panic

➜  ~ tree /mnt/export/minio{1..4}/.minio.sys/multipart/kp-test-minio-py/my-boring-object-3/            
/mnt/export/minio1/.minio.sys/multipart/kp-test-minio-py/my-boring-object-3/
└── cf06534c-bcee-405c-976d-b22a3bdb71a7
    └── part.10
@krisis
krisis / mc-admin.md
Last active January 20, 2017 09:20

Management REST API

Authors

  • Anis
  • KP

Authentication

  • AWS signatureV4
  • Region can't be empty string. Currently using "minio" as constant string.

Versioning

@krisis
krisis / concurrent-upload.go
Created January 4, 2017 05:14
Go program using minio-go to upload objects in parallel
package main
import (
"fmt"
"sync"
"os"
"github.com/minio/minio-go"
)
@krisis
krisis / CopyObjectPart.hs
Created March 3, 2017 11:16
copy-object-part
#!/usr/bin/env stack
-- stack --resolver lts-6.27 runghc --package minio-hs
--
-- Minio Haskell SDK, (C) 2017 Minio, Inc.
--
-- 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
--
@krisis
krisis / listIncompleteParts.hs
Last active March 15, 2017 14:42
Test case with 1001 parts
#!/usr/bin/env stack
-- stack --resolver lts-6.27 runghc --package minio-hs --package optparse-applicative --package filepath
{-# Language OverloadedStrings, ScopedTypeVariables #-}
import Network.Minio
import Network.Minio.S3API
import Control.Monad (forM_)
import Control.Monad.Catch (catchIf)
import Data.ByteString (replicate)
@krisis
krisis / mc-admin.md
Last active March 28, 2017 08:48
Proposal for `mc admin` subcommands

Modified proposal after comments

  1. mc admin service { start | restart } ALIAS

    • remains as is
  2. mc admin info ALIAS

    • remains as is
  3. mc admin credentials [access_key] [secret_key] ALIAS

  • renamed from password
@krisis
krisis / madmin-rest.md
Last active March 5, 2023 19:25
Minio Management REST API spec

Minio Management REST API

Management APIs implement remote administrative operations over HTTP/REST. This guide is intended for SDK developers of package like madmin. If you are an enduser please take a look at mc admin CLI interface.

Authentication

  • All requests should be signed using AWS Signature Version V4
  • us-east-1 should be used in signing

API Categories

@krisis
krisis / streaming-eg.go
Last active April 19, 2017 11:54
PutObjectStreaming example
package main
import (
"flag"
"log"
"os"
minio "github.com/minio/minio-go"
)
@krisis
krisis / minio-distributed-proposal.md
Last active May 19, 2017 11:21
Minio Marathon Host IP environment variable

Problem Statement

Minio distributed setup can be configured to use upto 16 disks. These disks may be spread across upto 16 nodes (agents in Mesos). To setup distributed Minio, we need to know the (internal) IP/hostname of all the container instances before scheduling them. E.g, in a Minio distributed setup with 4 disks spread across 4 nodes with IPs IP1, IP2, IP3 and IP4 respectively, the command to run in each container is,

minio server http://IP1:9000/disk http://IP2:9000/disk http://IP3:9000/disk http://IP4:9000/disk

Multipart upload backend format proposal

Both the schema below have the following properties

  1. Crash-consistent during a completeMultipartUpload/abortMultipartUpload
  2. Concurrency-safe in presence of multiple concurrent uploads

These properties allows us to avoid fcntl(3) based locking in shared mode with FS backend.

Schema-1