Skip to content

Instantly share code, notes, and snippets.

# Current implementation (Broken).
# Doesn't ensure that the tag value of 'aws:autoscaling:groupName'
# is actually the name of the autoscaling group
def ec2_instances
instances = EC2::InstanceCollection.new(:config => config)
instances.tagged('aws:autoscaling:groupName').tagged_values(name)
end
# Proposed fix. Works but is really slow.
def fixed_but_inefficient_ec2_instances
public void disableCampaignForDailyBudgetReachedIfNeeded(
Constrainable campaign, Long newSpend, Long snapSpentMicros) {
/*
* Checking if campaign is over daily budget. Disable if necessary.
*/
if (!constraintCheckingService.isCampaignDisabled(campaign)
&& constraintCheckingService.isDailyBudgetReached(campaign, newSpend,
snapSpentMicros)) {
disablingService.disableCampaignForDailyBudgetReached(campaign);
LOGGER.debug("Disabling campaign ({}), for daily budget reached",
diff --git a/src/main/java/com/rightaction/shared/protobuf/Maxmind.java b/src/main/java/com/rightaction/shared/protobuf/Maxmind.java
index 38804cf..c3a4aec 100644
--- a/src/main/java/com/rightaction/shared/protobuf/Maxmind.java
+++ b/src/main/java/com/rightaction/shared/protobuf/Maxmind.java
@@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: src/main/resources/maxmind.proto
+// source: maxmind.proto
package com.rightaction.shared.protobuf;
[2013-03-27 13:33:24,732] WARN [jetty-exchange-162] (HttpParser.java:1032) : Full [1921501185,-1,m=350,g=6144,p=6144,c=6144]={5F5F75746D613D33393139393030392E3833313239343635342E313334373339393935312E313335313632353835382E313335313633323233362E3134353B205F5F75746D7A3D33393139393030392E313335313633323233362E3134352E3134342E75746D6373723D76696473617665722D612E616B616D616968642E6E65747C75746D63636E3D28726566657272616C297C75746D636D643D726566657272616C7C75746D6363743D2F7373612F31372F3B2069683D226221212125212123284966212121212C3E2761255421275D3D7621212121233E25377054212D532C44212121212F3E2748684B212D534175212121212D3E27486636212E766A7221212121233E25374A66213027713721212121243E282938782130436B5D212121214E3E282E596821316A212421212121233E25374841213239354A21212121273E27536B6C2132393C76212121215A3E2753632A213254242C21212121283E25395857213328782B21212121233E2538442721332E6171212121212C3E25357934213336717821212121233E2829392B213336717921212121233E25375F702133524D4221212121233E2538434C2133673761212121214E3E282E596821336
[2013-03-11T15:34:17+00:00] INFO: Processing service[collectd] action restart (ra_graphite::client line 47)
================================================================================
Error executing action `restart` on resource 'service[collectd]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /etc/init.d/collectd start ----
ec2-50-19-5-134.compute-1.amazonaws.com # In /var/chef/cache/cookbooks/ra_graphite/recipes/client.rb
ec2-50-19-5-134.compute-1.amazonaws.com
ec2-50-19-5-134.compute-1.amazonaws.com 46: service 'collectd' do
ec2-50-19-5-134.compute-1.amazonaws.com 47: action :restart
ec2-50-19-5-134.compute-1.amazonaws.com 48: end
ec2-50-19-5-134.compute-1.amazonaws.com
ec2-50-19-5-134.compute-1.amazonaws.com Compiled Resource:
ec2-50-19-5-134.compute-1.amazonaws.com
ec2-50-19-5-134.compute-1.amazonaws.com ------------------
ec2-50-19-5-134.compute-1.amazonaws.com # Declared in /var/chef/cache/cookbooks/ra_graphite/recipes/client.rb:46:in `from_file'
[2013-02-22 16:11:11,187] ERROR [inventory_update_thread-1] (InventorySweepJob.java:142) : SOMETHING WEIRD IS GOIN ON!!!
java.lang.AbstractMethodError: com.rightaction.couchbase.store.constraint.CouchbaseConstraintStoreAsync.getTotalBudget(Ljava/lang/String;)Ljava/lang/Long;
at com.rightaction.constraint.budgeting.BudgetingService.needsTotalBudgetAlertSent(BudgetingService.java:138)
at com.rightaction.constraint.budgeting.BudgetingService.sendTotalBudgetAlertIfNeeded(BudgetingService.java:83)
at com.rightaction.constraint.job.inventory.InventorySweepJob.process(InventorySweepJob.java:125)
at com.rightaction.constraint.job.inventory.InventoryUpdateJob.attemptRelayAndSweep(InventoryUpdateJob.java:120)
at com.rightaction.constraint.job.inventory.InventoryUpdateJob.run(InventoryUpdateJob.java:73)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
ec2-50-19-34-128.compute-1.amazonaws.com GET http://rubygems.org/specs.4.8.gz
ec2-50-19-34-128.compute-1.amazonaws.com 302 Moved Temporarily
ec2-50-19-34-128.compute-1.amazonaws.com GET http://production.s3.rubygems.org/specs.4.8.gz
ec2-50-19-34-128.compute-1.amazonaws.com 200 OK
ec2-50-19-34-128.compute-1.amazonaws.com GET http://rubygems.org/quick/Marshal.4.8/chef-10.18.2.gemspec.rz
ec2-50-19-34-128.compute-1.amazonaws.com 302 Moved Temporarily
ec2-50-19-34-128.compute-1.amazonaws.com GET http://production.cf.rubygems.org/quick/Marshal.4.8/chef-10.18.2.gemspec.rz
ec2-50-19-34-128.compute-1.amazonaws.com 200 OK
ec2-50-19-34-128.compute-1.amazonaws.com GET http://rubygems.org/latest_specs.4.8.gz
ec2-50-19-34-128.compute-1.amazonaws.com 302 Moved Temporarily
Normal Arguments:
<stage> - The stage that you wish to deploy to. The following are acceptable options:
'development' - Dumbass virtual box deployment. Never use this because virtual box sucks.
'staging' - Deploys to staging cluster.
'production' - Deploys to production cluster.
[2013-01-17 18:54:12,485] ERROR [jetty-bidder-279] (MaxMindLocationServiceImpl.java:102) : Unable to parse >unknown<
java.net.UnknownHostException: unknown
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)
at java.net.InetAddress.getAllByName0(InetAddress.java:1153)
at java.net.InetAddress.getAllByName(InetAddress.java:1083)
at java.net.InetAddress.getAllByName(InetAddress.java:1019)
at java.net.InetAddress.getByName(InetAddress.java:969)
at com.rightaction.shared.maxmind.MaxMindLocationServiceImpl.getLocation(MaxMindLocationServiceImpl.java:100)