uyuni-project / uyuni

Source code for Uyuni
https://www.uyuni-project.org/
GNU General Public License v2.0
429 stars 180 forks source link

spacewalk-common-channels: misleading error messages in the XMLRPC API log #1209

Open cbbayburt opened 5 years ago

cbbayburt commented 5 years ago

The spacewalk-common-channels code goes through the list of available channels and checks if any of them exists. It does this check by calling channel.software.getDetails. If this call returns an error, then it means the channel does not exist.

https://github.com/uyuni-project/uyuni/blob/5ed58013e23f8c0dc47863632e423b3f2eb7c22f/utils/spacewalk-common-channels#L141-L149

However, this method logs a stack trace to the rhn_web_api.log for each channel that cannot be found. So the following series of errors in the API log is actually part of the normal execution and should not be logged at all:

redstone.xmlrpc.XmlRpcFault: No such channel: ...

We need to find/create a new method in the API which gracefully checks a channel's existence and use that instead.

Additionally, as we found out from https://github.com/uyuni-project/uyuni/issues/1203, the type parameter is mandatory in channel.software.createRepo. We should have an empty check for that as well.

Shirocco88 commented 3 years ago

@cbbayburt does this issue still exist in uyuni-2021.06 ?