Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(partition): fix partengine regex #10952

Merged
merged 2 commits into from
Jun 17, 2022
Merged

fix(partition): fix partengine regex #10952

merged 2 commits into from
Jun 17, 2022

Conversation

s-duret
Copy link
Contributor

@s-duret s-duret commented Apr 7, 2022

Description

When running the cron script to create the partitions (/usr/share/centreon/cron/centreon-partitioning.php) there is an error saying that the partition already exists:

Error: cannot add a new partition 'p20220126' for table centreon_storage.data_bin, SQLSTATE[HY000]: General error: 1517 Duplicate partition name p20220126

This is fixed on the regex that has extra backticks and does not recognize properly the values for the last created partition.

Fixes #10265

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software
  • Updating documentation (missing information, typo...)

Target serie

  • 20.10.x
  • 21.04.x
  • 21.10.x
  • 22.04.x (master)

How this pull request can be tested ?

Please describe the procedure to verify that the goal of the PR is matched. Provide clear instructions so that it can be correctly tested.

Any relevant details of the configuration to perform the test should be added.

Checklist

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have made corresponding changes to the documentation.
  • I have rebased my development branch on the base branch (master, maintenance).

@s-duret s-duret requested review from a team, adr-mo, a-launois, jeremyjaouen and kduret and removed request for a-launois and adr-mo April 7, 2022 09:41
@s-duret s-duret removed the request for review from jeremyjaouen April 7, 2022 10:09
@sonarqube-decoration
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell D 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lpinsivy lpinsivy merged commit 99e8a9c into develop Jun 17, 2022
@lpinsivy lpinsivy deleted the MON-12927 branch June 17, 2022 08:30
lpinsivy pushed a commit that referenced this pull request Jun 17, 2022
Co-authored-by: Kevin Duret <kduret@centreon.com>
lpinsivy pushed a commit that referenced this pull request Jun 17, 2022
Co-authored-by: Kevin Duret <kduret@centreon.com>
lpinsivy pushed a commit that referenced this pull request Jun 17, 2022
Co-authored-by: Kevin Duret <kduret@centreon.com>
emabassi-ext pushed a commit that referenced this pull request Jul 26, 2022
Co-authored-by: Kevin Duret <kduret@centreon.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants