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

Error updating boot_loaders on distros on cobbler 3.2.2 #20

Open
vip8439 opened this issue Jun 21, 2022 · 2 comments
Open

Error updating boot_loaders on distros on cobbler 3.2.2 #20

vip8439 opened this issue Jun 21, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@vip8439
Copy link

vip8439 commented Jun 21, 2022

The following resources result in an error from the provider. The same error occurs when leaving out the boot_loaders option.

resource "cobbler_distro" "RHEL-7_9-x86_64" {
  name         = "RHEL-7.9-x86_64"
  arch         = "x86_64"
  boot_loaders = ["grub"]
  breed        = "redhat"
  os_version   = "rhel7"
  kernel       = "/var/www/cobbler/distro_mirror/RHEL-7_9-x86_64/images/pxeboot/vmlinuz"
  initrd       = "/var/www/cobbler/distro_mirror/RHEL-7_9-x86_64/images/pxeboot/initrd.img"
  owners       = ["admin", "terraform"]
}

resource "cobbler_distro" "RHEL-8_6-x86_64" {
  name         = "RHEL-8.6-x86_64"
  arch         = "x86_64"
  boot_loaders = ["grub"]
  breed        = "redhat"
  os_version   = "rhel8"
  kernel       = "/var/www/cobbler/distro_mirror/RHEL-8_6-x86_64/images/pxeboot/vmlinuz"
  initrd       = "/var/www/cobbler/distro_mirror/RHEL-8_6-x86_64/images/pxeboot/initrd.img"
  owners       = ["admin", "terraform"]
}
cobbler_distro.RHEL-8_6-x86_64: Creating...
cobbler_distro.RHEL-7_9-x86_64: Creating...
2022-06-21T23:04:20.859Z [INFO]  Starting apply for cobbler_distro.RHEL-8_6-x86_64
2022-06-21T23:04:20.859Z [INFO]  Starting apply for cobbler_distro.RHEL-7_9-x86_64
2022-06-21T23:04:20.859Z [DEBUG] cobbler_distro.RHEL-8_6-x86_64: applying the planned Create change
2022-06-21T23:04:20.859Z [DEBUG] cobbler_distro.RHEL-7_9-x86_64: applying the planned Create change
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "kernel_options_post" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "fetchable_files" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "kernel_options" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "boot_files" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "mgmt_classes" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "kernel_options_post" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "boot_files" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "mgmt_classes" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "template_files" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "template_files" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "kernel_options" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] setting computed for "fetchable_files" from ComputedKeys
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] Cobbler Distro: Create Options: cobblerclient.Distro{Ctime:0, Depth:0, Mtime:0, SourceRepos:[]string(nil), TreeBuildTime:"", UID:"", Arch:"x86_64", BootFiles:[]string{}, BootLoaders:[]string{"grub"}, Breed:"redhat", Comment:"", FetchableFiles:[]string{}, Initrd:"/var/www/cobbler/distro_mirror/RHEL-7_9-x86_64/images/pxeboot/initrd.img", Kernel:"/var/www/cobbler/distro_mirror/RHEL-7_9-x86_64/images/pxeboot/vmlinuz", KernelOptions:[]string{}, KernelOptionsPost:[]string{}, MGMTClasses:[]string{}, Name:"RHEL-7.9-x86_64", OSVersion:"rhel7", Owners:[]string{"admin", "terraform"}, TemplateFiles:[]string{}}
2022-06-21T23:04:20.860Z [DEBUG] provider.terraform-provider-cobbler_v3.0.0: 2022/06/21 23:04:20 [DEBUG] Cobbler Distro: Create Options: cobblerclient.Distro{Ctime:0, Depth:0, Mtime:0, SourceRepos:[]string(nil), TreeBuildTime:"", UID:"", Arch:"x86_64", BootFiles:[]string{}, BootLoaders:[]string{"grub"}, Breed:"redhat", Comment:"", FetchableFiles:[]string{}, Initrd:"/var/www/cobbler/distro_mirror/RHEL-8_6-x86_64/images/pxeboot/initrd.img", Kernel:"/var/www/cobbler/distro_mirror/RHEL-8_6-x86_64/images/pxeboot/vmlinuz", KernelOptions:[]string{}, KernelOptionsPost:[]string{}, MGMTClasses:[]string{}, Name:"RHEL-8.6-x86_64", OSVersion:"rhel8", Owners:[]string{"admin", "terraform"}, TemplateFiles:[]string{}}
2022-06-21T23:04:21.311Z [ERROR] vertex "cobbler_distro.RHEL-7_9-x86_64" error: Cobbler Distro: Error Creating: Error updating boot_loaders to grub.
2022-06-21T23:04:21.374Z [ERROR] vertex "cobbler_distro.RHEL-8_6-x86_64" error: Cobbler Distro: Error Creating: Error updating boot_loaders to grub.
╷
│ Error: Cobbler Distro: Error Creating: Error updating boot_loaders to grub.
│
│   with cobbler_distro.RHEL-7_9-x86_64,
│   on main.tf line 53, in resource "cobbler_distro" "RHEL-7_9-x86_64":
│   53: resource "cobbler_distro" "RHEL-7_9-x86_64" {
│
╵
╷
│ Error: Cobbler Distro: Error Creating: Error updating boot_loaders to grub.
│
│   with cobbler_distro.RHEL-8_6-x86_64,
│   on main.tf line 64, in resource "cobbler_distro" "RHEL-8_6-x86_64":
│   64: resource "cobbler_distro" "RHEL-8_6-x86_64" {
│
╵
2022-06-21T23:04:21.381Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-06-21T23:04:21.385Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/cobbler/cobbler/3.0.0/linux_amd64/terraform-provider-cobbler_v3.0.0 pid=2999328
2022-06-21T23:04:21.385Z [DEBUG] provider: plugin exited
@SchoolGuy SchoolGuy added the bug Something isn't working label Jun 23, 2022
@SchoolGuy SchoolGuy moved this to Todo in Terraform Provider Jun 23, 2022
@SchoolGuy
Copy link
Member

I need to push for the Web Frontend sadly and thus can't allocate my private resources in the near future, however I still thank you for the bug report. If you find the error, I will gladly review and accept a PR with the required changes to fix the bug!

@SchoolGuy
Copy link
Member

@vip8439 If you still have that bug: What Cobbler version are you using at the moment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants