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

Add initstepslew #116

Merged
merged 4 commits into from
Jul 6, 2021
Merged

Add initstepslew #116

merged 4 commits into from
Jul 6, 2021

Conversation

jasonknudsen
Copy link
Contributor

Pull Request (PR) description

Add initstepslew parameter which allows chronyd to make a rapid measurement of the system clock error at boot time, and to correct the system clock by stepping before normal operation begins

This Pull Request (PR) fixes the following issues

Adds new functionality to the module that wasn't available

@jasonknudsen jasonknudsen mentioned this pull request Jul 2, 2021
@smortex smortex added the enhancement New feature or request label Jul 2, 2021
@smortex
Copy link
Member

smortex commented Jul 3, 2021

@jasonknudsen CI should be fixed in master. Can you please rebase on top of it and force push to update this PR?

@smortex
Copy link
Member

smortex commented Jul 6, 2021

Oops, conflicts!

Let's fix it:

  1. Ensure master is up-to-date:
git checkout master
git pull
git checkout add-initstepslew
  1. Rebase:
git rebase master

Git will stop after the first commit because of conflicts. git status will tell you what is the current situation: templates/chrony.conf.epp and spec/classes/chrony_spec.rb need to be fixed, conflicts are marked like so:

<<<<<<< HEAD
code already in the branch
=======
code supposed to be added
>>>>>>> commit detail

e.g.:

            config_keys_manage: true,
            chrony_password: 'sunny',
<<<<<<< HEAD
            bindaddress: ['10.0.0.1', '::1'],
            bindcmdaddress: ['10.0.0.1'],
=======
	    bindcmdaddress: ['10.0.0.1'],
            initstepslew: '600'
>>>>>>> Add initstepslew parameter which allows chronyd to make a rapid measurement of the system clock error at boot time, and to correct the system clock by stepping before normal operation begins
            cmdacl: ['cmdallow 1.2.3.4', 'cmddeny 1.2.3', 'cmdallow all 1.2'],
            leapsecmode: 'slew',

Fix the conflicts by combining the snippets and removing the markers, so that the code looks like what you want, in this example:

            config_keys_manage: true,
            chrony_password: 'sunny',
            bindaddress: ['10.0.0.1', '::1'],
            bindcmdaddress: ['10.0.0.1'],
            initstepslew: '600'
            cmdacl: ['cmdallow 1.2.3.4', 'cmddeny 1.2.3', 'cmdallow all 1.2'],
            leapsecmode: 'slew',

do this for all conflicts in all files.

When done, add the files, and continue the rebasing operation:

git add spec/classes/chrony_spec.rb templates/chrony.conf.epp
git rebase --continue

If you fixed the spacing problem, while fixing the conflicts in the first commit, the second commit will be empty after fixing conflicts, and git rebase --contine cannot be used: run git rebase --skip to skip this commit.

Then you are ready to git push -f to update this branch.

Thanks!

Jason Knudsen added 3 commits July 6, 2021 14:44
…rement of the system clock error at boot time, and to correct the system clock by stepping before normal operation begins
@jasonknudsen
Copy link
Contributor Author

Alright that'll hopefully sort it out, thanks!

Comment on lines +68 to +72
<% if $chrony::initstepslew { -%>

# Allow chronyd to make a rapid measurement of the system clock error at boot time,
# and to correct the system clock by stepping before normal operation begins.
initstepslew <%= $chrony::initstepslew %>
Copy link
Member

Choose a reason for hiding this comment

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

The { / } look unbalanced…

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

@smortex smortex merged commit d19b2d0 into voxpupuli:master Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants