Works with 20.1
bkr system-release was changed in 20.2 for bug 1102442. Looking at the patch I see that there is some missing error handling in the new version. --- a/Client/src/bkr/client/commands/cmd_system_release.py +++ b/Client/src/bkr/client/commands/cmd_system_release.py @@ -73,3 +73,4 @@ def run(self, *args, **kwargs): update_url = 'systems/%s/reservations/+current' % urllib.quote(fqdn, '') requests_session = self.requests_session() res = requests_session.patch(update_url, json={'finish': 'now'}) + res.raise_for_status() So this probably means that your bkr system-release command was actually being reject but the client wasn't telling you so. Why it would be rejected, I am not sure exactly. The possibilities are: * no permission to release the system * system is running a recipe (cancel the recipe instead) * some other bug
(In reply to Miroslav Vadkerti from comment #3) > So another bug? After adding your patch I see: > > -bash-4.1$ bkr system-release cc-ns4.lab.eng.brq.redhat.com > HTTP error: 400 Client Error: BAD REQUEST > Reservation durations are not configurable > > -bash-4.1$ rpm -q beaker-client > beaker-client-20.2-1.el6eng.noarch Yes, this is another bug, the quick fix is --- a/Client/src/bkr/client/commands/cmd_system_release.py +++ b/Client/src/bkr/client/commands/cmd_system_release.py @@ -72,4 +72,4 @@ def run(self, *args, **kwargs): for fqdn in args: update_url = 'systems/%s/reservations/+current' % urllib.quote(fqdn, '') requests_session = self.requests_session() - res = requests_session.patch(update_url, json={'finish': 'now'}) + res = requests_session.patch(update_url, json={'finish_time': 'now'})
Another workaround is to downgrade to 20.1 version of the client, which doesn't have this problem.
In bug https://bugzilla.redhat.com/show_bug.cgi?id=1102442, we only have test cases to cover the server side changes which are not efficient. I add some client tests to make sure the bkr system-release command can run successfully. On Gerrit: http://gerrit.beaker-project.org/#/c/4359/
(In reply to matt jia from comment #9) > In bug https://bugzilla.redhat.com/show_bug.cgi?id=1102442, we only have > test cases to cover the server side changes which are not efficient. I add Sorry, I mean not sufficient. > some client tests to make sure the bkr system-release command can run > successfully. > > > On Gerrit: > > http://gerrit.beaker-project.org/#/c/4359/
This bug fix is included in beaker-client-21.1-0.git.2.89c3959 which is available for download here: https://beaker-project.org/nightlies/release-21/
Beaker 21.0 has been released.