Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot configure refclocks #189

Open
bmagistro opened this issue Jan 4, 2024 · 1 comment · May be fixed by #190
Open

Cannot configure refclocks #189

bmagistro opened this issue Jan 4, 2024 · 1 comment · May be fixed by #190

Comments

@bmagistro
Copy link

bmagistro commented Jan 4, 2024

  • Module version: 2.6.0 (source for this does not appear to have changed in main)

How to reproduce (e.g Puppet code you use)

This should be reproducibe with the example in the init.pp file as well for refclock

class { 'chrony':
  refclock => { 'sock' => ['/run/chrony.ttyAMA0.sock refid GPS precision 1e-1', '/run/chrony.pps0.sock refid PPS precision 1e-7'] }
}

What are you seeing

refclocks expects an array value, got a struct

What behaviour did you expect instead

a properly formed chrony.conf with two hardware refclocks configured


when updating init.pp to be a hash to accept the above line, it then concatenates both hardware clocks into a single line which is an error in the chrony config. this should be two lines. the template needs another layer of looping to generate this.


with some luck will be able to provide a pr for this later this week/next week

bmagistro added a commit to bmagistro/puppet-chrony that referenced this issue Jan 4, 2024
This updates the refclock parameter data types to be a hash which
matches the examples and updates the template to properly generate
multiple refclock entries.

This looks to have broken via a combination of voxpupuli#141 and voxpupuli#79. Rather than
restore the full variations that were supported in voxpupuli#79 a simplified hash
structure was chosen.

Fixes voxpupuli#189

Signed-off-by: Ben Magistro <koncept1@gmail.com>
bmagistro added a commit to bmagistro/puppet-chrony that referenced this issue Jan 4, 2024
This updates the refclock parameter data types to be a hash which
matches the examples and updates the template to properly generate
multiple refclock entries.

This looks to have broken via a combination of voxpupuli#141 and voxpupuli#79. Rather than
restore the full variations that were supported prior to voxpupuli#79 a simplified
hash structure was chosen.

Fixes voxpupuli#189

Signed-off-by: Ben Magistro <koncept1@gmail.com>
@bmagistro bmagistro linked a pull request Jan 4, 2024 that will close this issue
bmagistro added a commit to bmagistro/puppet-chrony that referenced this issue Jan 4, 2024
This updates the refclock parameter data types to be a hash which
matches the examples and updates the template to properly generate
multiple refclock entries.

This looks to have broken via a combination of voxpupuli#141 and voxpupuli#79. Rather than
restore the full variations that were supported prior to voxpupuli#79 a simplified
hash structure was chosen.

Fixes voxpupuli#189

Signed-off-by: Ben Magistro <koncept1@gmail.com>
kenyon pushed a commit to bmagistro/puppet-chrony that referenced this issue Feb 26, 2024
This updates the refclock parameter data types to be a hash which
matches the examples and updates the template to properly generate
multiple refclock entries.

This looks to have broken via a combination of voxpupuli#141 and voxpupuli#79. Rather than
restore the full variations that were supported prior to voxpupuli#79 a simplified
hash structure was chosen.

Fixes voxpupuli#189

Signed-off-by: Ben Magistro <koncept1@gmail.com>
@pavlinpetkov
Copy link

Have the same issue. Current workaround for me is to configure it with nested arrays:

    class { 'chrony':
      refclocks => [['PHC', '/dev/ptp0', 'poll', '3', 'dpoll', '-2', 'offset', '0', 'stratum', '2']]
    }

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 a pull request may close this issue.

2 participants