netz
netz copied to clipboard
Non-existant AMI - cannot run netz
Hi all,
Getting this error when attempting to run netz on AWS:
[2022-08-08 02:14:47] DEBUG aws going to create ec2 instance
[2022-08-08 02:14:47] ERROR InvalidAMIID.NotFound: The image id '[ami-02649d71054b25d22]' does not exist
status code: 400, request id: 207603a5-b3e6-439f-9724-6a350a5034ff
Any advice? Thanks!
Hi @cyn8 we're accepting PRs, The line you need to change is here: https://github.com/SpectralOps/netz/blob/7c75f16d6d701804b61ede0f228d930818f6ead4/cloud/resource_manager.go#L175 Just have it accept an ENV variable would be OK.
From my understanding, an AMI provides information required to launch an EC2 instance. What is your AMI that is originally referenced supposed to contain?
Hi @cyn8, this AMI is Red Hat Linux distro.
Hi, thanks for the help. I have modified the code to accept an argument for the AMI name, and I will open a pull request shortly. At the moment however I am experiencing another issue trying to launch with AWS:
% ./netz --file taskdefinition.json --security-group ... --subnet ... --region ap-southeast-2 --number-of-nic 5 --debug --instance-type c4.8xlarge --instance-key-name ... --ami ...
[2022-08-16 13:42:35] INFO going to create aws cloud resources
[2022-08-16 13:42:35] DEBUG aws going to create iam role
[2022-08-16 13:42:36] INFO iam role already exist
[2022-08-16 13:42:36] INFO aws iam role succeed
[2022-08-16 13:42:36] DEBUG aws going to put role policy
[2022-08-16 13:42:37] INFO aws put role policy succeed
[2022-08-16 13:42:37] DEBUG aws going to create instance profile
[2022-08-16 13:42:37] INFO instance profile already exist
[2022-08-16 13:42:37] INFO aws instance profile succeed
[2022-08-16 13:42:37] DEBUG aws going to add role to instance profile
[2022-08-16 13:42:37] INFO add iam to instance profile succeed
[2022-08-16 13:42:37] DEBUG aws going to create ecs cluster
[2022-08-16 13:42:37] INFO aws create ecs cluster succeed
[2022-08-16 13:42:37] DEBUG aws going to create ec2 instance
[2022-08-16 13:42:38] INFO wait until aws ec2 instance running..
[2022-08-16 13:42:54] DEBUG aws create ec2 instance succeed
[2022-08-16 13:42:54] DEBUG aws going to create network interface: #1
[2022-08-16 13:42:54] INFO aws create network interface succeed: #1
[2022-08-16 13:42:54] DEBUG aws going to allocate elastic ip: #1
[2022-08-16 13:42:54] INFO aws allocate elastic ip succeed: #1
[2022-08-16 13:42:54] DEBUG aws going to associate elastic ip to network interface: #1
[2022-08-16 13:42:55] INFO aws associate elastic ip to network interface succeed: #1
[2022-08-16 13:42:55] DEBUG aws going to attach network interface to instance: #1
[2022-08-16 13:42:56] INFO aws attach network interface to instance succeed: #1
[2022-08-16 13:42:56] DEBUG aws going to create network interface: #2
[2022-08-16 13:42:56] INFO aws create network interface succeed: #2
[2022-08-16 13:42:56] DEBUG aws going to allocate elastic ip: #2
[2022-08-16 13:42:56] INFO aws allocate elastic ip succeed: #2
[2022-08-16 13:42:56] DEBUG aws going to associate elastic ip to network interface: #2
[2022-08-16 13:42:57] INFO aws associate elastic ip to network interface succeed: #2
[2022-08-16 13:42:57] DEBUG aws going to attach network interface to instance: #2
[2022-08-16 13:42:58] INFO aws attach network interface to instance succeed: #2
[2022-08-16 13:42:58] DEBUG aws going to create network interface: #3
[2022-08-16 13:42:58] INFO aws create network interface succeed: #3
[2022-08-16 13:42:58] DEBUG aws going to allocate elastic ip: #3
[2022-08-16 13:42:58] INFO aws allocate elastic ip succeed: #3
[2022-08-16 13:42:58] DEBUG aws going to associate elastic ip to network interface: #3
[2022-08-16 13:42:59] INFO aws associate elastic ip to network interface succeed: #3
[2022-08-16 13:42:59] DEBUG aws going to attach network interface to instance: #3
[2022-08-16 13:43:00] INFO aws attach network interface to instance succeed: #3
[2022-08-16 13:43:00] DEBUG aws going to create network interface: #4
[2022-08-16 13:43:00] INFO aws create network interface succeed: #4
[2022-08-16 13:43:00] DEBUG aws going to allocate elastic ip: #4
[2022-08-16 13:43:00] INFO aws allocate elastic ip succeed: #4
[2022-08-16 13:43:00] DEBUG aws going to associate elastic ip to network interface: #4
[2022-08-16 13:43:01] INFO aws associate elastic ip to network interface succeed: #4
[2022-08-16 13:43:01] DEBUG aws going to attach network interface to instance: #4
[2022-08-16 13:43:02] INFO aws attach network interface to instance succeed: #4
[2022-08-16 13:43:02] DEBUG aws going to create network interface: #5
[2022-08-16 13:43:02] INFO aws create network interface succeed: #5
[2022-08-16 13:43:02] DEBUG aws going to allocate elastic ip: #5
[2022-08-16 13:43:02] INFO aws allocate elastic ip succeed: #5
[2022-08-16 13:43:02] DEBUG aws going to associate elastic ip to network interface: #5
[2022-08-16 13:43:03] INFO aws associate elastic ip to network interface succeed: #5
[2022-08-16 13:43:03] DEBUG aws going to attach network interface to instance: #5
[2022-08-16 13:43:04] INFO aws attach network interface to instance succeed: #5
[2022-08-16 13:43:04] INFO waiting until ecs cluster will have container instances..
[2022-08-16 13:43:05] INFO still waiting (1 seconds)...
[2022-08-16 13:43:06] INFO still waiting (2 seconds)...
[2022-08-16 13:43:07] INFO still waiting (3 seconds)...
...
[2022-08-16 13:45:06] INFO still waiting (120 seconds)...
[2022-08-16 13:45:06] ERROR too much time to wait for ecs container instances
[2022-08-16 13:45:06] WARN destroying resources, it could take a minute so please don't kill me...
[2022-08-16 13:45:42] INFO done to destroy resources.
Any advice on the above? Thanks again in advance.
Hi, just bumping this issue. Not sure where to look from here.
From my understanding, an AMI provides information required to launch an EC2 instance. What is your AMI that is originally referenced supposed to contain?
From AMI Lookup (https://github.com/AMILookup/amilookup.com)