Project

General

Profile

Actions

action #174808

closed

Synchronization between two openQA-WebUI servers with openqa-load-templates fails with "Internal Server Error: Unable to create group" size:S

Added by zagagyka 4 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
High
Category:
Support
Target version:
Start date:
2024-12-26
Due date:
2025-01-22
% Done:

0%

Estimated time:

Description

We have two running openQA-WebUI servers:
1st - production, where tests are run every day
2nd - test server, where new tests are developed.

When new products or test suites are added or modified on the 2nd server, I try to apply these changes to the 1st server using openqa-dump-templates and openqa-load-templates (so I don’t have to do it manually). However, I encounter an error.
On 2nd server:
$ openqa-dump-templates > dump.yaml
$ scp dump.yaml user@1st_server:~/

On 1st server:
$ openqa-load-templates --update dump.yml
Internal Server Error: Unable to create group with existing name 'JOB_GROUP_NAME' at /usr/bin/openqa-load-templates line 109.

Despite this error, records are successfully added or updated in the Medium types, Machines, and Test suites tables. The script then fails while trying to create a job group with a name that already exists (it’s unclear why it tries to create a group at all). As a result, it looks like the script never completes properly.

Is this the expected behavior of the script?

Is there a correct way to synchronize configuration between two openQA-WebUI servers?

Actions #1

Updated by okurz 4 months ago

  • Tags set to reactive work, support
  • Subject changed from Synchronization between two openQA-WebUI servers to Synchronization between two openQA-WebUI servers with openqa-load-templates fails with "Internal Server Error: Unable to create group"
  • Category set to Support
  • Priority changed from Normal to High
  • Target version set to Ready
Actions #2

Updated by gpuliti 4 months ago

  • Subject changed from Synchronization between two openQA-WebUI servers with openqa-load-templates fails with "Internal Server Error: Unable to create group" to Synchronization between two openQA-WebUI servers with openqa-load-templates fails with "Internal Server Error: Unable to create group" size:S
  • Status changed from New to Workable
Actions #3

Updated by gpuliti 4 months ago

  • Assignee set to robert.richardson
Actions #4

Updated by robert.richardson 4 months ago

It seems that the scripts post_entry function does not check if a group already exists which leads to this error.
Looking at the tests, this is currently expected.
I was also able to reproduce the error message on a fresh install by only adding one job group, creating a dump, then trying to import it.

Even though expected, i'm not sure this behaviour makes much sense here. IMO one would expect the --update to make it not fail on duplicate entries. I've created a PR to make sure already existing job groups are not created and extended the related t/40-script_load_dump_templates.t

Actions #5

Updated by robert.richardson 4 months ago

  • Status changed from Workable to In Progress
Actions #6

Updated by openqa_review 4 months ago

  • Due date set to 2025-01-22

Setting due date based on mean cycle time of SUSE QE Tools

Actions #7

Updated by robert.richardson 3 months ago

  • Status changed from In Progress to Resolved

PR (merged)

Actions

Also available in: Atom PDF