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

Scaleway instance does not boot correctly when deployed #1384

Closed
elghali97 opened this issue Jul 22, 2022 · 6 comments · Fixed by #1390
Closed

Scaleway instance does not boot correctly when deployed #1384

elghali97 opened this issue Jul 22, 2022 · 6 comments · Fixed by #1390
Labels
instance Instance issues, bugs and feature requests

Comments

@elghali97
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v1.2.4
on windows_amd64

  • provider registry.terraform.io/hashicorp/template v2.2.0
  • provider registry.terraform.io/scaleway/scaleway v2.2.3

Affected Resource(s)

  • scaleway_instance_server

Terraform Configuration Files

resource "scaleway_instance_security_group" "scaleway_instance_sg" {
  name                    = "fr-sg-test-instance"
  description             = "Allow TLS inbound traffic"
  inbound_default_policy  = "drop"
  outbound_default_policy = "accept"

  inbound_rule {
    action = "accept"
    port   = "22"
  }

  inbound_rule {
    action = "accept"
    port   = "80"
  }

  inbound_rule {
    action = "accept"
    port   = "443"
  }
}

resource "scaleway_instance_volume" "additional_volume" {
  size_in_gb = 20
  type = "l_ssd"
}

resource "scaleway_instance_server" "scaleway_instance" {
  name  = "fr-vm-test-instance"
  type  =   "DEV1-M"
  image     = "ubuntu_focal"
  boot_type = "local"
  
  enable_dynamic_ip = true
  security_group_id = scaleway_instance_security_group.scaleway_instance_sg.id
  
  additional_volume_ids = [ scaleway_instance_volume.additional_volume.id ]

  root_volume {
    size_in_gb = 20
  }
}

Debug Output

All resources properly deployed:

Apply complete! Resources: 4 added, 0 changed, 0 destroyed.

However, I could not access to my instance, neither via SSH (Connexion timeout) nor via console.

When deep diving the problem on the console, I see that start http boot over ipv4 is not working.

Panic Output

Expected Behavior

scaleway_instance_server properly deployed and accessible via SSH

Actual Behavior

scaleway_instance_server properly deployed but not accessible via SSH and not booted correctly

Steps to Reproduce

  1. terraform apply
  2. ssh -i <private_key> root@<instance_public_ip>

Important Factoids

References

  • #0000
@remyleone
Copy link
Member

remyleone commented Jul 22, 2022

Hello, this is not a problem with terraform but rather with the instances. So I will be closing it, for now, feel free to reopen it if you have a snippet of terraform code that can reproduce your issue.

Sometimes it can take a bit of time between the moment where terraform complete the installation of your resources and the moment when the SSH daemon is up and ready to accept incoming connections. So that might be an issue. One way to test that is to test after one minute or two to be sure that the SSH daemon had plenty of time to start.

Also are you sure that the proper SSH keys are available on your organization account and properly deployed on your instance? Can you connect after some moment to your instance manually?

@elghali97
Copy link
Author

Hello @remyleone !

I've deployed all my resources this morning using terraform, and my instance is still not accessible via SSH or Scaleway web console.

The proper SSH keys are available on my organization account et properly associated to my account (I've tried to reboot my instance rescue mode and it worked well !).

However, as mentioned previously, the problem is not on the SSH daemon, but on booting step, as start http boot over ipv4 command does not work.

You can reproduce just with my snippet (previously mentioned too):

resource "scaleway_instance_security_group" "scaleway_instance_sg" {
  name                    = "fr-sg-test-instance"
  description             = "Allow TLS inbound traffic"
  inbound_default_policy  = "drop"
  outbound_default_policy = "accept"

  inbound_rule {
    action = "accept"
    port   = "22"
  }

  inbound_rule {
    action = "accept"
    port   = "80"
  }

  inbound_rule {
    action = "accept"
    port   = "443"
  }
}

resource "scaleway_instance_volume" "additional_volume" {
  size_in_gb = 20
  type = "l_ssd"
}

resource "scaleway_instance_server" "scaleway_instance" {
  name  = "fr-vm-test-instance"
  type  =   "DEV1-M"
  image     = "ubuntu_focal"
  boot_type = "local"
  
  enable_dynamic_ip = true
  security_group_id = scaleway_instance_security_group.scaleway_instance_sg.id
  
  additional_volume_ids = [ scaleway_instance_volume.additional_volume.id ]

  root_volume {
    size_in_gb = 20
  }
}

@trilliot
Copy link

Same issue here. Using the official example (https://registry.terraform.io/providers/scaleway/scaleway/latest/docs), I am not able to boot an instance on Scaleway with Terraform (tested on multiple regions without success).
It works well via the Web Console.

State is applied, resources are created, but the server never boots.
A call to the API gives insight about the actual state of the server :

"state_detail": "booting kernel",

@remyleone remyleone reopened this Jul 25, 2022
@clementnero
Copy link

Hello,
I have the same problem as well. When opening the Console I get the UEFI Interactive Shell.

@Codelax
Copy link
Member

Codelax commented Jul 25, 2022

Hi, sorry for inconvenience, a fix is on the way, it will be released right after

@Codelax
Copy link
Member

Codelax commented Jul 25, 2022

Fix is in release v2.2.4

@remyleone remyleone added the instance Instance issues, bugs and feature requests label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
instance Instance issues, bugs and feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants