[tripleo] If undercloud_ntp_servers is not declared then NTP should not be configured

Bug #1793500 reported by Raoul Scarazzini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Sorin Sbarnea

Bug Description

When you use "undercloud.conf" file leaving this option at its default:

# List of ntp servers to use. (list value)
#undercloud_ntp_servers =

because, for example, you already have the NTP service correctly configured and working on your system, the openstack undercloud install command should not fail as it does today:

TASK [Ensure system is NTP time synced] *********************************************************************************************************************************
fatal: [undercloud]: FAILED! => {"changed": true, "cmd": ["ntpdate", "-u", "pool.ntp.org"], "delta": "0:00:08.942220", "end": "2018-09-20 07:33:18.354579", "msg": "non-zero return code", "rc": 1, "start": "2018-09-20 07:33:09.412359", "stderr": "20 Sep 07:33:18 ntpdate[16718]: no server suitable for synchronization found", "stderr_lines": ["20 Sep 07:33:18 ntpdate[16718]: no server suitable for synchronization found"], "stdout": "", "stdout_lines": []}

NO MORE HOSTS LEFT ******************************************************************************************************************************************************

PLAY RECAP **************************************************************************************************************************************************************
undercloud : ok=136 changed=22 unreachable=0 failed=1

** Found ansible errors for undercloud deployment! **
[
 [
  "Ensure system is NTP time synced",
  {
   "_ansible_parsed": true,
   "stderr_lines": [
    "20 Sep 07:33:18 ntpdate[16718]: no server suitable for synchronization found"
   ],
   "cmd": [
    "ntpdate",
    "-u",
    "pool.ntp.org"
   ],
   "end": "2018-09-20 07:33:18.354579",
   "_ansible_no_log": false,
   "stdout": "",
   "changed": true,
   "start": "2018-09-20 07:33:09.412359",
   "delta": "0:00:08.942220",
   "stderr": "20 Sep 07:33:18 ntpdate[16718]: no server suitable for synchronization found",
   "rc": 1,
   "invocation": {
    "module_args": {
     "warn": true,
     "executable": null,
     "_uses_shell": false,
     "_raw_params": "ntpdate -u pool.ntp.org",
     "removes": null,
     "creates": null,
     "chdir": null,
     "stdin": null
    }
   },
   "stdout_lines": [],
   "msg": "non-zero return code"
  }
 ]
]
Install artifact is located at /home/stack/undercloud-install-20180920073318.tar.bzip2

If the default NTP (pool.ntp.org) is not available, you get the above. This also means that on the other side internal configuration will be overridden by the default pool.ntp.org, without the user wanting it.

I see two choices here:

1) Making undercloud_ntp_servers mandatory, leaving T-H-T to manage it in any case (so what is actually on the system becomes irrelevant) and failing earlier while validating undercloud.conf if "undercloud_ntp_servers" option is not declared;

2) If undercloud_ntp_servers is not declared, the setup will take no action and system's NTP will not be touched;

In my opinion, two should be the correct way to give a right user experience.

Revision history for this message
Alex Schultz (alex-schultz) wrote :

I think we just need to document that there is a default value in the undercloud.conf. It is required as it can cause docker issues if you are not in a good state.

Changed in tripleo:
importance: Undecided → Medium
milestone: rocky-rc2 → stein-1
tags: added: rocky-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/604113

Changed in tripleo:
assignee: nobody → Alex Schultz (alex-schultz)
status: Triaged → In Progress
assignee: Alex Schultz (alex-schultz) → Sorin Sbarnea (ssbarnea)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/604113
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=2f02c6503fbfff63f4c120a7cd1c463e5aea7fdd
Submitter: Zuul
Branch: master

commit 2f02c6503fbfff63f4c120a7cd1c463e5aea7fdd
Author: Alex Schultz <email address hidden>
Date: Thu Sep 20 08:54:05 2018 -0600

    Update default value for ntp servers

    As we've switched to containerized undercloud, the ntp settings are more
    important (and required). If this is unset, we're actually falling back
    to the defauls in the ntp configuration in THT so this patch just
    exposes the default correctly in the configuration file.

    Change-Id: I98c4d0c3cee2a745e0e5326e209ad91db22ebff1
    Closes-Bug: #1793500

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/604806

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-tripleoclient (stable/rocky)

Change abandoned by Alex Schultz (<email address hidden>) on branch: stable/rocky
Review: https://review.openstack.org/604806
Reason: http://lists.openstack.org/pipermail/openstack-dev/2018-September/135224.html

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/rocky)

Reviewed: https://review.openstack.org/604806
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=8297163f4966fa1601c958918d2cc21d4467b338
Submitter: Zuul
Branch: stable/rocky

commit 8297163f4966fa1601c958918d2cc21d4467b338
Author: Alex Schultz <email address hidden>
Date: Thu Sep 20 08:54:05 2018 -0600

    Update default value for ntp servers

    As we've switched to containerized undercloud, the ntp settings are more
    important (and required). If this is unset, we're actually falling back
    to the defauls in the ntp configuration in THT so this patch just
    exposes the default correctly in the configuration file.

    Change-Id: I98c4d0c3cee2a745e0e5326e209ad91db22ebff1
    Closes-Bug: #1793500
    (cherry picked from commit 2f02c6503fbfff63f4c120a7cd1c463e5aea7fdd)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 11.0.0

This issue was fixed in the openstack/python-tripleoclient 11.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 10.6.1

This issue was fixed in the openstack/python-tripleoclient 10.6.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.