Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
In RHEV-M, when a user, using a SPICE client to connect to a guest, close the connection, the vdsm tells the guest agent to lock the machine. The RHEV-agent daemon tries to lock the machine by calling "/usr/bin/vlock -a" but the execution always fails.
It is possible to lock the virtual terminals this way?
(In reply to comment #0)
> In RHEV-M, when a user, using a SPICE client to connect to a guest, close the
> connection, the vdsm tells the guest agent to lock the machine. The RHEV-agent
> daemon tries to lock the machine by calling "/usr/bin/vlock -a" but the
> execution always fails.
What does it mean "execution fails"? (do you have any error message?)
> It is possible to lock the virtual terminals this way?
I think that "vlock -a" makes sense on standard consoles (tty0 ... tty16) on machines where all consoles are accessible from the same physical place.
The "vlock -a" does not lock all consoles, it locks the *current console* and controls switching between consoles (e.g. Alt-Fn keys). So after "vlock -a" you cannot use or leave the current console without a valid password. That's all.
(In reply to comment #2)
> What does it mean "execution fails"? (do you have any error message?)
I'm using Python's subprocess.call. The function returns 1 when I execute vlock.
> The "vlock -a" does not lock all consoles, it locks the *current console* and
I'm okay with this behavior. The problem is that I'm executing vlock as a daemon which doesn't have a *current console* to lock.
vlock opens /dev/tty, this special device is associated with the current process terminal.
Yes, it probably does not makes sense to call vlock -a from any daemon if the daemon is outside the current session (terminal).
I have no clue how to fix your problem. Try to ask at tech-list.
IMO the most appropriate way for locking the consoles on a guest is to reserve one of the consoles for the vlock and in case of timeout switch into this console and run vlock -a in it.
(In reply to comment #5)
> IMO the most appropriate way for locking the consoles on a guest is to reserve
> one of the consoles for the vlock and in case of timeout switch into this
> console and run vlock -a in it.
Thanks. I'll try it.