Skip to content

Instantly share code, notes, and snippets.

View pcting's full-sized avatar

Patrick Ting pcting

View GitHub Profile
@pcting
pcting / gist:843327
Created February 25, 2011 03:24
set-admin-password.ps1, Powershell script to reset the admin password for Eucalyptus instances
param(
[int] $len = 6,
[string] $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"
)
$bytes = new-object "System.Byte[]" $len
$rnd = new-object System.Security.Cryptography.RNGCryptoServiceProvider
$rnd.GetBytes($bytes)
$result = ""
for( $i=0; $i -lt $len; $i++ )
{
@pcting
pcting / gist:843293
Created February 25, 2011 02:33
s3cmd 0.9.9.91 patch for eucalyptus
diff -cr -r /usr/share/s3cmd/S3/ACL.py ./S3/ACL.py
*** /usr/share/s3cmd/S3/ACL.py 2009-01-07 04:16:32.000000000 -0800
--- ./S3/ACL.py 2011-02-24 17:57:20.583095822 -0800
***************
*** 31,37 ****
return self.tag == "URI" and self.name == Grantee.ALL_USERS_URI
def isAnonRead(self):
! return self.isAllUsers and self.permission == "READ"
@pcting
pcting / gist:785914
Created January 19, 2011 09:38
Flume S3 Sink Failure
2011-01-19 09:34:32,592 [logicalNode nginx_log_collector-20] INFO hdfs.EscapedCustomDfsSink: Opening s3n://XXX/logs/mediasites/date=2011-01-19/hour=09/site=XXX/XXX-log.00000020.20110119-093416586+0000.29141563286990.seq
2011-01-19 09:34:32,592 [logicalNode nginx_log_collector-20] INFO rolling.RollSink: closing RollSink 'collectorSink'
2011-01-19 09:34:32,593 [Roll-TriggerThread-5] WARN rolling.RollSink: TriggerThread interrupted
2011-01-19 09:34:32,593 [logicalNode nginx_log_collector-20] DEBUG collector.CollectorSink: Roll closed, pushing acks for log.00000020.20110119-093416586+0000.29141563286990.seq :: []
2011-01-19 09:34:32,593 [logicalNode nginx_log_collector-20] INFO debug.StubbornAppendSink: Opening Stubborn Append Sink com.cloudera.flume.handlers.debug.StubbornAppendSink@178460d
2011-01-19 09:34:32,593 [logicalNode nginx_log_collector-20] INFO rolling.RollSink: opening RollSink 'collectorSink'
2011-01-19 09:34:32,594 [logicalNode nginx_log_collector-20] INFO debug.InsistentOpenDecorator: Opened Mask
2011-01-18 19:39:09,166 INFO com.cloudera.flume.handlers.hdfs.EscapedCustomDfsSink: Opening s3n://XXX/logs/mediasites/date=2011-01-18/hour=19/site=XXX/XXX-log.00000019.20110118-193809143+0000.501707223589.seq
2011-01-18 19:39:09,191 INFO com.cloudera.flume.handlers.rolling.RollSink: closing RollSink 'collectorSink'
2011-01-18 19:39:09,192 WARN com.cloudera.flume.handlers.rolling.RollSink: TriggerThread interrupted
2011-01-18 19:39:09,192 INFO com.cloudera.flume.handlers.debug.StubbornAppendSink: Opening Stubborn Append Sink com.cloudera.flume.handlers.debug.StubbornAppendSink@6295eb
2011-01-18 19:39:09,192 INFO com.cloudera.flume.handlers.rolling.RollSink: opening RollSink 'collectorSink'
2011-01-18 19:39:09,193 INFO com.cloudera.flume.handlers.debug.InsistentOpenDecorator: Opened MaskDecorator on try 0
2011-01-18 19:39:09,193 INFO com.cloudera.flume.handlers.debug.StubbornAppendSink: Opening Stubborn Append Sink com.cloudera.flume.handlers.debug.StubbornAppendSink@6295eb
2011-01-18 19:39:09,193 INFO com.clo