Skip to content

Needed subscriptions counts incorrect when using the MariaDB python add on #1759

@tuxmaster5000

Description

@tuxmaster5000

Bareos component version

All parts are using 23.0.2.

Steps to reproduce

Open the Subscription tab in the web ui, or call
status subscriptions all
in the console.

Expected results

That the MariaDB Plug-in also counted like the PostgreSQL one.

Actual results

For the PostgreSQL add on, the clients count 2 times. One for the add-on (1 db_units) and one for the file level (1 normal_units) backup like expected.
The MariaDB clients are counted only as file level(1 normal_units) clients.
Sample output:

| pgsqlhost | PostgreSQL | 1 | | | |
| pgsqlhost | | | | | 1 |
| mariadbhost | | | | | 1 |
| msSQL | MSSQL-default:Foo | 1 | | | |
| msSQL | | | | | 1 |

Environment

- OS: `Rocky 8+9`
Fileset for MariaDB:
 Include {
    Options {
      Signature = SHA512
      Compression = GZIP9
      Accurate = pugsmc1n
      No Atime = yes
      # Bug https://bugs.bareos.org/view.php?id=1449
      Check File Changes = no
      # For Bareos 23
      Hard Links = yes
    }
    Plugin = "python"
             ":module_path=/usr/lib64/bareos/plugins"
             ":module_name=bareos-fd-mariabackup"
             ":mycnf=/etc/bareos/mariadb.cnf"
    File = "/etc/my.cnf"
    File = "/etc/my.cnf.d"
    File = "\\|sh -c 'ls /etc/mariadb_* 2>/dev/null|cat'"
    File = "\\|sh -c 'ls /etc/mysql_* 2>/dev/null|cat'"
  }
File set for PostgreSQL:
Include {
    Options {
      Signature = SHA512
      Compression = GZIP9
      Accurate = pugsmc1n
      No Atime = yes
      # Bug https://bugs.bareos.org/view.php?id=1452
      Check File Changes = no
      # For Bareos 23
      Hard Links = yes
    }
    File = "\\|sh -c 'ls /etc/psql_*'"
    Plugin = "python"
             ":module_path=/usr/lib64/bareos/plugins"
             ":module_name=bareos-fd-postgresql"
             ":wal_archive_dir=/var/lib/pgsql/wal_archive"
             ":switch_wal_timeout=120"
             ":db_host=/var/run/postgresql"
             ":role=backup"
  }

Relevant log output

When call it in the console, no uncounted will listed:
Clients/Filesets that cannot be categorized for backup units yet:
No results to list.

Amount of data that cannot be categorized for backup units yet:
         unknown_mb:
 unknown_percentage:

Relevant traces output

No response

Anything else?

In the price list https://www.bareos.com/Bareos_Preisliste.pdf
All three database add ons (PostgreSQL, MariaDB, MSSQL) are listed as an separate unit.
An test MSQL server are also counted twice. One for the the data base an one for the file level.

Metadata

Metadata

Labels

bugThis addresses a bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions