Page MenuHomeVyOS Platform

Cloud-Init domain search setting not applied
Closed, ResolvedPublicBUG

Description

SUMMARY

If the Cloud-Init network config contains a domain name, VyOS attempts to write it into the boot configuration. Unfortunately, this does not work and the domain search parameter is not applied.

STEPS TO REPRODUCE

Boot the router with the following Cloud-Init network config:

version: 1
config:
    - type: nameserver
      address:
      - '8.8.8.8'
      search:
      - 'example.com'

Run the following command:

show configuration commands | match domain-search

OBSERVED RESULT

No output.

EXPECTED RESULT

set system domain-search domain 'example.com'

SOFTWARE/OS VERSIONS

vyos-cloud-init @ 393cc322629604843b98da970b0761965a7a268e

ADDITIONAL INFORMATION

The issue is due to the fact that all calls in cc_vyos.py are of the following form:

config.set(['system', 'domain-search'], value=item, replace=False)

They should read like this instead:

config.set(['system', 'domain-search', 'domain'], value=item, replace=False)

Details

Difficulty level
Easy (less than an hour)
Version
1.4-rolling-202102180218
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Related Objects

Mentioned In
1.3.4

Event Timeline

dmbaturin set Issue type to Bug (incorrect behavior).Sep 25 2023, 1:36 PM