openhpi2 / Open-HPI

Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers
Other
3 stars 1 forks source link

ilo2_ribcl takes a long time to exit on kill #2577

Closed openhpi2 closed 8 years ago

openhpi2 commented 9 years ago

Steps to reproduce

  1. Use a dl380g9 target and stop the acpid on that target
  2. Use hpipower to reset. Make sure it fails to power cycle the system.
  3. As soon reset is issued, kill the openhpid on the other window.
  4. It takes more than 90 seconds for the daemon to die after kill is issued

Looks like ilo2_ribcl plugin waits in a loop sleeping and checking the system if the power is off. During this cycle the plugin could check for the variable and exit if the signal is set. That way it could exit between the cycles.

Reported by: dr_mohan

openhpi2 commented 9 years ago

A global variable signal_service_thread is created to communicate the signal to the service threads. The service threads could use the variable to exit the thread. Patch is attached. Please review 1876_ILO2_RIBCL_kill.patch.txt

Original comment by: dr_mohan

openhpi2 commented 9 years ago

Original comment by: dr_mohan

openhpi2 commented 9 years ago

Fixed in checkin #7631

Original comment by: dr_mohan