Add UDP transport for rsyslog
Hello colleagues!
I'm a new member of the Yadro OBMC team and currently working on modifications of the phosphor logging service. Our client requested us to make OBMC's rsyslog to use UDP transport for remote logging. Currently it uses just TCP and this configuration is hard-coded.
It looks like the phosphor-rsyslog-config has only one external dependency, namely the sdbusplus library, which provides appropriate DBUS interface handler to configure network parameters. Also it needs to modify DBUS interface description for network client.
The following should be performed:
1. Modification of the xyz/openbmc_project/Network/Client.interface.yaml interface to add the protocol attribute.
2. Handling for the interface changes in the code of the dbusplus library.
3. Corresponding changes to the phosphor-rsyslog-config service.
4. Proper changes to the REST/redfish API.
5. Modification of the web interface and command line tools.
Also, current DBUS interface to the object implies two independent messages to change network parameters, one to set the IP-address, and the other to set the port number. They are not atomic and configuring just one parameter yields in undesirable state transitions of the service to configure. It is good to send all the parameters in one "atomic" message. But, I'm understand that this may require to persist current network parameters on both sides of transmission (or, at least, to have all of them on sending side upfront).
So, it needs to add DBUS getters/setters for just protocol type, and all parameters at once.
I'm interested in what other components may be affected by such improvements?
Your comments will be appreciated.
Regards!
Gleb
Quoted 3 lines · Gleb Semenov
1. Modification of the
xyz/openbmc_project/Network/Client.interface.yamlinterface to add the protocol attribute.
You may want either a separate interface or a separate path to identify TCP vs UDP (Network.Transport?). There are enough users of Network.Client that you probably don't also want to modify all of them to have "TCP". Maybe we could set TCP as the default on a new property, but I think most protocols only have only a single implied protocol, so you're now forcing error paths onto all of them if "Transport != TCP".
Make sure this is done as an enumeration.
Quoted 1 line
2. Handling for the interface changes in the code of the dbusplus library.
Not sure what you mean by this. The phosphor-dbus-interfaces is where the YAML is and the result is generated. I don't think there should be any changes to the sdbusplus repository for this proposal.
Quoted 1 line
3. Corresponding changes to the phosphor-rsyslog-config service.
(This is phosphor-logging)
Quoted 1 line
4. Proper changes to the REST/redfish API.
Do you have a Redfish schema already to handle this?
Quoted 1 line
5. Modification of the web interface and command line tools.
Which CLIs? I'm not aware of any that are relevant here.
Quoted 11 lines
Also, current DBUS interface to the object implies two independent messages to change network parameters, one to set the IP-address, and the other to set the port number. They are not atomic and configuring just one parameter yields in undesirable state transitions of the service to configure. It is good to send all the parameters in one "atomic" message. But, I'm understand that this may require to persist current network parameters on both sides of transmission (or, at least, to have all of them on sending side upfront).
So, it needs to add DBUS getters/setters for just protocol type, and all parameters at once.
The "getters/setters" are defined by the dbus specification. We should not add new methods that set the properties. See org.freedesktop.DBus.Properties.Set[1].
If you need to be able to atomically construct a new configuration, you should look to the 'Create' pattern found in the rest of the phosphor-dbus-interface repository.
``` $ find -name Create.interface.yaml ./yaml/com/ibm/Dump/Create.interface.yaml ./yaml/xyz/openbmc_project/Certs/CSR/Create.interface.yaml ./yaml/xyz/openbmc_project/Dump/Create.interface.yaml ./yaml/xyz/openbmc_project/HardwareIsolation/Create.interface.yaml ./yaml/xyz/openbmc_project/Logging/Syslog/Destination/Mail/Create.interface.yaml ./yaml/xyz/openbmc_project/Logging/Create.interface.yaml ./yaml/xyz/openbmc_project/Network/Client/Create.interface.yaml ./yaml/xyz/openbmc_project/User/Ldap/Create.interface.yaml ```
You'll note that Network.Client.Create already exists, which is probably what you're looking for.
Quoted 3 lines
Regards!
Gleb
1. https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties
Signature · 1 line
Patrick Williams
Quoted 5 lines · Patrick Williams
Quoted 3 lines · Gleb Semenov
1. Modification of the
xyz/openbmc_project/Network/Client.interface.yamlinterface to add the protocol attribute.
Quoted 8 lines
You may want either a separate interface or a separate path to identify TCP vs UDP (Network.Transport?). There are enough users of Network.Client that you probably don't also want to modify all of them to have "TCP". Maybe we could set TCP as the default on a new property, but I think most protocols only have only a single implied protocol, so you're now forcing error paths onto all of them if "Transport != TCP".
Make sure this is done as an enumeration.
Seems You are right, The semantics of the "protocol" field may be differ for different services. For SNMP, for example, the "protocol" specification means a pair (transport, SNMP version), rather than just TCP or UDP. So distinct interface and path will be better.
Quoted 5 lines
Quoted 2 lines
2. Handling for the interface changes in the code of the dbusplus library.
Not sure what you mean by this. The phosphor-dbus-interfaces is where the YAML is and the result is generated. I don't think there should be any changes to the sdbusplus repository for this proposal.
Yep. If we conclude to implement a distinct interface/path for the protocol specification for rsyslog, than to add a proper handler to phosphor-logging is enough.
Quoted 6 lines
Quoted 2 lines
3. Corresponding changes to the phosphor-rsyslog-config service.
(This is phosphor-logging)
Quoted 1 line
4. Proper changes to the REST/redfish API.
Do you have a Redfish schema already to handle this?
It is "under construction".
Quoted 35 lines
Quoted 2 lines
5. Modification of the web interface and command line tools.
Which CLIs? I'm not aware of any that are relevant here.
Quoted 11 lines
Also, current DBUS interface to the object implies two independent messages to change network parameters, one to set the IP-address, and the other to set the port number. They are not atomic and configuring just one parameter yields in undesirable state transitions of the service to configure. It is good to send all the parameters in one "atomic" message. But, I'm understand that this may require to persist current network parameters on both sides of transmission (or, at least, to have all of them on sending side upfront).
So, it needs to add DBUS getters/setters for just protocol type, and all parameters at once.
The "getters/setters" are defined by the dbus specification. We should not add new methods that set the properties. See org.freedesktop.DBus.Properties.Set[1].
If you need to be able to atomically construct a new configuration, you should look to the 'Create' pattern found in the rest of the phosphor-dbus-interface repository.
``` $ find -name Create.interface.yaml ./yaml/com/ibm/Dump/Create.interface.yaml ./yaml/xyz/openbmc_project/Certs/CSR/Create.interface.yaml ./yaml/xyz/openbmc_project/Dump/Create.interface.yaml ./yaml/xyz/openbmc_project/HardwareIsolation/Create.interface.yaml ./yaml/xyz/openbmc_project/Logging/Syslog/Destination/Mail/Create.interface.yaml ./yaml/xyz/openbmc_project/Logging/Create.interface.yaml ./yaml/xyz/openbmc_project/Network/Client/Create.interface.yaml ./yaml/xyz/openbmc_project/User/Ldap/Create.interface.yaml ```
Quoted 2 lines
You'll note that Network.Client.Create already exists, which is probably what you're looking for.
May be, thanks.
Quoted 6 lines
Quoted 4 lines
Regards!
Gleb
1. https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties
Quoted 14 lines · Gleb Semenov
Quoted 12 lines · Patrick Williams
Quoted 3 lines · Gleb Semenov
1. Modification of the
xyz/openbmc_project/Network/Client.interface.yamlinterface to add the protocol attribute.You may want either a separate interface or a separate path to identify TCP vs UDP (Network.Transport?). There are enough users of Network.Client that you probably don't also want to modify all of them to have "TCP". Maybe we could set TCP as the default on a new property, but I think most protocols only have only a single implied protocol, so you're now forcing error paths onto all of them if "Transport != TCP".
Quoted 6 lines
Quoted 1 line
Make sure this is done as an enumeration.
Seems You are right, The semantics of the "protocol" field may be differ for different services. For SNMP, for example, the "protocol" specification means a pair (transport, SNMP version), rather than just TCP or UDP. So distinct interface and path will be better.
Just a minor remark. You wrote "interface and path" but I meant interface OR path. As in, one of these two options:
1. Add an interface such as Network.Protocol which resides at the same path location as your 'rsyslog' Network.Client interface instance.
2. Add and document two paths, such as /.../rsyslog-tcp and /.../rsyslog-udp which both implement Network.Client for the corresponding protocol.
Signature · 1 line
Patrick Williams
Hi Gleb,
I share a problem I encountered some time ago about using UDP rsyslog.If there are more UDP(About 50 logs per second) logs, will block ipmi messages,
due to bad udp tx performance.
My network is a 1000M direct connection, using iperf3 to verify.
``` ./iperf3 -u -c 192.168.1.2 -b 1000m -t 10 -p 1314 Connecting to host 192.168.1.2, port 1314 [ 5] local 192.168.1.108 port 55038 connected to 192.168.1.2 port 1314 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 58.0 KBytes 475 Kbits/sec 41 [ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 6.00-7.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 7.00-8.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 9.00-10.00 sec 0.00 Bytes 0.00 bits/sec 0 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 58.0 KBytes 47.5 Kbits/sec 0.000 ms 0/41 (0%) sender [ 5] 0.00-11.69 sec 58.0 KBytes 40.6 Kbits/sec 0.030 ms 0/41 (0%) receiver ```
I found a patch[0] that may fix it.
Apply this patch:
``` iperf3 -u -c 192.168.1.2 -b 1000m -t 10 -p 1314 Connecting to host 192.168.1.2, port 1314 [ 5] local 192.168.1.108 port 34362 connected to 192.168.1.2 port 1314 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.01 sec 23.2 MBytes 193 Mbits/sec 16782 [ 5] 1.01-2.01 sec 24.8 MBytes 209 Mbits/sec 17977 [ 5] 2.01-3.00 sec 31.5 MBytes 266 Mbits/sec 22819 [ 5] 3.00-4.00 sec 28.3 MBytes 237 Mbits/sec 20461 [ 5] 4.00-5.00 sec 27.6 MBytes 232 Mbits/sec 19996 [ 5] 5.00-6.00 sec 28.3 MBytes 237 Mbits/sec 20498 [ 5] 6.00-7.00 sec 30.1 MBytes 252 Mbits/sec 21796 [ 5] 7.00-8.00 sec 28.5 MBytes 239 Mbits/sec 20609 [ 5] 8.00-9.00 sec 25.0 MBytes 210 Mbits/sec 18140 [ 5] 9.00-10.00 sec 24.1 MBytes 202 Mbits/sec 17457 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 271 MBytes 228 Mbits/sec 0.000 ms 0/196535 (0%) sender [ 5] 0.00-10.04 sec 271 MBytes 227 Mbits/sec 0.065 ms 0/196535 (0%) receiver ```
[0]: https://github.com/AspeedTech-BMC/linux/commit/05c055107d56cd699bc88a3440665d95d9a634ff
Cheers,
Jian
Quoted 26 lines · Gleb Semenov
Hello colleagues!
I'm a new member of the Yadro OBMC team and currently working on modifications of the phosphor logging service. Our client requested us to make OBMC's rsyslog to use UDP transport for remote logging. Currently it uses just TCP and this configuration is hard-coded.
It looks like the phosphor-rsyslog-config has only one external dependency, namely the sdbusplus library, which provides appropriate DBUS interface handler to configure network parameters. Also it needs to modify DBUS interface description for network client.
The following should be performed:
Modification of the
xyz/openbmc_project/Network/Client.interface.yamlinterface to add the protocol attribute. Handling for the interface changes in the code of the dbusplus library.
Corresponding changes to the phosphor-rsyslog-config service.
Proper changes to the REST/redfish API.
Modification of the web interface and command line tools.Also, current DBUS interface to the object implies two independent messages to change network parameters, one to set the IP-address, and the other to set the port number. They are not atomic and configuring just one parameter yields in undesirable state transitions of the service to configure. It is good to send all the parameters in one "atomic" message. But, I'm understand that this may require to persist current network parameters on both sides of transmission (or, at least, to have all of them on sending side upfront).
So, it needs to add DBUS getters/setters for just protocol type, and all parameters at once.
I'm interested in what other components may be affected by such improvements?
Your comments will be appreciated.
Regards!
Gleb
Hi Jian!
Thank You for this note. We must pay attention to this circumstance during test phase.
Regards!
Gleb
Quoted 90 lines · Zhang Jian
Hi Gleb,
I share a problem I encountered some time ago about using
UDPrsyslog.If there are more UDP(About 50 logs per second) logs, will block ipmi messages,
due to bad udp tx performance.My network is a 1000M direct connection, using
iperf3to verify.``` ./iperf3 -u -c 192.168.1.2 -b 1000m -t 10 -p 1314 Connecting to host 192.168.1.2, port 1314 [ 5] local 192.168.1.108 port 55038 connected to 192.168.1.2 port 1314 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 58.0 KBytes 475 Kbits/sec 41 [ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 6.00-7.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 7.00-8.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec 0 [ 5] 9.00-10.00 sec 0.00 Bytes 0.00 bits/sec 0 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 58.0 KBytes 47.5 Kbits/sec 0.000 ms 0/41 (0%) sender [ 5] 0.00-11.69 sec 58.0 KBytes 40.6 Kbits/sec 0.030 ms 0/41 (0%) receiver ```I found a patch[0] that may fix it.
Apply this patch:``` iperf3 -u -c 192.168.1.2 -b 1000m -t 10 -p 1314 Connecting to host 192.168.1.2, port 1314 [ 5] local 192.168.1.108 port 34362 connected to 192.168.1.2 port 1314 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.01 sec 23.2 MBytes 193 Mbits/sec 16782 [ 5] 1.01-2.01 sec 24.8 MBytes 209 Mbits/sec 17977 [ 5] 2.01-3.00 sec 31.5 MBytes 266 Mbits/sec 22819 [ 5] 3.00-4.00 sec 28.3 MBytes 237 Mbits/sec 20461 [ 5] 4.00-5.00 sec 27.6 MBytes 232 Mbits/sec 19996 [ 5] 5.00-6.00 sec 28.3 MBytes 237 Mbits/sec 20498 [ 5] 6.00-7.00 sec 30.1 MBytes 252 Mbits/sec 21796 [ 5] 7.00-8.00 sec 28.5 MBytes 239 Mbits/sec 20609 [ 5] 8.00-9.00 sec 25.0 MBytes 210 Mbits/sec 18140 [ 5] 9.00-10.00 sec 24.1 MBytes 202 Mbits/sec 17457 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 271 MBytes 228 Mbits/sec 0.000 ms 0/196535 (0%) sender [ 5] 0.00-10.04 sec 271 MBytes 227 Mbits/sec 0.065 ms 0/196535 (0%) receiver ```[0]:https://github.com/AspeedTech-BMC/linux/commit/05c055107d56cd699bc88a3440665d95d9a634ff
Cheers,
JianQuoted 25 lines · Gleb Semenov
Hello colleagues!
I'm a new member of the Yadro OBMC team and currently working on modifications of the phosphor logging service. Our client requested us to make OBMC's rsyslog to use UDP transport for remote logging. Currently it uses just TCP and this configuration is hard-coded.
It looks like the phosphor-rsyslog-config has only one external dependency, namely the sdbusplus library, which provides appropriate DBUS interface handler to configure network parameters. Also it needs to modify DBUS interface description for network client.
The following should be performed:
Modification of the
xyz/openbmc_project/Network/Client.interface.yamlinterface to add the protocol attribute. Handling for the interface changes in the code of the dbusplus library.
Corresponding changes to the phosphor-rsyslog-config service.
Proper changes to the REST/redfish API.
Modification of the web interface and command line tools.Also, current DBUS interface to the object implies two independent messages to change network parameters, one to set the IP-address, and the other to set the port number. They are not atomic and configuring just one parameter yields in undesirable state transitions of the service to configure. It is good to send all the parameters in one "atomic" message. But, I'm understand that this may require to persist current network parameters on both sides of transmission (or, at least, to have all of them on sending side upfront).
So, it needs to add DBUS getters/setters for just protocol type, and all parameters at once.
I'm interested in what other components may be affected by such improvements?
Your comments will be appreciated.
Regards!
Gleb