Bug 2309439 - New chrony.conf option leapseclist unsupported by chrony lens
Summary: New chrony.conf option leapseclist unsupported by chrony lens
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: augeas
Version: 41
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-09-03 13:25 UTC by Florence Blanc-Renaud
Modified: 2024-09-19 00:16 UTC (History)
6 users (show)

Fixed In Version: augeas-1.14.2-0.1.20240903git2de06e0.fc42 augeas-1.14.2-0.1.20240903git2de06e0.fc40 augeas-1.14.2-0.1.20240903git2de06e0.fc41
Clone Of:
Environment:
Last Closed: 2024-09-03 18:31:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github hercules-team augeas issues 840 0 None closed New chrony.conf option leapseclist unsupported by chrony lens 2024-09-03 15:18:46 UTC

Description Florence Blanc-Renaud 2024-09-03 13:25:14 UTC
With fedora 41, chrony-4.6-0.1.pre1.fc41 is shipped and provides a new option leapseclist with a default value in /etc/chrony.conf that render the lens unusable.
The default /etc/chrony.conf contains:

# Set the TAI-UTC offset of the system clock.
leapseclist /usr/share/zoneinfo/leap-seconds.list

and this option breaks augeas. In order to reproduce, use the following python script:

from augeas import Augeas
import os

aug = Augeas(flags=Augeas.NO_LOAD | Augeas.NO_MODL_AUTOLOAD)
module = "chrony"
chrony_conf = os.path.abspath("/etc/chrony.conf")
aug.transform(module, chrony_conf)  # loads chrony lens file
aug.load()  # loads augeas tree

path = '/files{path}'.format(path=chrony_conf)

# remove possible conflicting configuration of servers
aug.remove('{}/server'.format(path))
aug.remove('{}/pool'.format(path))
aug.remove('{}/peer'.format(path))

aug.set('{}/pool[last()+1]'.format(path), "1.pool.ntp.org")
aug.set('{}/pool[last()]/iburst'.format(path), None)

aug.save()

The script fails to save chrony.conf:

# python3 /tmp/test_augeas.py
Traceback (most recent call last):
  File "/tmp/test_augeas.py", line 20, in <module>
    aug.save()
    ~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/augeas/__init__.py", line 607, in save
    self._raise_error(AugeasIOError, "Augeas.save() failed")
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/augeas/__init__.py", line 154, in _raise_error
    raise errorclass(ec, fullmessage, msg, minor, details)
augeas.AugeasIOError: Augeas.save() failed: No error

If /etc/chrony.conf is manually edited in order to remove the option leapseclist, then the script succeeds.

Installed packages:

augeas-libs-1.14.1-2.fc41.x86_64
python3-augeas-1.1.0-14.fc41.noarch
chrony-4.6-0.1.pre1.fc41.x86_64


The issue was fixed upstream with this patch: https://github.com/hercules-team/augeas/commit/8a5a2672c295b752860b184e88ba56bec800c165

Please build a new fedora version of python-augeas with the above patch for fedora 41 and rawhide.

Reproducible: Always

Steps to Reproduce:
1. dnf install -y python3-augeas chrony
2. python /tmp/test_augeas.py

Actual Results:  
# python /tmp/test_augeas.py
Traceback (most recent call last):
  File "/tmp/test_augeas.py", line 20, in <module>
    aug.save()
    ~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/augeas/__init__.py", line 607, in save
    self._raise_error(AugeasIOError, "Augeas.save() failed")
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/augeas/__init__.py", line 154, in _raise_error
    raise errorclass(ec, fullmessage, msg, minor, details)
augeas.AugeasIOError: Augeas.save() failed: No error


Expected Results:  
Should succeed

Comment 1 Rafael Jeffman 2024-09-03 15:14:43 UTC
With the reproducer script I have the same error with chrony 4.5-3 and augeas 1.13.0-7 in Fedora 40, without leapseclist in chrony.conf file.

As python-augeas is a CFFI wrapper over augeas, I'm moving this BZ to that component.

Comment 2 Fedora Update System 2024-09-03 16:41:02 UTC
FEDORA-2024-8a4e4e8b3a (augeas-1.14.2-0.1.20240903git2de06e0.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-8a4e4e8b3a

Comment 3 Fedora Update System 2024-09-03 16:56:03 UTC
FEDORA-2024-301e5fb27f (augeas-1.14.2-0.1.20240903git2de06e0.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-301e5fb27f

Comment 4 Fedora Update System 2024-09-03 16:56:39 UTC
FEDORA-2024-1d506f677e (augeas-1.14.2-0.1.20240903git2de06e0.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-1d506f677e

Comment 5 Fedora Update System 2024-09-03 18:31:30 UTC
FEDORA-2024-8a4e4e8b3a (augeas-1.14.2-0.1.20240903git2de06e0.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2024-09-04 03:40:40 UTC
FEDORA-2024-1d506f677e has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-1d506f677e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-1d506f677e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-09-04 07:27:25 UTC
FEDORA-2024-301e5fb27f has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-301e5fb27f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-301e5fb27f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-09-10 02:09:47 UTC
FEDORA-2024-1d506f677e (augeas-1.14.2-0.1.20240903git2de06e0.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2024-09-19 00:16:32 UTC
FEDORA-2024-301e5fb27f (augeas-1.14.2-0.1.20240903git2de06e0.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.