How to prevent the user repeat-login to avoid the ikvm overload
jrey at linux.ibm.com
Tue Jul 9 06:08:37 AEST 2019
On 6/27/19 8:53 PM, xiuzhi wrote:
> Hi Jae,Ratan,
> The ikvm or openbmc phosphor-rest process will deadlock when users
> operate the ikvm on different PC at the same time . The user can't
> login when the CPU usage of phosphor-gevent process more than 70%.
> This issue will be triggered when one user login both on different
> IP and operate the host by ikvm.
> My test case:
> 1, The user "root" login throw AST2500 network card, enter the ikvm
> webpage ,the IP 192.168.0.100.
> 2, The user "root" login throw OCP network card with a different IP
> 192.168.1.100, enter the ikvm web page, do some keyboard and mouse
> 3, The openbmc will deadlock and cann't login, I must restart the
> phosphor-gevent service ,then I can login again.
> I created other common users, it is impossible to forbid them to
> login and operate the ikvm at the same time to cause the bmc overload .
> My personal idea is to allow one user to login only on one machine
> at a time. Do you have any good ideas?
I haven't seen a reply to this. Here is my 2 cents worth:
Enhance the service to establish a mutex (or exclusive lock) scoped to
the BMC when accessing the ikvm service, and release it when the ikvm
session ends. A second attempt to use the service concurrently will
fail to obtain the lock and if possible, give a nice error message.
Can you determine when the ikvm session ends?
Have an easy way so you can (a) to determine if the lock is held, and
(b) to clear the lock. I've seen lock files used for this purpose. For
example, flock /tmp/ikvm.lock. Rebooting the BMC should erase the /tmp
file which will also clear the lock.
Would that help solve the problem?
More information about the openbmc