Bug 1441587 - ntp.conf is overwritten by os-apply-config
Summary: ntp.conf is overwritten by os-apply-config
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-common
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z3
: 11.0 (Ocata)
Assignee: Lukas Bezdicka
QA Contact: Yurii Prokulevych
URL:
Whiteboard:
Depends On: 1442025 1442027 1442031
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-12 09:33 UTC by Yurii Prokulevych
Modified: 2020-12-23 12:04 UTC (History)
18 users (show)

Fixed In Version: openstack-tripleo-common-6.1.0-2.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-31 17:37:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1687364 0 None None None 2017-05-01 06:38:11 UTC
OpenStack gerrit 460895 0 'None' MERGED Remove ntp element 2020-12-23 11:55:57 UTC
Red Hat Product Errata RHBA-2017:3098 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 director Bug Fix Advisory 2017-10-31 21:33:28 UTC

Description Yurii Prokulevych 2017-04-12 09:33:35 UTC
Description of problem:
-----------------------
ntp.conf is overridden by os-apply-config and might cause issues for ceph cluster. Puppet tries to restore the config, but it's still overwritten.

/var/log/puppet/heat-debug.log:2017-04-11 17:22:58 +0000 Puppet (info): FileBucket got a duplicate file {md5}c07b9a377faea45b96b7d3bf8976004b
/var/log/puppet/heat-debug.log:2017-04-11 17:22:58 +0000 /Stage[main]/Ntp::Config/File[/etc/ntp.conf] (info): Filebucketed /etc/ntp.conf to puppet with sum c07b9a377faea45b96b7d3bf8976004b
/var/log/puppet/heat-debug.log:2017-04-11 17:22:58 +0000 /Stage[main]/Ntp::Config/File[/etc/ntp.conf]/content (notice): content changed '{md5}c07b9a377faea45b96b7d3bf8976004b' to '{md5}8ea449d7aa73245c001c0134b5b23e2d'
/var/log/puppet/heat-debug.log:2017-04-11 17:28:05 +0000 Puppet (info): FileBucket got a duplicate file {md5}c07b9a377faea45b96b7d3bf8976004b
/var/log/puppet/heat-debug.log:2017-04-11 17:28:05 +0000 /Stage[main]/Ntp::Config/File[/etc/ntp.conf] (info): Filebucketed /etc/ntp.conf to puppet with sum c07b9a377faea45b96b7d3bf8976004b
/var/log/puppet/heat-debug.log:2017-04-11 17:28:05 +0000 /Stage[main]/Ntp::Config/File[/etc/ntp.conf]/content (notice): content changed '{md5}c07b9a377faea45b96b7d3bf8976004b' to '{md5}8ea449d7aa73245c001c0134b5b23e2d'
/var/log/puppet/heat-debug.log:2017-04-11 17:33:11 +0000 Puppet (info): FileBucket got a duplicate file {md5}c07b9a377faea45b96b7d3bf8976004b
/var/log/puppet/heat-debug.log:2017-04-11 17:33:11 +0000 /Stage[main]/Ntp::Config/File[/etc/ntp.conf] (info): Filebucketed /etc/ntp.conf to puppet with sum c07b9a377faea45b96b7d3bf8976004b
/var/log/puppet/heat-debug.log:2017-04-11 17:33:11 +0000 /Stage[main]/Ntp::Config/File[/etc/ntp.conf]/content (notice): content changed '{md5}c07b9a377faea45b96b7d3bf8976004b' to '{md5}8ea449d7aa73245c001c0134b5b23e2d'

Excerpt from os-apply-config.log
--------------------------------
[2017/04/12 07:58:28 AM] [INFO] writing /etc/os-net-config/config.json
[2017/04/12 07:58:28 AM] [INFO] writing /etc/ntp.conf
[2017/04/12 07:58:28 AM] [INFO] writing /var/run/heat-config/heat-config
[2017/04/12 07:58:28 AM] [INFO] writing /etc/os-collect-config.conf
[2017/04/12 07:58:28 AM] [INFO] success
[2017/04/12 07:59:10 AM] [INFO] writing /etc/os-net-config/config.json
[2017/04/12 07:59:10 AM] [INFO] writing /etc/ntp.conf
[2017/04/12 07:59:10 AM] [INFO] writing /var/run/heat-config/heat-config
[2017/04/12 07:59:10 AM] [INFO] writing /etc/os-collect-config.conf
[2017/04/12 07:59:10 AM] [INFO] success




Version-Release number of selected component (if applicable):
-------------------------------------------------------------
os-apply-config-6.0.0-1.el7ost.noarch
openstack-tripleo-heat-templates-6.0.0-4.el7ost.noarch

Steps to Reproduce:
-------------------
1. Deploy RHOS-11
2. Minor update UC
3. Minor update OC
4. Check /etc/ntp.conf on OC nodes.

Comment 1 Lukas Bezdicka 2017-04-12 13:39:57 UTC
Remove /usr/libexec/os-apply-config/templates/etc/ntp.conf

Comment 2 Lukas Bezdicka 2017-04-13 11:38:25 UTC
Another file that has to be removed /usr/libexec/os-refresh-config/configure.d/40-truncate-nova-config changed in commit http://git.openstack.org/cgit/openstack/tripleo-puppet-elements/commit/?id=85f4604298e3618fafabb5af3152166f9a7ab6a2 but never provided by any rpm.

Comment 3 Sofer Athlan-Guyot 2017-04-28 09:36:25 UTC
Point to stable/ocata, not yet merged there.

Comment 9 Jeremy 2017-07-05 20:04:45 UTC
Another workaround where re-deploy isn't required is:


[root@osp11-compute000 ~]# grep server /etc/ntp.conf 
# Local users may interrogate the ntp server more closely.
# Remote NTP server(s) to synchronize with.
server 127.127.1.0 # local clock address


[root@osp11-compute000 ~]# echo 'include ::tripleo::profile::base::time::ntp' |puppet apply
exception: connect failed
Notice: hiera(): Cannot load backend module_data: cannot load such file -- hiera/backend/module_data_backend
Warning: Undefined variable 'deploy_config_name'; 
   (file & line not available)
Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README. at ["unknown", 1]:["/etc/puppet/modules/tripleo/manifests/profile/base/time/ntp.pp", 29]
   (at /etc/puppet/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Absolute_Path. There is further documentation for validate_legacy function in the README. at ["unknown", 1]:["/etc/puppet/modules/tripleo/manifests/profile/base/time/ntp.pp", 29]
   (at /etc/puppet/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::String. There is further documentation for validate_legacy function in the README. at ["unknown", 1]:["/etc/puppet/modules/tripleo/manifests/profile/base/time/ntp.pp", 29]
   (at /etc/puppet/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README. at ["unknown", 1]:["/etc/puppet/modules/tripleo/manifests/profile/base/time/ntp.pp", 29]
   (at /etc/puppet/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use the stdlib validate_legacy function, with Pattern[]. There is further documentation for validate_legacy function in the README. at ["unknown", 1]:["/etc/puppet/modules/tripleo/manifests/profile/base/time/ntp.pp", 29]
   (at /etc/puppet/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Warning: This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Numeric. There is further documentation for validate_legacy function in the README. at ["unknown", 1]:["/etc/puppet/modules/tripleo/manifests/profile/base/time/ntp.pp", 29]
   (at /etc/puppet/modules/stdlib/lib/puppet/functions/deprecation.rb:25:in `deprecation')
Notice: Compiled catalog for osp11-compute000.flusche.co in environment production in 0.73 seconds
Notice: /Stage[main]/Ntp::Config/File[/etc/ntp.conf]/content: content changed '{md5}c07b9a377faea45b96b7d3bf8976004b' to '{md5}80b50defbb2abdcd9b16675667468ca1'
Notice: /Stage[main]/Ntp::Config/File[/etc/ntp.conf]/seluser: seluser changed 'unconfined_u' to 'system_u'
Notice: /Stage[main]/Ntp::Config/File[/etc/ntp.conf]/seltype: seltype changed 'etc_t' to 'net_conf_t'
Notice: /Stage[main]/Ntp::Service/Service[ntp]: Triggered 'refresh' from 1 events
Notice: Applied catalog in 0.93 seconds


[root@osp11-compute000 ~]# grep server /etc/ntp.conf                                                                                                                         
# Set up servers for ntpd with next options:
# server - IP address or DNS name of upstream NTP server
# prefer - select preferrable server
server 192.168.0.10
server 2001:470:b92e::10

Comment 10 Alex Schultz 2017-08-29 20:36:42 UTC
This appears to have already gone out already but should be verified.

Comment 11 Lon Hohberger 2017-09-06 19:58:30 UTC
According to our records, this should be resolved by openstack-tripleo-common-6.1.0-2.el7ost.  This build is available now.

Comment 12 Yurii Prokulevych 2017-09-22 14:29:11 UTC
Verified with:
 openstack-tripleo-common-6.1.0-3.el7ost.noarch ; 
 rhosp-director-images-ipa-11.0-20170830.1.el7ost.noarch
 rhosp-director-images-11.0-20170830.1.el7ost.noarch
 openstack-tripleo-heat-templates-6.2.0-3.el7ost.noarch

Comment 16 errata-xmlrpc 2017-10-31 17:37:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:3098


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