!atvIbxHoEqNcAIxYpN:nixos.org

NixOS AWS

64 Members
15 Servers

Load older messages


SenderMessageTime
25 Sep 2024
@commiterate:matrix.orgcommiterate *

That's the default case for an EC2-initiated shutdown. What the docs aren't clear about is an instance-initiated shutdown (e.g. we poll IMDS's autoscaling/target-lifecycle-status and do an instance-initiated shutdown by running shutdown when we see Terminated as the target state).

They also aren't clear about what they do if the instance goes into terminated before the lifecycle hook timeout and we don't call CompleteLifecycleAction).

20:27:50
@commiterate:matrix.orgcommiterate *

That's the default case for an EC2-initiated shutdown. What the docs aren't clear about is an instance-initiated shutdown (e.g. we poll IMDS's autoscaling/target-lifecycle-status and do an instance-initiated shutdown by running shutdown when we see Terminated as the target state).

They also aren't clear about what they do if the instance goes into terminated before the lifecycle hook timeout and we don't call CompleteLifecycleAction.

20:36:50
@arianvp:matrix.orgArianI think for instance instanitated shutdown it's just the Lifecycle hook timeout that matters 21:11:02
@arianvp:matrix.orgArianLike systemd doesn't send any signal to the hardware when you call systemctl poweroff. It will only do the poweroff after all the services actually stopped21:11:34
@arianvp:matrix.orgArianIf you have a systemd inhibit or a service that just takes an hour to shut down. There is no way for EC2 to know the machine is shutting down21:12:07
@arianvp:matrix.orgArianSo the machine will be shut down my ec2 after the lifecycle hook timeout21:12:45
@commiterate:matrix.orgcommiteratekk. I'm checking with ASG and EC2 just in case but that's what I'm suspecting as well.21:52:46
1 Oct 2024
@-_o:matrix.org-_o joined the room.21:03:49
6 Oct 2024
@arianvp:matrix.orgArianI have a WIP new image builder that uses grub in hybrid mode16:16:23
@arianvp:matrix.orgArianSo we can have 1 image for EFI and BIOS16:16:31
@arianvp:matrix.orgArianEventually I wanna drop bios completely. But too many image types still around that don't support nitro..16:17:09
10 Oct 2024
@arianvp:matrix.orgArian

I'm in a bit of a pickle. So I want to stop uploading legacy-bios AMIs and always have a EFI System Partition. (So the bootmode of the AMIs will change to uefi-preferred).

However existing EC2 instances that were booted with an old AMI will not have an ESP... So I can't outright remove the code.

12:50:16
@arianvp:matrix.orgArian I guess I can make it depend on stateVersion but it's so ugly... However forcing people to create their AWS instances to update to 24.11 seems harsh. 12:50:43
@p4cmanus3r:matrix.orgp4cmanus3r joined the room.13:25:15
11 Oct 2024
@commiterate:matrix.orgcommiterateWould it matter given that to use the new AMI, they're either replacing the root volume or launching a new instance?02:33:55
@commiterate:matrix.orgcommiterate * Would it matter given that to use the new AMI, they're either replacing the root volume (which has both the ESP and root partitions) or launching a new instance?02:39:19
@arianvp:matrix.orgArianIf you use a new AMI it is no problem06:29:24
@arianvp:matrix.orgArianProblem is people doing nixos-rebuild switch on an existing instance 06:29:51
@arianvp:matrix.orgArian commiterate: do you know if we need the AWS networkd stuff for EC2 instance connect endpoint? 13:32:35
@arianvp:matrix.orgArianIIRC it works by adding a new ENI to the instance. I don't think our AMI manages that ENI so idk if it works out of the box13:32:53
@arianvp:matrix.orgArianah nope just works! sick19:46:55
@commiterate:matrix.orgcommiterate
In reply to @arianvp:matrix.org
Problem is people doing nixos-rebuild switch on an existing instance

Wait are the AMIs tracking the ami repo for something?

If they nixos-rebuild switch, I don't see what would go awry if they're just tracking the normal NixOS channels like any regular user.

21:55:02
@commiterate:matrix.orgcommiterate
In reply to @arianvp:matrix.org
Problem is people doing nixos-rebuild switch on an existing instance
*

Wait are the AMIs tracking the ami repo for something?

If they nixos-rebuild switch, I don't see what would go awry if they're just tracking the normal NixOS channels like any regular user and using their local configuration.nix (which I'm assuming doesn't have any inputs from the ami repo).

21:56:00
@commiterate:matrix.orgcommiterate *

Wait are the AMIs tracking the ami repo for something?

If they nixos-rebuild switch, I don't see what would go awry if they're just tracking the normal NixOS channels like any regular system and using their local configuration.nix (which I'm assuming doesn't have any inputs from the ami repo).

21:56:35
@commiterate:matrix.orgcommiterate *

Wait are the AMIs' configuration.nix files tracking the ami repo for something?

If they nixos-rebuild switch, I don't see what would go awry if they're just tracking the normal NixOS channels like any regular system and using their local configuration.nix (which I'm assuming doesn't have any inputs from the ami repo).

21:57:02
@commiterate:matrix.orgcommiterateNope. EIC itself just works by having an OpenSSH AuthorizedKeysCommand program which calls IMDS (has EIC endpoints that return SSH keys, just like regular EC2 Key Pairs).21:58:30
@commiterate:matrix.orgcommiterateI need to follow up next week to see if they're willing to take ownership of my Go rewrite over the existing Bash script abomination. https://github.com/commiterate/amazon-ec2-ssh-utils21:59:12
@commiterate:matrix.orgcommiterate *

I need to follow up next week to see if they're willing to take ownership of my Go rewrite to replace the existing Bash script abomination.

https://github.com/commiterate/amazon-ec2-ssh-utils

21:59:55
@commiterate:matrix.orgcommiterate * Nope. EIC itself just works by having an OpenSSH AuthorizedKeysCommand program which calls IMDS (has EIC endpoints that return SSH keys, just like regular EC2 Key Pairs) and just writes an OpenSSH authorized keys file contents to stdout. 22:02:02
@commiterate:matrix.orgcommiterate * Nope. EIC itself just works by having an OpenSSH AuthorizedKeysCommand program which calls IMDS (has EIC endpoints that return SSH keys, just like regular EC2 Key Pairs) and just writes OpenSSH authorized keys file contents to stdout. 22:02:15

Show newer messages


Back to Room ListRoom Version: 10