Page MenuHomeVyOS Platform

Long config entries cause incorrect reading of device config
Open, NormalPublicBUG

Description

Setting config options with very long entries (>512), cause incorrect reading of the device config. I noticed this when setting the an ssh-rsa pubkey using the vyos_config module, as it would constantly claim that the key I am setting is different from the key found on the device, causing ansible to consider the task as "changed". When looking at the commands that come from the device and get compared to the desired config, I noticed that the 513th character in the line would get replaces by a space.

A dirty fix for this is to increase the terminal width to 1024 in https://github.com/ansible-collections/vyos.vyos/blob/main/plugins/terminal/vyos.py#L70

Details

Difficulty level
Unknown (require assessment)
Version
5.0.0
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)