opencomputeproject / HWMgmt-DeviceMgr-DeviceManager

Device Manager collects device data and notifications from each device, and make the data available on a predetermined output bus for consumers.
Apache License 2.0
23 stars 12 forks source link

Update many enhances and fixes #15

Closed JasonscHuang closed 2 years ago

JasonscHuang commented 2 years ago
  1. fixed leak of command "make all" for first deployment/installation.
  2. added NOS/Firmware software update API.
  3. added Basic-Authentication method for allowing username/password access.
  4. fixed the PSME port validation by hardcoded.
  5. fixed the device's account API getting wrong usernmae by Redfish API with ID.
  6. fixed the termal Refish API could not provide data by Chassis.
MaciejMis commented 2 years ago

5

It is fixed now (make all now do something) but there are still some problems with it.

  1. resolv.conf is overwritten by one of make all commands. Additional namespace should be appended instead of overwriting everything in the file.
  2. What is the reason to invoke sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F && sudo iptables -X? This is potentially dangerous to the host machine - my VM lost internet connection after invoking this which resulted in failed make all because it was unable to download anything.
  3. I noticed this error protoc: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory - it looks like it is not downloaded during make all command.

Please note that I tested this on brand new Ubuntu 18.04 VM.

ehaligow commented 2 years ago

10

The PSME port is not hardcoded anymore, it is now possible to attach PSME with custom port.

ehaligow commented 2 years ago

8

Running ‘logindevice’ task works fine if we are using Token option (now, the number of arguments is also updated).

However, if the “Basic Auth’ option is chosen, the Device Mgr returns error, because the credentials (admin, admin) used to login with Basic Auth are different than fields “Username” and “Password” in any Accounts. BMC accepts the request, but DeviceMgr returns error, because the values do not match.

Is it necessary for the BMC to have the Account in Accounts list, that has the “Username” and “Password” values the same, as the credentials used for Basic Auth?

ehaligow commented 2 years ago

11

The issue is resolved, the DeviceMgr compares UserName field in each Account, not links.

JasonscHuang commented 2 years ago

5 It is fixed now (make all now do something) but there are still some problems with it.

  1. resolv.conf is overwritten by one of make all commands. Additional namespace should be appended instead of overwriting everything in the file.
  2. What is the reason to invoke sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F && sudo iptables -X? This is potentially dangerous to the host machine - my VM lost internet connection after invoking this which resulted in failed make all because it was unable to download anything.
  3. I noticed this error protoc: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory - it looks like it is not downloaded during make all command.

Please note that I tested this on brand new Ubuntu 18.04 VM.

ehaligow commented 2 years ago

12

The issue is resolved, the thermal URL is not hardcoded anymore.

jcleung5549 commented 2 years ago

Mar 22 - approved at DevMgr meeting.

JasonscHuang commented 2 years ago

5

It is fixed now (make all now do something) but there are still some problems with it.

  1. resolv.conf is overwritten by one of make all commands. Additional namespace should be appended instead of overwriting everything in the file.

  2. What is the reason to invoke sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F && sudo iptables -X? This is potentially dangerous to the host machine - my VM lost internet connection after invoking this which resulted in failed make all because it was unable to download anything.

  3. I noticed this error protoc: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory - it looks like it is not downloaded during make all command.

Please note that I tested this on brand new Ubuntu 18.04 VM.

I put those "iptables" commands in case of changing the IP address of the device manager before resetting all pods. If so. That would cause the cluster could not look up the network while resetting all pods.

JasonscHuang commented 2 years ago

8

Running ‘logindevice’ task works fine if we are using Token option (now, the number of arguments is also updated).

However, if the “Basic Auth’ option is chosen, the Device Mgr returns error, because the credentials (admin, admin) used to login with Basic Auth are different than fields “Username” and “Password” in any Accounts. BMC accepts the request, but DeviceMgr returns error, because the values do not match.

Is it necessary for the BMC to have the Account in Accounts list, that has the “Username” and “Password” values the same, as the credentials used for Basic Auth?

You could use the "deviceaccountslist" to see the accounts list

./dm attach 172.17.8.40:8888:600:1:1

172.17.8.40:8888 attached

./dm logindevice 172.17.8.40:8888:admin:redfish:true

172.17.8.40:8888 user-data : admin logined

./dm deviceaccountslist 172.17.8.40:8888:admin

accounts list : account:{key:"admin" value:"redfish"}

Could you share your BMC messages?

ehaligow commented 2 years ago

8

Running ‘logindevice’ task works fine if we are using Token option (now, the number of arguments is also updated). However, if the “Basic Auth’ option is chosen, the Device Mgr returns error, because the credentials (admin, admin) used to login with Basic Auth are different than fields “Username” and “Password” in any Accounts. BMC accepts the request, but DeviceMgr returns error, because the values do not match. Is it necessary for the BMC to have the Account in Accounts list, that has the “Username” and “Password” values the same, as the credentials used for Basic Auth?

You could use the "deviceaccountslist" to see the accounts list

./dm attach 172.17.8.40:8888:600:1:1

172.17.8.40:8888 attached

./dm logindevice 172.17.8.40:8888:admin:redfish:true

172.17.8.40:8888 user-data : admin logined

./dm deviceaccountslist 172.17.8.40:8888:admin

accounts list : account:{key:"admin" value:"redfish"}

Could you share your BMC messages?

Yes, I could use 'deviceaccountslist' task, but to retrieve the list, we have to login first. My question concerned different issue, but it is not valid anymore, as now BMC have the Account (with Administrator role) in Accounts list, that has the “Username” and “Password” values the same, as the credentials used for Basic Auth. So, I can use Basic auth to login from DeviceMgr to BMC.

ehaligow commented 2 years ago

https://github.com/opencomputeproject/HWMgmt-DeviceMgr-DeviceManager/issues/13 https://github.com/opencomputeproject/HWMgmt-DeviceMgr-DeviceManager/issues/14 The issues are resolved, it is possible now to change user's password.

ehaligow commented 2 years ago

8

The issue is resolved, it is now possible to login to BMC using Basic Auth.

ehaligow commented 2 years ago

9

The issue is resolved, it is now possible to use 'setsessionservice' task to set the values.

MaciejMis commented 2 years ago

4.5.2022 - On community meeting we agreed to merge this PR. @taskin-ucpinar @JasonscHuang

JasonscHuang commented 2 years ago

@MaciejMis OK. Thank you.

jcleung5549 commented 2 years ago

@JasonscHuang - PR#15 was merged into redfishapi branch. The changes need to moved to main branch before the issues can be closed.