Public bug reported: When the cc_ntp module goes to render an ntp configuration file it chooses whether to write ntp.conf or a systemd-timesyncd config file based on whether or not it can find a package manager. The unit tests that begin with "test_ntp_handler_schema_validation", however, function correctly only if ntp.conf is the file that gets written out, causing the test suite to fail with FileNotFoundErrors in environments like Fedora's package-building chroots, which lack package managers:
====================================================================== ERROR: Ntp schema validation allows for an empty ntp: configuration. ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/cloud-init-17.1/tests/unittests/test_handler/test_handler_ntp.py", line 305, in test_ntp_handler_schema_validation_allows_empty_ntp_config with open(ntp_conf) as stream: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ci-TestNtp.28kd8373/ntp.conf' ** Affects: cloud-init Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to cloud-init. https://bugs.launchpad.net/bugs/1721411 Title: cc_ntp schema validation tests don't work in the absence of a package manager Status in cloud-init: New Bug description: When the cc_ntp module goes to render an ntp configuration file it chooses whether to write ntp.conf or a systemd-timesyncd config file based on whether or not it can find a package manager. The unit tests that begin with "test_ntp_handler_schema_validation", however, function correctly only if ntp.conf is the file that gets written out, causing the test suite to fail with FileNotFoundErrors in environments like Fedora's package-building chroots, which lack package managers: ====================================================================== ERROR: Ntp schema validation allows for an empty ntp: configuration. ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/cloud-init-17.1/tests/unittests/test_handler/test_handler_ntp.py", line 305, in test_ntp_handler_schema_validation_allows_empty_ntp_config with open(ntp_conf) as stream: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ci-TestNtp.28kd8373/ntp.conf' To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1721411/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp