mohankumarpaluru / oracle-freetier-instance-creation

A script to create free instance
MIT License
164 stars 33 forks source link

read_or_generate_ssh_public_key has an empty name #24

Closed Luk4h closed 4 months ago

Luk4h commented 4 months ago

Describe the bug Right now in the README of the repository the 'SSH_AUTHORIZED_KEYS_FILE' env is set as optional, but if it is not set or commented, the program does not run, but still shows as "Script is running successfully."

Expected behavior It should show an error that the env is missing, or treat to handle it not set and still work.

Instance Type (please complete the following information):

Environment (please complete the following information):

Screenshots

Additional context I had to debug running the main.py myself to see the error and fix it by setting the env to the default value. The interesting part is that on the launch logs it said that the ssh file was not found so it was creating it.

mohankumarpaluru commented 4 months ago

@Luk4h , ssh key is mandatory for instance creation. It says the key file is optional because in case you don't create the program will create one in the path specified. May be I'll move it to Mandatory fields but if read the description it's clearly mentioned thay.

SSH_AUTHORIZED_KEYS_FILE: Give the absolute path of an SSH public key for ARM instance. The program will create a public and private key pair with the name specified if the key file doesn't exist; otherwise, it uses the one specified.

Regarding script not throwing an error when ani env file parameters are not right , I just noticed it through another issue I'll push a fix today