News for hackers. Stuff that matters.
Re:I want to have an AWS region where everything breaks with... by jedberg on Monday August 10, 2020 @03:19PM (#24112963)
For those saying "Chaos Engineering", first off, the poster is well aware of Chaos Engineering. He's an AWS Hero and the founder of Tarsnap.

Secondly, this would help make CE better. I actually asked Amazon for an API to do this ten years ago when I was working on Chaos Monkey.

I asked for an API to do a hard power off of an instance. To this day, you can only do a graceful power off. I want to know what happens when the instance just goes away.

I also asked for an API to slow down networking, set a random packet drop rate, EBS failures, etc. All of these things can be simulated with software, but it's still not exactly the same as when it happens outside the OS.

Basically I want an API where I can torture an EC2 instance to see what happens to it, for science!

Re:I want to have an AWS region where everything breaks with... by dmurray on Monday August 10, 2020 @05:44PM (#24114362)
> For those saying "Chaos Engineering", first off, the poster is well aware of Chaos Engineering. He's an AWS Hero and the founder of Tarsnap.

Yeah, but did he win the Putnam?

Re:I want to have an AWS region where everything breaks with... by hitekker on Monday August 10, 2020 @06:39PM (#24114930)
Re:I want to have an AWS region where everything breaks with... by Terretta on Monday August 10, 2020 @06:44PM (#24114978)
Same thread where Drew from "getdropbox.com" says he also has a "sync and backup done right" idea...
Re:I want to have an AWS region where everything breaks with... by OJFord on Monday August 10, 2020 @07:57PM (#24115680)
Re:I want to have an AWS region where everything breaks with... by swyx on Monday August 10, 2020 @08:36PM (#24115953)
i like how the guy recovered with "Just the once, though, huh?"

2007 HN was highly entertaining

Re:I want to have an AWS region where everything breaks with... by andyjohnson0 on Tuesday August 11, 2020 @04:13AM (#24118260)
Further context for those of us not in North America: "Putnam" refers to a undergrad mathematics competition.

https://en.wikipedia.org/wiki/William_Lowell_Putnam_Mathemat...

Re:I want to have an AWS region where everything breaks with... by jedberg on Monday August 10, 2020 @06:54PM (#24115071)
He did, but that particular accolade didn't seem relevant. :)
Re:I want to have an AWS region where everything breaks with... by ValentineC on Monday August 10, 2020 @10:24PM (#24116592)
> He's an AWS Hero

I don't pay much heed to AWS Heroes. My city has an "AWS Hero" who hoarded the organization of the official AWS meetup for themself, and who is infamous for making liberal use of Cunningham's Law [1] for everything.

[1] https://meta.wikimedia.org/wiki/Cunningham%27s_Law

Re:I want to have an AWS region where everything breaks with... by cperciva on Tuesday August 11, 2020 @12:30AM (#24117171)
I don't pay much heed to AWS Heroes.

Honestly, I don't either. There's a handful of us who are technical and a huge number whose contributions are primarily marketing.

Re:I want to have an AWS region where everything breaks with... by jacquesm on Tuesday August 11, 2020 @03:54PM (#24125183)
And Colin isn't anything like that. At all. So aim that anger where it should be directed.
Re:I want to have an AWS region where everything breaks with... by qes on Tuesday August 11, 2020 @06:02PM (#24126547)
AWS Hero, Microsoft MVP.. something about those sorts of recognition seem to attract certain types of people - types seeking the limelight - often not particularly good, ethical, moral, or pleasant types.
Re:I want to have an AWS region where everything breaks with... by kitteh on Tuesday August 11, 2020 @12:03AM (#24117062)
This sounds like a legit complaint. Does anyone call them out on this?
Re:I want to have an AWS region where everything breaks with... by satya71 on Monday August 10, 2020 @05:09PM (#24114026)
I think localstack[1] gets you lot of this.

[1] https://localstack.cloud/

Re:I want to have an AWS region where everything breaks with... by nbadg on Monday August 10, 2020 @06:05PM (#24114580)
I was just about to suggest localstack. I use it religiously in personal projects; can't recommend it enough. I haven't started telling it to induce errors yet, but it definitely has that capability. And if you're running it in docker, some of the network stuff can be simulated that way as well.
Re:I want to have an AWS region where everything breaks with... by MrBuddyCasino on Tuesday August 11, 2020 @01:49AM (#24117515)
Too bad its a resource hog though. Startup time is really bad, using it via Testcontainers takes patience.
Re:I want to have an AWS region where everything breaks with... by breatheoften on Monday August 10, 2020 @04:56PM (#24113893)
Fascinating!

The mere existence of such an api would be an interesting source of problems when used accidentally/via buggy code ...

I wonder the degree to which this functionality would end up becoming relied on as a "in worst case hard kill things to recover" behavior that folks utilize for bad engineering reasons as opposed to good ones ...

Re:I want to have an AWS region where everything breaks with... by eru on Tuesday August 11, 2020 @02:24AM (#24117666)
Compare https://en.wikipedia.org/wiki/Crash-only_software and https://lwn.net/Articles/191059/

In a previous job we actually had to make a decision like this: our server software was generally stable enough, but we reset it whenever we did an update. Every once in a while it would break when running for long enough.

I opted for forcefully restarting the software every day, because I'd rather relive the pains of restarting, than to discover in production what it is like for the first time to run the system for the 501st day of uptime.

(To be honest, the system in question was mostly written in Erlang, so controlled restarts were already baked into its philosophy.)

Re:I want to have an AWS region where everything breaks with... by giancarlostoro on Monday August 10, 2020 @05:46PM (#24114380)
I would assume said code should never be part of actual deployments or only part of unit tests, maybe an external project even.
Re:I want to have an AWS region where everything breaks with... by agravier on Monday August 10, 2020 @05:51PM (#24114433)
Oh you, sweet summer child...
Re:I want to have an AWS region where everything breaks with... by drjasonharrison on Monday August 10, 2020 @08:39PM (#24115974)
Totally. I have added wifi power outlets to installations because process restart, OS restart, and hardware restart did not get a system back up and running. Yes it was a startup, and yes it was remotely installed hardware.
Re:I want to have an AWS region where everything breaks with... by tacLog on Monday August 10, 2020 @08:48PM (#24116049)
Might be a bit strange as you are saying this is a example of bad planning but my employer was discussing this today. We had a hard time finding options, what did you end up deploying or did you develop your own in house?
Re:I want to have an AWS region where everything breaks with... by mey on Monday August 10, 2020 @09:20PM (#24116253)
You want to search for "PDU remote management"

Edit: Another term is Switched PDU

Re:I want to have an AWS region where everything breaks with... by rcxdude on Tuesday August 11, 2020 @05:01PM (#24125932)
When I had this issue I just bought some cheap wifi 'smart sockets' which had some open-source firmware available and reflashed them. They even support reporting the voltage and current draw from the socket (though not particularly accurately) and toggling the power through a POST (with a password if set). Was very useful for power cycling various bits of hardware remotely.
Re:I want to have an AWS region where everything breaks with... by odonnellryan on Monday August 10, 2020 @06:24PM (#24114788)
Make it hard to accidentally call and hide it in the docs somewhere with items related to testing.
Re:I want to have an AWS region where everything breaks with... by dragonwriter on Monday August 10, 2020 @08:43PM (#24116010)
> Make it hard to accidentally call and hide it in the docs somewhere with items related to testing.

This would be more effective if so many other AWS features weren't hidden in non-obvious places in the docs.

Re:I want to have an AWS region where everything breaks with... by corobo on Tuesday August 11, 2020 @03:43AM (#24118107)
Make these functions only work in us-chaos-1
Re:I want to have an AWS region where everything breaks with... by drjasonharrison on Monday August 10, 2020 @08:37PM (#24115961)
Make it expensive.
Re:I want to have an AWS region where everything breaks with... by blaser-waffle on Tuesday August 11, 2020 @01:55PM (#24123453)
I'd imagine there is only a comparatively small (but earnest) pool of people who would want such an offering.

On top of keeping people who don't want it out, you'd need it to be expensive to offset the lower utilization.

I'd be okay with a garbage-tier, too. It's not failing on purpose, but only because no one gives a shit. Maybe that's just standard AWS?

Re:I want to have an AWS region where everything breaks with... by aloknnikhil on Monday August 10, 2020 @03:22PM (#24112995)
> I asked for an API to do a hard power off of an instance. To this day, you can only do a graceful power off. I want to know what happens when the instance just goes away.

Wouldn't just running "halt -f" do the same?

Re:I want to have an AWS region where everything breaks with... by zyamada on Monday August 10, 2020 @03:30PM (#24113093)
Possibly, but how can we be 100% sure without the ability to compare behavior? If I were following this line of research I'd still want to know if there's any difference in the nature of a failure when it comes from within the OS (possibly simulated by half -f) and the situation the parent OP pointed out where the instance just goes poof without sending any kind of signal to the OS itself.
Re:I want to have an AWS region where everything breaks with... by BillinghamJ on Tuesday August 11, 2020 @07:29AM (#24119214)
Though of course then the trouble is, if AWS is simulating specific behaviour, it won't be exactly the same as real problems when they occur. It is a bit better, but hard to say how much better.

I'd think the key on this is being able to simulate very specific partial-failure conditions. e.g. specific packet loss, loss of connections to EBS, etc. Just turning machines off I expect wouldn't be that valuable.

Re:I want to have an AWS region where everything breaks with... by jsjohnst on Tuesday August 11, 2020 @08:09AM (#24119456)
> Though of course then the trouble is, if AWS is simulating specific behaviour, it won't be exactly the same as real problems when they occur.

If Amazon simulated power failure, or network cable disconnect, or potentially even corrupt writes to disk, I personally feel it would be indistinguishable from the event really happening.

Re:I want to have an AWS region where everything breaks with... by BillinghamJ on Thursday August 13, 2020 @11:07AM (#24144096)
The problem is that they can't really realistically simulate that for a single instance unless you've got the whole physical machine to yourself, and of course the worst issues tend to be when it's half-broken, not entirely off/disconnected
Re:I want to have an AWS region where everything breaks with... by jsjohnst on Thursday August 13, 2020 @11:35PM (#24153004)
Power loss or network disconnect could easily be simulated without needing the whole physical machine.
Re:I want to have an AWS region where everything breaks with... by 0xEFF on Monday August 10, 2020 @03:38PM (#24113184)
Kernel panics work very well for this use case.

echo c > /proc/sysrq-trigger

Re:I want to have an AWS region where everything breaks with... by derefr on Monday August 10, 2020 @05:05PM (#24113976)
Maybe for testing the crash-resilience of software running on the node; but not necessarily for testing how the SDN autoscaling glop you've got configured responds to the node's death.

A panicking instance is still "alive" from its hypervisor's perspective (either it'll hang, sleep, or reboot, but it won't usually turn off its vCPU in a way the hypervisor would register as "the instance is now off"); while if a hypervisor box suffers a power cut, the rest of the compute cluster knows that the instances on that node are now very certainly off.

Re:I want to have an AWS region where everything breaks with... by kl4m on Tuesday August 11, 2020 @10:59AM (#24120967)
echo o > /proc/sysrq-trigger will shutdown a AWS instance immediately. I've used it a couple of times to make real sure my costly spot instance was terminated.

https://www.kernel.org/doc/html/v4.11/admin-guide/sysrq.html...

Re:I want to have an AWS region where everything breaks with... by derefr on Tuesday August 11, 2020 @11:27AM (#24121325)
https://elixir.bootlin.com/linux/latest/source/kernel/power/...

Looks like SysRq-o does a clean poweroff, not a dirty/immediate one — it calls kernel_power_off(), not machine_power_off().

This means, importantly, that can actually take some time to happen, as drivers get a chance to run deinitialization code. This also means that a wedged driver that doesn't respond during deinit can prevent the kernel from halting.

Thus, while SysRq-o might be useful for killing a wedged userland, it's not a panacea — especially, it isn't guaranteed to complete a shutdown for unstable kernels, or kernels with badly-written DKMS drivers attached. It's not truly equivalent to a power-cut.

Re:I want to have an AWS region where everything breaks with... by raverbashing on Monday August 10, 2020 @03:42PM (#24113223)
For reference: https://unix.stackexchange.com/a/66205 (you obviously need to be root)}
Re:I want to have an AWS region where everything breaks with... by JulianMorrison on Monday August 10, 2020 @03:33PM (#24113122)
To give an example of the difference: does it fsync() before stopping?
Re:I want to have an AWS region where everything breaks with... by jedberg on Monday August 10, 2020 @03:25PM (#24113041)
It would be really close yes, but not exactly the same as ripping the power cord out. It still gives the OS a hint that shutdown is coming.
Re:I want to have an AWS region where everything breaks with... by vetrom on Monday August 10, 2020 @05:51PM (#24114432)
Not exactly. "halt -f" depends on some variant of power management working. For extra fun, you could also have partial power-offs, like say a power cut to the motherboard, or any combination of other devices with their own power lines from a power supply. (in a current PC these would typically be PCI supplementary power, motherboard, SATA power, 4-pin 12v molex power, supplemental CPU power.)

Granted, most of those are out of scope for cloud development, but the concept of externally cutting off a VM is different than even calling whatever power service you have to cut power. In the 'real' world, enough of those failure triggers above would probably also trigger an automated power cycle if you're in a managed environment.

Re:I want to have an AWS region where everything breaks with... by fragmede on Tuesday August 11, 2020 @12:22AM (#24117132)
To elaborate a bit further - when things are fine, they're, well, fine. Unfortunately, the assumptions of how computers actually function go out of the window when enough things go wrong, like lightning striking the wrong thing. Things go weird sometimes, like the accepting TCP connections, but not sending responses. can't ping but can SSH in, or vice versa. In a cluster with automatic failover, you want to be sure the bad node is dead dead dead because a bad machine can cause harm to all the packets in the rack. (Eg HA with floating IPs and ARP takeover.) Thus the requirement is to forcefully disable the bad node, which is where the acronym STONITH comes from - Shoot The Other Node In The Head. (HA clusters with more than two nodes existed, but were rarer than 2-node clusters simply due to cost.) Before cloud computing was so pervasive, high availability was implemented with serial cables between in physical hardware and when one machine stopped responding, the equipment basically yanked its power cable out.
Re:I want to have an AWS region where everything breaks with... by DonHopkins on Tuesday August 11, 2020 @04:35AM (#24118383)
I want a stress testing feature where I can accidentally misconfigure an instance or resource somehow, then when I get an unexpectedly $10,000 higher bill at the end of the month, I can declare that I was only testing, and I don't have to pay it!
Re:I want to have an AWS region where everything breaks with... by asdff on Monday August 10, 2020 @04:29PM (#24113636)
I wonder how much you would have to pay Amazon for them to send a tech down to the datacenter and pull the plug on your running node
Re:I want to have an AWS region where everything breaks with... by yjftsjthsd-h on Monday August 10, 2020 @04:34PM (#24113682)
It's AWS; surely half of the work would be finding the server that happens to be running your instance, anonymously sitting in a datacenter with thousands of other servers. There's also the question of how many other customers' instances are located on the same hardware.
Re:I want to have an AWS region where everything breaks with... by hiyer on Monday August 10, 2020 @03:33PM (#24113127)
Today you can use spot block instances for this. They are guaranteed to die off after your chosen time block of 1-6 hours.
Re:I want to have an AWS region where everything breaks with... by jedberg on Monday August 10, 2020 @03:34PM (#24113133)
As far as I know it still sends a graceful shutdown at the end of the time block. It sends exactly the same signal as if you use the shutdown API, which is the same as pressing the power button on the front of the machine.
Re:I want to have an AWS region where everything breaks with... by recuter on Monday August 10, 2020 @04:46PM (#24113786)
Wouldn't a simple cron that disconnects the networking on an instance randomly and/or pegs all the cores be equivalent?
Re:I want to have an AWS region where everything breaks with... by jlokier on Monday August 10, 2020 @07:59PM (#24115696)
It won't simulate the block storage data loss, which is a key part of testing a database, filesystem or similar for robustness to those events.

Even killing a VM instantaneously on a host only simulates the loss of the guest OS's cache. The host OS still has its cache.

And even killing the host OS only simulates loss of the host OS's cache. The drives still have their caches powered, so might behave differently on power loss than host OS crash.

And killing a drive while the host keeps running is different again.

(And in terms of high-level software-observable data effects, abruptly killing power to a drive is not the same as slowly lowering the voltage or limiting the current to the drive, or seeing corrupt data on the I/O bus while the host system loses power (which is never instant), or... you can go quite deep with this.)

In the networked storage environment at AWS, who knows what events are possible to observe on EBS in the event of a system-level failure such as power loss in a data centre.

For example, EBS is a distributed system with replication, so if it has an implementation error that only affects certain untested, complex failure modes, it might lose recent writes in flight (as expected), but then some time later they might come back, or some of them might come back if it's sharded. Both are bad if software using it has already started state recovery after an outage. Distributed systems often have surprising incorrect recovery patterns, because it's a complex and subtle problem; that's why the Jepsen tests keep finding bugs in databases people have been using for years.

The observable events can differ depending on whether it's VM hosts, switches, block storage units, drives failing and in what ways.

For Linux guests we have abstracted away most differences we care about under fsync() or various combinations of O_DIRECT and virtual HDD cache disabling, or relying on known features of filesystems, but there's no easy way to be certain those abstractions actually provide the expected semantics on different kinds of system failure. Stress testing higher layers in the virtualization stack would go some way to verifying that they do in practice, not just in theory.

Re:I want to have an AWS region where everything breaks with... by jedberg on Monday August 10, 2020 @04:51PM (#24113836)
There are lots of ways to get a very close experience to a power pull, but nothing you can do from within the VM is quite the same as doing it outside the VM.
Re:I want to have an AWS region where everything breaks with... by recuter on Monday August 10, 2020 @05:08PM (#24114020)
I believe you but I'm curios as to the subtle difference.

To my mind simply turning off the networking, physically cutting a cable, or hardware spontaneously combusting are not discernible events to an outside observer. What am I missing?

Re:I want to have an AWS region where everything breaks with... by thejj100100 on Monday August 10, 2020 @05:22PM (#24114147)
Tasks that are writing to disk, network outage wouldn't stop the task?
Re:I want to have an AWS region where everything breaks with... by recuter on Monday August 10, 2020 @05:30PM (#24114219)
If the disk is network attached it would, and if it isn't, what difference does it make?
Re:I want to have an AWS region where everything breaks with... by hackmiester on Monday August 10, 2020 @05:36PM (#24114280)
Well, we would know that if we could try it.
Re:I want to have an AWS region where everything breaks with... by Hello71 on Monday August 10, 2020 @07:44PM (#24115570)
on a fully virtualized system, echo o > /proc/sysrq-trigger is going to be as close to a forced shutdown as you can get. that won't test hardware/firmware issues, but neither will a VM stop anyways.
Re:I want to have an AWS region where everything breaks with... by hackmiester on Monday August 10, 2020 @05:35PM (#24114271)
Surely it eventually kills you if you just ignore the signal...?! (Though of course, by that time, we've missed the point of this exercise.)
Re:I want to have an AWS region where everything breaks with... by toredash on Monday August 10, 2020 @04:16PM (#24113522)
Correct!
Re:I want to have an AWS region where everything breaks with... by eru on Tuesday August 11, 2020 @02:20AM (#24117646)
Nearly a decade ago I was working on Xen (or rather XenServer). We had lots of fun implementing these kinds of wonky devices for the virtual machines that would randomly drop network packets or fail to read the hark disk in arbitrarily bad ways.
Re:I want to have an AWS region where everything breaks with... by exdsq on Monday August 10, 2020 @03:21PM (#24112990)
Dumb question here from a CE beginner but can’t you have a Docker image for that service and turn it off?
Re:I want to have an AWS region where everything breaks with... by paranoidrobot on Monday August 10, 2020 @03:26PM (#24113044)
OS-level 'turn off' options don't replicate what happens when you yank power on a rack of equipment.

Pretty much every option you have from the OS will let caches flush, will have in-progress writes complete.

Yank the power and none of that will happen. It'll let you actually see what level of fibbing your OS and hardware are telling you.

Oh you got a result from that flush to disk? It completed? Are you sure? Really really sure? Lets find out...

Re:I want to have an AWS region where everything breaks with... by jrockway on Monday August 10, 2020 @04:46PM (#24113780)
The main result of this testing is that you'll find bugs in all the abstraction layers that you can't control. You'll then be paranoid but unable to take any action. Have you ever seen the source code that's running on your SSD's CPU? Nope. And it's probably not a small program. My guess is that it works well when everything is OK, and fails catastrophically 0.0001% of the time when everything isn't OK. But you'll never know unless you try failing catastrophically a million times. Did the vendor even try failing catastrophically one million times before they started manufacturing (or at least sent the batch to retailers)? Did they do that, fail 1 time, and mark the bug closed as non-reproducible?

I have no idea! Maybe everything is actually great. Or maybe someone else will be oncall the week you hit that one in a million failure case. Or maybe it will happen to your competitors instead of you! Without testing, all we have is hope.

Re:I want to have an AWS region where everything breaks with... by paranoidrobot on Monday August 10, 2020 @07:51PM (#24115633)
> You'll then be paranoid but unable to take any action.

I disagree.

While you can't control the bugs in the hardware or drivers or whatever, you can definitely ensure that your application detects corrupted data and can at least warn that something is wrong rather than starting back up and silently serving from corrupted data.

It also ensures that a node suddenly disappearing without a graceful "I'm leaving" message, and potentially with open transactions or other operations can be handled by the clients and nodes that ARE still around.

Re:I want to have an AWS region where everything breaks with... by jrockway on Monday August 10, 2020 @09:11PM (#24116201)
You've hit on one of my big pet peeves -- I am going to add redundancy and erasure codes at the application layer because the disk could catch on fire or be sucked up by a tornado, so why do I need a bunch of unaudited software adding extra redundancy and erasure codes behind my back?

I get it for desktop users... they want to open some benchmark they downloaded and get a higher number than their friends (RAID-0-esque sharding data across individual flash chips), and they also don't have access to software that can add error correction codes (because the Windows installer can't recognize an SSD with 4 flash chips as 4 drives in a RAID array)... so the disk has to do it itself. But why is it a thing in datacenters? Just so you can install Linux+ext2+MySQL and call it a day? That seems crazy to me when better storage software exists.

Re:I want to have an AWS region where everything breaks with... by nitrogen on Tuesday August 11, 2020 @04:08AM (#24118236)
Aren't there SSDs that go in the opposite direction and expose a key-value store instead of a linear address space? Seems like that will make reliability testing even harder.
Re:I want to have an AWS region where everything breaks with... by alexchamberlain on Monday August 10, 2020 @05:50PM (#24114421)
Even with testing, it’s still just hope; to quote Buzz Lightyear, it’s hoping with style.
Re:I want to have an AWS region where everything breaks with... by landryraccoon on Monday August 10, 2020 @06:31PM (#24114856)
I think this is too pessimistic. If all you do is test your error detection and backup recovery mechanism (of course you have backups right)? Then that’s an advantage.

Let’s say a hard power off causes data corruption that can’t be fixed. For lots of applications downtime is better than corruption, so in that case you at least will be able to test when you should take the system down and recover from a known good backup.

Re:I want to have an AWS region where everything breaks with... by IgorPartola on Monday August 10, 2020 @04:55PM (#24113889)
kill -9 on the VM process from the host?
Re:I want to have an AWS region where everything breaks with... by jedberg on Monday August 10, 2020 @03:26PM (#24113052)
If you're using Docker, yes, you can get a lot more options in testing by poking "from the outside", but that still doesn't test what happens when your docker host just dies.
Re:I want to have an AWS region where everything breaks with... by dotancohen on Monday August 10, 2020 @03:27PM (#24113062)
That's not a dumb question at all.

I'm not the GP, but I assume it is because the GP would like to run his "production" setup (or even production setup itself) under such circumstances. So far as I remember, the origin of the idea came from the Chaos Monkey which would sabotage certain services in a production environment to ensure than everything was redundant and fail safe.

Re:I want to have an AWS region where everything breaks with... by peterwwillis on Monday August 10, 2020 @06:29PM (#24114844)
> Basically I want an API where I can torture an EC2 instance to see what happens to it, for science!

  # cat > dropme.sh <<'EOFILE'
  #!/bin/sh
  set -eu
  read -r SLEEP
  tmp=`mktemp` ; tmp6=`mktemp`
  iptables-save > $tmp
  ip6tables-save > $tmp6
  for t in iptables ip6tables ; do 
    for c in INPUT OUTPUT FORWARD ; do $t -P $c DROP ; done
    $t -t nat -F ; $t -t mangle -F ; $t -F ; $t -X
  done
  sleep "$SLEEP"
  iptables-restore < $tmp
  ip6tables-restore < $tmp6
  rm -f $tmp $tmp6
  EOFILE
  # chmod 755 dropme.sh
  # ncat -k -l -c ./dropme.sh $(ifconfig eth0 | grep 'inet ' | awk '{print $2}') 12345 &
  # echo "60" | ncat -v $(ifconfig eth0 | grep 'inet ' | awk '{print $2}') 12345
If you're lucky the existing connections won't even die, but the box will be offline for 60 seconds.
Re:I want to have an AWS region where everything breaks with... by blaser-waffle on Tuesday August 11, 2020 @02:07PM (#24123595)
Not a bad script, but it's basically going "shields up!", blocking all traffic, and then taking them down. Definitely useful, but won't test for the hard stuff, like if my DB was in the middle of something and then died, scrambling my data. What's that gonna look like on reboot?
Re:I want to have an AWS region where everything breaks with... by pojzon on Monday August 10, 2020 @04:47PM (#24113795)
Did you try to setup an on premis euqalyptus cloud for that ? Eucalyptus has an api compliant with AWS api?
Re:I want to have an AWS region where everything breaks with... by jimnotgym on Monday August 10, 2020 @06:07PM (#24114593)
I really wish the world could agree on a better term than 'on premis' for 'not in the cloud'. At least 'on premises' is descriptive of the situation, although a bit clunky. On premises doesn't make any sense at all. 'Premis' is not the singular of 'premises', 'premises' is the singular of itself! I prefer 'on site', or 'self hosted' myself
Re:I want to have an AWS region where everything breaks with... by schoen on Monday August 10, 2020 @10:44PM (#24116685)
I think it's a plurale tantum

https://en.wikipedia.org/wiki/Plurale_tantum

That is, it seems to be grammatically plural but not have a distinctive singular.

     4. pl. A piece of real estate; a building and its adjuncts;
        as, to lease premises; to trespass on another's premises.
        [1913 Webster]
Re:I want to have an AWS region where everything breaks with... by simonebrunozzi on Monday August 10, 2020 @03:50PM (#24113288)
> Basically I want an API where I can torture an EC2 instance to see what happens to it, for science!

And one day there will be PETA [0] for EC2 instances!

[0]: https://www.peta.org/