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

Rufio Machine port is ignored #103

Open
rgl opened this issue May 8, 2023 · 2 comments
Open

Rufio Machine port is ignored #103

rgl opened this issue May 8, 2023 · 2 comments
Assignees
Labels
kind/feature New feature or request

Comments

@rgl
Copy link

rgl commented May 8, 2023

Expected Behaviour

Expected that Rufio used the port defined in the Machine manifest.

Current Behaviour

The port is ignored, and the default IPMI and Redfish ports are unexpectedly tried.

Possible Solution

Fix the problem in the source code, I guess.

Steps to Reproduce (for bugs)

- apiVersion: bmc.tinkerbell.org/v1alpha1
  kind: Machine
  spec:
    connection:
      authSecretRef:
        name: t1-bmc
        namespace: tink-system
      host: 10.11.0.1
      insecureTLS: true
      port: 8070

Context

Rufio logs:

{"level":"info","ts":1683560746.0520737,"logger":"controller.Job","msg":"Reconciling Job","Job":"tink-system/t1"}                                                                                                  
{"level":"error","ts":1683560798.2673254,"logger":"controller.Machine","msg":"BMC connection failed","Machine":"tink-system/t1","host":"10.11.0.1","error":"failed to open connection to BMC: 5 errors occurred:\n\
t* provider: gofish: Get \"https://10.11.0.1/redfish/v1/\": dial tcp 10.11.0.1:443: connect: connection refused\n\t* provider: ipmitool: Error: Unable to establish IPMI v2 / RMCP+ session: exit status 1\n\t* pro
vider: *asrockrack.ASRockRack: Error logging in: Post \"https://10.11.0.1/api/session\": dial tcp 10.11.0.1:443: connect: connection refused\n\t* provider: idrac9: Post \"https://10.11.0.1/sysmgmt/2015/bmc/sessi
on\": net/http: invalid header field value \"\\\"admin\\n\\\"\" for key User\n\t* no Opener implementations found\n\n","stacktrace":"github.com/tinkerbell/rufio/controllers.(*MachineReconciler).Reconcile\n\t/wor
kspace/controllers/machine_controller.go:96\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controlle
r.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:311\nsigs.k8s.io/contro
ller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal
/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}                                                                          
{"level":"error","ts":1683560798.2675514,"logger":"controller.task","msg":"BMC connection failed","reconciler group":"bmc.tinkerbell.org","reconciler kind":"Task","name":"t1-task-0","namespace":"tink-system","ho
st":"10.11.0.1","error":"failed to open connection to BMC: 5 errors occurred:\n\t* provider: gofish: Get \"https://10.11.0.1/redfish/v1/\": dial tcp 10.11.0.1:443: connect: connection refused\n\t* provider: ipmi
tool: Error: Unable to establish IPMI v2 / RMCP+ session: exit status 1\n\t* provider: *asrockrack.ASRockRack: Error logging in: Post \"https://10.11.0.1/api/session\": dial tcp 10.11.0.1:443: connect: connectio
n refused\n\t* provider: idrac9: Post \"https://10.11.0.1/sysmgmt/2015/bmc/session\": net/http: invalid header field value \"\\\"admin\\n\\\"\" for key User\n\t* no Opener implementations found\n\n","stacktrace"
:"github.com/tinkerbell/rufio/controllers.(*TaskReconciler).Reconcile\n\t/workspace/controllers/task_controller.go:86\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mo
d/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-run
[email protected]/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal
/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}
{"level":"error","ts":1683560798.2914627,"logger":"controller.machine","msg":"Reconciler error","reconciler group":"bmc.tinkerbell.org","reconciler kind":"Machine","name":"t1","namespace":"tink-system","error":"
failed to open connection to BMC: 5 errors occurred:\n\t* provider: gofish: Get \"https://10.11.0.1/redfish/v1/\": dial tcp 10.11.0.1:443: connect: connection refused\n\t* provider: ipmitool: Error: Unable to es
tablish IPMI v2 / RMCP+ session: exit status 1\n\t* provider: *asrockrack.ASRockRack: Error logging in: Post \"https://10.11.0.1/api/session\": dial tcp 10.11.0.1:443: connect: connection refused\n\t* provider: 
idrac9: Post \"https://10.11.0.1/sysmgmt/2015/bmc/session\": net/http: invalid header field value \"\\\"admin\\n\\\"\" for key User\n\t* no Opener implementations found\n\n","stacktrace":"sigs.k8s.io/controller-
runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/cont
roller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}                                                                               
{"level":"info","ts":1683560798.291582,"logger":"controller.Machine","msg":"Reconciling Machine","Machine":"tink-system/t1"}                                                                                       
{"level":"error","ts":1683560798.2984927,"logger":"controller.task","msg":"Reconciler error","reconciler group":"bmc.tinkerbell.org","reconciler kind":"Task","name":"t1-task-0","namespace":"tink-system","error":
"failed to open connection to BMC: 5 errors occurred:\n\t* provider: gofish: Get \"https://10.11.0.1/redfish/v1/\": dial tcp 10.11.0.1:443: connect: connection refused\n\t* provider: ipmitool: Error: Unable to e
stablish IPMI v2 / RMCP+ session: exit status 1\n\t* provider: *asrockrack.ASRockRack: Error logging in: Post \"https://10.11.0.1/api/session\": dial tcp 10.11.0.1:443: connect: connection refused\n\t* provider:
 idrac9: Post \"https://10.11.0.1/sysmgmt/2015/bmc/session\": net/http: invalid header field value \"\\\"admin\\n\\\"\" for key User\n\t* no Opener implementations found\n\n","stacktrace":"sigs.k8s.io/controller
-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/con
troller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}                                                                              

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS): n/a

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

I'm using vagrant with emulated bmc (vbmc) from https://github.com/rgl/terraform-provider-vbmc.

  • Link to your project or a code example to reproduce issue:

https://github.com/rgl/tinkerbell-k8s-vagrant/tree/use-rufio

@jacobweinstock
Copy link
Member

Hey @rgl, thanks for the report. Unfortunately, this has been outstanding for some time. This bmclib PR bmc-toolbox/bmclib#326 will enable port setting to actually be implemented. Once it lands, we'll get it in Rufio.

@jacobweinstock
Copy link
Member

Update: the machine CRD has been updated to handle per provider options. I'm working on implementing it in the controller now. Once that is done this functionality will be available and functioning.

@chrisdoherty4 chrisdoherty4 added the kind/feature New feature or request label Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants