Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect error message or bug with reinstallation with cloud-init #28

Closed
Joselu21 opened this issue May 21, 2023 · 1 comment
Closed

Comments

@Joselu21
Copy link

I'm encountering an issue while trying to use cloud-init to automate the installation of my VPS. This is crucial for me as I aim to create a small cluster of 4 VPS instances with installed and configured public services.

Unfortunately, the Contabo client panel does not seem to support this functionality. Therefore, I have resorted to using the CLI tool.

During my exploration, I discovered a flag called --file which allows me to perform a reinstall using my cloud-init.yml configuration.

To reinstall the instance, I executed the following command:

.\cntb.exe reinstall instance <<myId>> --imageId "afecbb85-e2fc-46f0-9684-b46b1faf00bb" --file "cloud-init.yml"

However, the output I received was as follows:

level=error msg="Error while reinstalling instance: 400 - [imageId must be a UUID]\n"
level=fatal msg="Aborting, due to errors"

Expected Behavior

The instance should be reinstalled successfully using the specified cloud-init.yml configuration file. Or if there is another error with my way of passing the file as an argument the error message should be descriptive and not point to an error with the imageId

Actual Behavior

Reinstallation fails with the error message: "Error while reinstalling instance: 400 - [imageId must be a UUID]."

Additional Information

  • Operating System: Windows 11
  • cntb.exe version: 1.4.2
@ngotzmann
Copy link
Member

Hi,
thanks for reporting this!
The --file flag is meant to be used instead of all other flags.
So your command should look like this:

.\cntb.exe reinstall instance <<myId>> --file "reinstall_config.yml"

That means, you have to define the ImageId inside the reinstall_config.yml.
As example:

imageId: "db1409d2-ed92-4f2f-978e-7b2fa4a1ec90"
userData: |
  package_update: true

We will adjust the message for the "--flag" and react properly to the error on the next version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants