!atvIbxHoEqNcAIxYpN:nixos.org

NixOS AWS

64 Members
16 Servers

Load older messages


SenderMessageTime
21 Oct 2024
@arianvp:matrix.orgArianOh i remember what happened here.07:12:01
@arianvp:matrix.orgArianI think eu-west-2 was accidentally nuked by the infra team07:12:23
@arianvp:matrix.orgArian* I think eu-west-1 was accidentally nuked by the infra team07:14:25
@arianvp:matrix.orgArianBut that ticket is super out of date. Since 24.05 everything should be available 07:18:24
@arianvp:matrix.orgArianhttps://github.com/NixOS/nixpkgs/issues/307519#issuecomment-242582107807:18:37
@arianvp:matrix.orgArianHow about we make networkd the new default networking backend for 24.11 as a first step to this?11:30:04
@arianvp:matrix.orgArianI can send a PR for that11:30:16
@nh2:matrix.orgnh2
In reply to @arianvp:matrix.org
I think eu-west-1 was accidentally nuked by the infra team
I see. Note that the same is also the case for eu-central-1 now (when I think it wasn't before), just to make sure you know
15:39:12
@arianvp:matrix.orgArianAs I said. That list is deprecated. Use https://nixos.github.io/amis instead 16:26:20
@arianvp:matrix.orgArianWe can't use AWS for archival. They don't allow you to make public images available forever. They disappear after max period of a year16:26:45
@arianvp:matrix.orgArianSo use the docs linked to query the latest AMI. Anything else is unsupported 16:27:01
@arianvp:matrix.orgArianI also have no control over that old AWS account. I only have access to the new one. 16:27:33
@arianvp:matrix.orgArian* We can't use AWS for archival. They don't allow you to make public images available forever. They disappear after max period of a year16:27:41
@arianvp:matrix.orgArianI only took over maintainace for 24.05 onwards. There aren't really any guarantees I can give over the old stuff. 16:28:17
@arianvp:matrix.orgArianWouldn't be surprised all those images disappear at some point 16:30:13
@arianvp:matrix.orgArianIs there a particular reason why you need a 23.05 image instead of a supported image?16:33:08
@nh2:matrix.orgnh2

Arian: I see.

Yes, my reason is that I need to migrate some older 23.05 NixOps deployments to newer NixOS.
For that to work well, I intended to start the old and new ones and compatibility-test them.
This does not work, because the AMIs are gone.
It betrays the entire point of fully declarative infrastructure-as-code that one cannot re-deploy the same thing at a later time.
Especially if it's only 1 year old.

I understand this isn't your or any NixOS contributor's fault, especially if AWS deletes public AMIs (no idea why they would do that, what is the point?).
You're referring to this, right?
https://aws.amazon.com/about-aws/whats-new/2022/03/amazon-machine-images-public-visibility-two-years/

But it also means that the way NixOps is written is completely unsuitable, and I'm not sure a lot of NixOps authors, contributors, or users are aware of this.
If public AMIs aren't a thing to last, NixOps should build an AMI itself an upload it.
(Probably people thought that they were a thing to last when that code was written.)
Indeed, no tool trying to provide reproducible deployments should be looking up AMIs from any list -- neither the old file amazon-ec2-amis.nix that you deleted, nor the new list at https://nixos.github.io/amis.

23:18:38
22 Oct 2024
@nh2:matrix.orgnh2

Completely independent question:

When I try to use NixOps to launch any newer AMI (it uses RunInstances), AWS errors with HTTP 400:

The parameter MetadataOptions is not recognized

I was puzzled by this, because I reproduced it curl where it also failed, and the request does not include the word MetadataOptions at all.
I just figured out that it seems to depend on the AMI launched.

AMIs for which this works/fails:

ami-0d6ee9d5e1c985df6   23.05.eu-central-1.x86_64-linux.hvm-ebs      WORKS
ami-0e7d1823ac80520e6   nixos/23.11.4976.79baff8812a0-x86_64-linux   ERRORS with `The parameter MetadataOptions is not recognized`
ami-0909c997a483185ec   nixos/23.11.7329.59a450646ec8-x86_64-linux   ERRORS with `The parameter MetadataOptions is not recognized`
ami-067999b24522c01c1   nixos/24.05.5809.4eb33fe664af-x86_64-linux   ERRORS with `The parameter MetadataOptions is not recognized`

Does anybody know what in the AMI could cause this?

00:03:44
@arianvp:matrix.orgArianI thought NixOps is unmaintained. I think they even removed the AWS plugin recently 00:16:31
@arianvp:matrix.orgArianMetadata options is part of the AMI. Sec00:16:47
@arianvp:matrix.orgArianI wonder if it's related to this line: ImdsSupport="v2.0",00:17:47
@arianvp:matrix.orgArianhttps://github.com/NixOS/amis/blob/main/upload-ami/src/upload_ami/upload_ami.py#L17300:17:53
@arianvp:matrix.orgArianHmm actually I think maybe NixOps uses a very old version of the AWS SDK that is maybe incompatible with the AWS API?00:19:26
@arianvp:matrix.orgArianCan you show me the raw curl command?00:19:43
@arianvp:matrix.orgArianThe only hit on google is this one stack overflow issue : https://stackoverflow.com/questions/76495875/cant-provision-ec2-instance-with-ansible00:23:03
@arianvp:matrix.orgArianYou're not on EC2 classic or something weird right? (The old VPC-less EC2)00:25:59
@arianvp:matrix.orgArianSo yeh because the AMI sets that option, i think that causes an implicit MetadataOptions to be passed. However IMDSv2 is new. So maybe you're using a very old SDK. The EC2 API is versioned (See the Version parameter in the curl request)00:36:06
@arianvp:matrix.orgArianSo maybe if you are trying to spawn an instance with IMDSv2 enabled using the older API version you get this error00:36:35
@arianvp:matrix.orgArianAdvice here is: update boto3 00:39:34
@arianvp:matrix.orgArian* Advice here is: update boto3 dependency of nixops 00:39:44

Show newer messages


Back to Room ListRoom Version: 10