Skip to content

Conversation

@aitestino
Copy link
Collaborator

Problem

The persistent_url attribute in the logging resource causes test failures on C8000v 17.15.3 due to
version-specific path normalization behavior. When the test configures flash:/local_logging, IOS-XE 17.15.3
normalizes this to the canonical device name bootflash:/local_logging, causing Terraform to detect configuration
drift.

Test failures:

  • TestAccDataSourceIosxeLogging on C8000v 17.15.3
  • TestAccIosxeLogging on C8000v 17.15.3

Error observed:

persistent_url = "bootflash:/local_logging" -> "flash:/local_logging"
Plan: 0 to add, 1 to change, 0 to destroy.

Root Cause

Cisco changed storage path normalization behavior between IOS-XE versions:

IOS-XE 17.12.4 behavior:

  • Accepts bootflash: input
  • Normalizes TO flash: (alias form)
  • Test configures flash:, device returns flash: → No drift ✓

IOS-XE 17.15.3 behavior:

  • Accepts flash: input
  • Normalizes TO bootflash: (canonical form)
  • Test configures flash:, device returns bootflash: → Drift detected ✗

CLI verification on C9300 17.12.4:

Switch(config)# logging persistent url bootflash:/local_logging
Switch(config)#
*Nov  8 20:32:41.411: %SYS-5-LOG_CONFIG_CHANGE: Persistent logging: enabled, url flash:/local_logging

Switch(config)# do show running-config | inc logging persistent
logging persistent url flash:/local_logging

The device accepted bootflash: but stored/returned flash: in the running config, confirming version-specific
normalization.

Related Issues

Introduced by:

The original PR added persistent logging attributes with flash:/local_logging as the example, which works on
17.12 but causes drift on 17.15.3 due to the version-specific normalization behavior discovered during testing.

The persistent_url attribute uses flash:/local_logging which causes test failures on IOS-XE 17.15.3 due to version-specific path normalization. When configured with flash:, 17.15.3 normalizes to bootflash: causing Terraform to detect drift. 17.12 preserves the flash: alias without normalization. Adding test_tags: [IOSXE1712] restricts testing to 17.12 where the example works without drift.
Wraps persistent_url test assertions and configuration with IOSXE1712 environment check to prevent the attribute from being tested on 17.15.3 where device path normalization causes drift. Generated by: make gen NAME="Logging"
Wraps persistent_url test assertions and configuration with IOSXE1712 environment check to prevent the attribute from being tested on 17.15.3 where device path normalization causes drift. Generated by: make gen NAME="Logging"
Updates example resource configuration. The persistent_url attribute is now restricted to IOS-XE 17.12 testing due to version-specific normalization. Generated by: make gen NAME="Logging"
Updates generated documentation to reflect persistent_url testing restrictions. Generated by: make gen NAME="Logging"
@aitestino aitestino added the enhancement New feature or request label Nov 8, 2025
@aitestino aitestino merged commit 54be31e into CiscoDevNet:main Nov 8, 2025
3 checks passed
@aitestino aitestino changed the title Fix/logging persistent fix: logging persistent_url flash vs. bootflash Nov 8, 2025
@aitestino aitestino added CI and removed enhancement New feature or request labels Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant