Code Monkey home page Code Monkey logo

Comments (4)

zaneb avatar zaneb commented on September 7, 2024

If that log is complete then it appears that the BareMetalHost is not getting reconciled when the secret is updated.

The theory here is that the BareMetalHost controller should receive events when the secret changes (even though the name of the secret doesn't change, so the BareMetalHost resource itself is unmodified). We have that set up per the instructions in the Operator SDK user guide. We're calling SetControllerReference to make the BareMetalHost the owner of the Secret, so that it should be matched by the OwnerType filter.

It's not obvious why this wouldn't be working.

from baremetal-operator.

alanmeadows avatar alanmeadows commented on September 7, 2024

There is even a test for this exact scenario: https://github.com/metal3-io/baremetal-operator/blob/master/pkg/controller/baremetalhost/baremetalhost_controller_test.go#L414-L444

To be sure, its not totally 1:1 as the test case has malformed credentials (missing fields), and the issue above is an actual BMC authentication failure however it is supposed to demonstrate that we are at least correctly watching the secret.

from baremetal-operator.

alanmeadows avatar alanmeadows commented on September 7, 2024

@yprokule I think it is worth validating -- when you say the credentials were fixed, I think everyone on this thread is assuming you updated the secret. When you say they were fixed, is there a chance instead the host BMC credentials themselves were updated to match the existing secret?

from baremetal-operator.

yprokule avatar yprokule commented on September 7, 2024

@yprokule I think it is worth validating -- when you say the credentials were fixed, I think everyone on this thread is assuming you updated the secret. When you say they were fixed, is there a chance instead the host BMC credentials themselves were updated to match the existing secret?

@alanmeadows - yes, I mean secret is updated. And we do watch changes to the secret. I patched credentials few times in a row(using both good and bad values) and there are records about it:

{"level":"info","ts":1558686473.3275928,"logger":"baremetalhost","msg":"Reconciling BareMetalHost","Request.Namespace":"openshift-machine-api","Request.Name":"openshift-worker-rhhi-node-3"}
{"level":"info","ts":1558686473.32766,"logger":"baremetalhost_ironic","msg":"ironic settings","endpoint":"http://localhost:6385/v1/","deployKernelURL":"http://172.22.0.1/images/ironic-python
-agent.kernel","deployRamdiskURL":"http://172.22.0.1/images/ironic-python-agent.initramfs"}
{"level":"info","ts":1558686473.3276753,"logger":"baremetalhost","msg":"registering and validating access to management controller","Request.Namespace":"openshift-machine-api","Request.Name"
:"openshift-worker-rhhi-node-3","provisioningState":"registering"}
{"level":"info","ts":1558686473.3276803,"logger":"baremetalhost_ironic","msg":"validating management access","host":"openshift-worker-rhhi-node-3"}
{"level":"info","ts":1558686473.349593,"logger":"baremetalhost_ironic","msg":"found existing node by ID","host":"openshift-worker-rhhi-node-3"}
{"level":"info","ts":1558686473.371224,"logger":"baremetalhost","msg":"stopping on host error","Request.Namespace":"openshift-machine-api","Request.Name":"openshift-worker-rhhi-node-3","pro$isioningState":"registering","message":"Failed to get power state for node 4e934982-47de-4825-8c8b-a57f51725905. Error: IPMI call failed: power status."}
...SNIP...
{"level":"info","ts":1558686487.1810665,"logger":"baremetalhost","msg":"Reconciling BareMetalHost","Request.Namespace":"openshift-machine-api","Request.Name":"openshift-worker-rhhi-node-3"}
{"level":"info","ts":1558686487.1811376,"logger":"baremetalhost_ironic","msg":"ironic settings","endpoint":"http://localhost:6385/v1/","deployKernelURL":"http://172.22.0.1/images/ironic-pyt$
on-agent.kernel","deployRamdiskURL":"http://172.22.0.1/images/ironic-python-agent.initramfs"}
{"level":"info","ts":1558686487.181154,"logger":"baremetalhost","msg":"registering and validating access to management controller","Request.Namespace":"openshift-machine-api","Request.Name"$
"openshift-worker-rhhi-node-3","provisioningState":"registering"}
{"level":"info","ts":1558686487.1811614,"logger":"baremetalhost_ironic","msg":"validating management access","host":"openshift-worker-rhhi-node-3"}
{"level":"info","ts":1558686487.203829,"logger":"baremetalhost_ironic","msg":"found existing node by ID","host":"openshift-worker-rhhi-node-3"}
{"level":"info","ts":1558686487.224387,"logger":"baremetalhost","msg":"stopping on host error","Request.Namespace":"openshift-machine-api","Request.Name":"openshift-worker-rhhi-node-3","pro$
isioningState":"registering","message":"Failed to get power state for node 4e934982-47de-4825-8c8b-a57f51725905. Error: IPMI call failed: power status."}

Also this time I tried with a older BMO version: 10dc1d6 (deployed with dev-scripts)

from baremetal-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.