#
5ba20b5b |
| 12-May-2023 |
Ninad Palsule <ninadpalsule@us.ibm.com> |
obmc-console: Consolidate handling of default socket-id
If console-id is not specified on command line or in the config file then use the default value. ae2460d0b8e8 ("obmc-console: Provide a defaul
obmc-console: Consolidate handling of default socket-id
If console-id is not specified on command line or in the config file then use the default value. ae2460d0b8e8 ("obmc-console: Provide a default value for `console-id`.") only implemented the default value for naming the abstract listening socket and overlooked the new DBus path naming convention. This caused issues during dbus registration:
``` obmc-console-server: Object name: /xyz/openbmc_project/console/(null) obmc-console-server: Failed to issue method call: Invalid argument ```
Fixes: ae2460d0b8e8 ("obmc-console: Provide a default value for `console-id`.") Change-Id: I6d0f7b23cc085992189cd4463129a6aae590b3e7 Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
ae2460d0 |
| 09-May-2023 |
Andrew Jeffery <andrew@aj.id.au> |
obmc-console: Provide a default value for `console-id`.
4e7186918599 ("Fixed broken dbus interface for multiple consoles") introduced the requirement that `console-id` be specified in the configurat
obmc-console: Provide a default value for `console-id`.
4e7186918599 ("Fixed broken dbus interface for multiple consoles") introduced the requirement that `console-id` be specified in the configuration files for both the client and server. It was paired with a fix to platform configurations in the OpenBMC bitbake metadata[1]. In theory this should have worked, but because specifying `console-id` wasn't a requirement, not all platforms supplied a client configuration. Instead they relied on the default behaviour.
[1]: https://gerrit.openbmc.org/c/openbmc/openbmc/+/62712
Remove the requirement that a `console-id` be specified and instead provide a default value that can be overridden by configuration. This carries forward the consequence from 4e7186918599 ("Fixed broken dbus interface for multiple consoles") that the original `\0obmc-console` abstract socket will never be created. This doesn't resolve the break in ipmid or bmcweb, but resolves the break to SSH-based SOL on platforms not supplying client configuration files for one of their consoles.
The fix to bmcweb (whose strategy can also be applied to ipmid) is currently being prototyped[2].
[2]: https://discord.com/channels/775381525260664832/1083551792094249051/1103867159412752424
A deeper treatment of the problems, impacts, and solutions is provided in [3].
[3]: https://amboar.github.io/notes/2023/05/08/happenings-in-obmc-console.html
Fixes: 4e7186918599 ("Fixed broken dbus interface for multiple consoles") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I970578f1b695f729f6524c4da6bba6e89bf14d52
show more ...
|
#
b14ca19c |
| 31-Mar-2023 |
Ninad Palsule <ninadpalsule@us.ibm.com> |
Added new dbus interface to query console info
obmc-console recipe configure consoles by setting the socket-id field in the console server config file. obmc-console server use this socket id to buil
Added new dbus interface to query console info
obmc-console recipe configure consoles by setting the socket-id field in the console server config file. obmc-console server use this socket id to build a abract socket name and register new service "xyz.openbmc_project.Console.Access". The leaf of the object path will be socket-id configured. It also exposes the unix abstract socket name through SocketName property. The socket name is sent as a byte stream as abstract socket contains null character at the start.
*** For example if recipe configured socket-id as "console0" the *** following object is exported through dbus interface
# Tree for "console0" console. $ busctl tree xyz.openbmc_project.Console.console0 `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/console `-/xyz/openbmc_project/console/console0
# Get SocketName property for console0 object $ busctl get-property xyz.openbmc_project.Console.console0 /xyz/openbmc_project/console/console0 xyz.openbmc_project.Console.Access SocketName ay 22 0 111 98 109 99 45 99 111 110 115 111 108 101 46 99 111 110 115 111 108 101 48
# Tree for "hypervisor" console $ busctl tree xyz.openbmc_project.Console.hypervisor `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/console `-/xyz/openbmc_project/console/hypervisor
# Get SocketName property for hypervisor object $ busctl get-property xyz.openbmc_project.Console.hypervisor /xyz/openbmc_project/console/hypervisor xyz.openbmc_project.Console.Access SocketName ay 24 0 111 98 109 99 45 99 111 110 115 111 108 101 46 104 121 112 101 114 118 105 115 111 114
# Note that this is an example of two consoles one is 'console0' and # second is 'hypervisor'. I have formated the output to easy viewing. # We also have one extra service for console that is coming from the # service exist today to get/set the tty device baud rate. $ busctl call xyz.openbmc_project.ObjectMapper \ /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper \ GetSubTree sias /xyz/openbmc_project/console 0 1 \ xyz.openbmc_project.Console.Access a{sa{sas}} 2 "/xyz/openbmc_project/console/console0" \ 1 "xyz.openbmc_project.Console.console0" 4 "org.freedesktop.DBus.Introspectable" "org.freedesktop.DBus.Peer" "org.freedesktop.DBus.Properties" "xyz.openbmc_project.Console.Access" "/xyz/openbmc_project/console/hypervisor" 2 "xyz.openbmc_project.Console.hypervisor" 4 "org.freedesktop.DBus.Introspectable" "org.freedesktop.DBus.Peer" "org.freedesktop.DBus.Properties" "xyz.openbmc_project.Console.Access" "xyz.openbmc_project.console" 4 "org.freedesktop.DBus.Introspectable" "org.freedesktop.DBus.Peer" "org.freedesktop.DBus.Properties" "xyz.openbmc_project.Console.Access"
Tested: Tested on the rainer system with busctl command and integration with bmcweb
Related commits: 1) phosphor-dbus-interface: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/61486 2) obmc-console: https://gerrit.openbmc.org/c/openbmc/obmc-console/+/62496 3) bmcweb: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/62525
Change-Id: Ifb70ce5585c3937f3abd904ffbae51ca67f58724 Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>
show more ...
|
#
2834c5b1 |
| 18-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
obmc-console: Fix readability-braces-around-statements
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I88d2bdcb15106298d83a1cf7176e069092820f1d
|
#
5c359cc6 |
| 18-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
obmc-console: Fix bugprone-narrowing-conversions
For example:
``` /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.c:769:9: error: narrowing conversion from 'ssize_t' (
obmc-console: Fix bugprone-narrowing-conversions
For example:
``` /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-server.c:769:9: error: narrowing conversion from 'ssize_t' (aka 'long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,-warnings-as-errors] rc = read(console->tty_fd, buf, sizeof(buf)); ^ ```
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I67c158b411f1533ca3b5a62803116e95907e8c5b
show more ...
|
#
8f548f6c |
| 17-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
obmc-console: Clean up invalid sign comparisons
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I83fae6857620ca2913952bea597c1299dd962620
|
#
5e7c0786 |
| 09-Feb-2020 |
Andrew Jeffery <andrew@aj.id.au> |
console-socket: Add an optional component to UNIX socket abstract names Allows multiple instances of obmc-console-server to run concurrently without interfering with each other.
console-socket: Add an optional component to UNIX socket abstract names Allows multiple instances of obmc-console-server to run concurrently without interfering with each other. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7ef9c14e554c687e8d606e1eaaed82a7f1c06d98
show more ...
|
#
0cff652c |
| 17-Mar-2016 |
Jeremy Kerr <jk@ozlabs.org> |
socket: Actually use the console-socket definitions Since the console_socket variables aren't declared with 'extern' in console-server.h, we ended up with default definitions for these.
socket: Actually use the console-socket definitions Since the console_socket variables aren't declared with 'extern' in console-server.h, we ended up with default definitions for these. This happened to work, but with a zero-length socket path. This change uses the console-socket.c object as intended, to provide proper socket paths. Now that the char[] is an extern, we'll need to get the address of it to get the pointer value. Also, fix the sizeof() to take account of the trailing nul. Found by Joel Stanley <joel@jms.id.au>. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
show more ...
|
#
9326d779 |
| 17-Mar-2016 |
Jeremy Kerr <jk@ozlabs.org> |
Add licence document and per-file headers Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
#
2bd05186 |
| 10-Mar-2016 |
Jeremy Kerr <jk@ozlabs.org> |
Add socket handler & console client This change adds a socket handler to the console-server, exposing a unix domain socket for the UART data. We use this to replace the existing stdi
Add socket handler & console client This change adds a socket handler to the console-server, exposing a unix domain socket for the UART data. We use this to replace the existing stdio handler. We also add a client for this socket, allowing multiple processes to read/write data from & to the server. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
show more ...
|