Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-85079

rhel-system-roles.timesync doesn't work when IPv6 is disabled in environment

    • rhel-sst-system-roles
    • 0
    • Dev ack
    • False
    • Yes
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • Unspecified Release Note Type - Unknown
    • Hide
      Feature: Add support for timesync_ntp_ip_family to allow setting the `-4`
      or `-6` OPTIONS in the chronyd or ntpd sysconfig file.

      Reason: When IPv6 is disabled on the node, you must tell chronyd to
      only listen for IPv4 using OPTIONS="-4" in the sysconfig file.
      Otherwise, chronyd will log error messages when binding to IPv6 sockets
      It's also useful to prevent the client from using IPv6 servers when IPv4
      is known to work better (e.g. IPv6 over a tunnel).

      Result: chronyd and ntpd can be configured to work correctly, and
      the services will not log errors, when IPv6 (or IPv4) is disabled
      on the node.

      Signed-off-by: Rich Megginson <rmeggins@redhat.com>
      Show
      Feature: Add support for timesync_ntp_ip_family to allow setting the `-4` or `-6` OPTIONS in the chronyd or ntpd sysconfig file. Reason: When IPv6 is disabled on the node, you must tell chronyd to only listen for IPv4 using OPTIONS="-4" in the sysconfig file. Otherwise, chronyd will log error messages when binding to IPv6 sockets It's also useful to prevent the client from using IPv6 servers when IPv4 is known to work better (e.g. IPv6 over a tunnel). Result: chronyd and ntpd can be configured to work correctly, and the services will not log errors, when IPv6 (or IPv4) is disabled on the node. Signed-off-by: Rich Megginson < rmeggins@redhat.com >
    • Proposed
    • None

      When the IPv6 is disabled on the node, we generally add the below in /etc/sysconfig/chronyd for the chronyd to work with IPv4.

      OPTIONS="-4"

      While we are using the rhel-system-roles.timesync role for the timesync purpose on the managed node, we do not have an option to mention OPTION="-4" 

      Unfortunately, the template used for this (templates/chronyd.sysconfig.j2) hardcodes the "OPTIONS" parameter to remain empty.

      We will need either one of the option to be added:
      1. Add a setting to the timesync role to disable IPv6.
      2. Add a parameter so I can set the "OPTIONS" parameter myself via a default value.
       

       

            [RHEL-85079] rhel-system-roles.timesync doesn't work when IPv6 is disabled in environment

            This issue has been marked unblocked.

            RHEL Jira bot added a comment - This issue has been marked unblocked.

            rhn-support-mramesh will the customer be ok with something like this? https://github.com/linux-system-roles/timesync/pull/277

            Richard Megginson added a comment - rhn-support-mramesh will the customer be ok with something like this? https://github.com/linux-system-roles/timesync/pull/277

            rmeggins@redhat.com , no, IPv6 can be disabled only by the command-line -4 option. It's more for the case when IPv6 is available, but should not be used for some reason, rather than disabling it when it's not available. Except for the error log message, it shouldn't make a difference in this case.

            A new role variable to force IPv4 or IPv6 for the NTP client would make sense to me, e.g. timesync_ntp_ip_family: (all, IPv4, IPv6). ntpd has the same -4 and -6 options.

             

            Miroslav Lichvar added a comment - rmeggins@redhat.com , no, IPv6 can be disabled only by the command-line -4 option. It's more for the case when IPv6 is available, but should not be used for some reason, rather than disabling it when it's not available. Except for the error log message, it shouldn't make a difference in this case. A new role variable to force IPv4 or IPv6 for the NTP client would make sense to me, e.g. timesync_ntp_ip_family: (all, IPv4, IPv6). ntpd has the same -4 and -6 options.  

            rhn-support-mlichvar is there another way to do this?

            Richard Megginson added a comment - rhn-support-mlichvar is there another way to do this?

              rhn-support-mlichvar Miroslav Lichvar
              rhn-support-mramesh Manasa Ramesh
              Richard Megginson Richard Megginson
              David Jez David Jez
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: