Skip to content

Partitioning: Include 802.1x history - #461

Merged
TheWitness merged 3 commits into
developfrom
fix/dot1x-partitioning
Nov 18, 2026
Merged

TheWitness merged 3 commits into
developfrom
fix/dot1x-partitioning

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Description

Partition mac_track_dot1x on fresh installs and include it in partition maintenance, status and upgrade_partitioning.php rebuilds. Preserve the existing port retention setting and bump INFO to 5.1.

Related Issue

User-requested fix; no matching open issue identified.

Motivation and Context

802.1x history was left unpartitioned and omitted from rebuilds, unlike port and IP history. Existing installations can rebuild it with the partitioning utility or CLI.

How Has This Been Tested?

  • PHP 8.5.12: 465 partition and activity tests passed in an isolated Cacti 1.2.x checkout.
  • PHP syntax checks, manifest validation, and i18n template check passed.
  • A live MySQL/MariaDB migration was not run.

Screenshots (if appropriate):

Not applicable.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation repository accordingly.

The plugin README was updated; no separate documentation repository was changed.

Apply the existing scan-date partition lifecycle to 802.1x history while retaining the port retention setting and supporting interrupted upgrades. Bump the plugin version to 5.1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 18:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new 802.1x history rebuilds and partition-dropping retention lack live MySQL/MariaDB validation of row preservation, retention behavior, and interrupted-rebuild recovery.

No open issues 🎉

What changed in this PR

Extends the Cacti Device Tracking plugin’s existing history partitioning to include 802.1x events alongside MAC and IP address history.

Changes:

  • Includes mac_track_dot1x in fresh-install partitioning, maintenance, rebuilds, and status reporting while preserving the existing port-retention setting.
  • Expands regression coverage and updates maintenance notices, documentation, and translation strings.
  • Bumps the plugin version to 5.1 and records the change.
File Description
tests/​Unit/​PartitionRebuildTest.php Covers 802.1x installation, rebuilds, interruption detection, retention, and notices.
tests/​Unit/​PartitionMaintainTest.php Tests 802.1x partition maintenance and unpartitioned retention behavior.
tests/​Unit/​ArpDot1xRetentionTest.php Updates the assertion for the retention-deletion fallback.
setup.php Clarifies that the partition-size setting includes 802.1x.
README.md Documents partitioning and rebuild behavior for all three history tables.
mactrack_view_dot1x.php Displays the partition-rebuild maintenance notice.
mactrack_utilities.php Adds 802.1x partition status and updates utility descriptions.
locales/​po/​cacti.pot Refreshes translation strings for the expanded partitioning scope.
lib/​mactrack_partitions.php Registers 802.1x history in the shared partition-table list.
lib/​mactrack_partition_rebuild.php Updates shared rebuild messages and documentation.
lib/​mactrack_partition_ops.php Records separate 802.1x partition-maintenance status.
lib/​mactrack_functions.php Adds partition-aware 802.1x retention and updates rebuild confirmation text.
lib/​mactrack_activity.php Includes 802.1x in partitioning activity messages.
INFO Changes the plugin version from 5.0 to 5.1.
includes/​database.php Partitions newly created 802.1x history tables.
cli/​upgrade_partitioning.php Updates CLI help, warnings, and comments to include 802.1x.
CHANGELOG.md Records the 802.1x partitioning fix.

Review effort: Balanced

TheWitness and others added 2 commits November 18, 2026 18:41
Remove the repeated install-time partition initialization and preserve the rule that existing history tables are never repartitioned by setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cover both history tables with finite and unlimited port retention without duplicating maintenance scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@TheWitness
TheWitness merged commit 07d8a70 into develop Nov 18, 2026
8 of 9 checks passed
@TheWitness
TheWitness deleted the fix/dot1x-partitioning branch November 18, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants