Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1395764 - Validations fail when undercloud.conf does not exist
Validations fail when undercloud.conf does not exist
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-validations (Show other bugs)
10.0 (Newton)
Unspecified Unspecified
low Severity medium
: Upstream M2
: 13.0 (Queens)
Assigned To: Florian Fuchs
Udi
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-16 10:54 EST by Tomas Sedovic
Modified: 2018-06-27 09:28 EDT (History)
8 users (show)

See Also:
Fixed In Version: openstack-tripleo-validations-8.1.1-0.20180119231917.2ff3c79.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-06-27 09:26:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1643810 None None None 2016-11-22 04:32 EST
OpenStack gerrit 407098 None master: MERGED tripleo-validations: prevent validations from failing when undercloud.conf is missing: (I859f814f1bbeda267d7f39d27edce8... 2018-02-07 09:31 EST
OpenStack gerrit 453154 None stable/ocata: MERGED tripleo-validations: prevent validations from failing when undercloud.conf is missing: (I859f814f1bbeda267d7f39d27edce8... 2018-02-07 09:31 EST
OpenStack gerrit 518619 None master: MERGED tripleo-validations: Fix the Network Gateway Validation (I47710721323a36616b42455206f779b6f7dda60d) 2018-02-07 09:30 EST
Red Hat Product Errata RHEA-2018:2086 None None None 2018-06-27 09:28 EDT

  None (edit)
Description Tomas Sedovic 2016-11-16 10:54:00 EST
Description of problem:

The check-network-gateway, ctlplane-iprange and dhcp-provisioning validations fail when the undercloud.conf file does not exist. This can happen when the deployer installs the undercloud with default values.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Install undercloud without having an undercloud.conf file
2. Run the check-network-gateway, ctlplane-iprange or dhcp-provisioning validation


Actual results:

The validation will fail saying that undercloud.conf could not be found.


Expected results:

The validation will run falling back to the default values.


Additional info:
Comment 4 Dan Trainor 2017-11-02 14:21:29 EDT
The ctlplane-ip-range and dhcp-provisioning validations no longer error as described in this bug, however there appears to be a syntactic issue with the check-network-gateway validation


(undercloud) [stack@undercloud ~]$ openstack workflow execution create tripleo.validations.v1.run_validation '{"validation_name": "check-network-gateway"}'
+-------------------+---------------------------------------+
| Field             | Value                                 |
+-------------------+---------------------------------------+
| ID                | 7ce1b86a-193f-4301-b3fd-866d08b390a6  |
| Workflow ID       | 2ad089d6-6622-4333-98d9-c0a90bde4fc6  |
| Workflow name     | tripleo.validations.v1.run_validation |
| Description       |                                       |
| Task Execution ID | <none>                                |
| State             | RUNNING                               |
| State info        | None                                  |
| Created at        | 2017-11-02 18:06:44                   |
| Updated at        | 2017-11-02 18:06:44                   |
+-------------------+---------------------------------------+
(undercloud) [stack@undercloud ~]$ mistral execution-get-output 7ce1b86a-193f-4301-b3fd-866d08b390a6 | jq .stdout -r
Task 'Test network_gateway if different from local_ip' failed:
Host: localhost
Message: The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'network_gateway'

The error appears to have been in '/usr/share/openstack-tripleo-validations/validations/check-network-gateway.yaml': line 20, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

      ignore_missing=true
  - name: "Test network_gateway if different from local_ip"
    ^ here

exception type: <class 'ansible.errors.AnsibleUndefinedVariable'>
exception: 'dict object' has no attribute 'network_gateway'

Failure! The validation failed for all hosts:
* localhost
(undercloud) [stack@undercloud ~]$ openstack workflow execution create tripleo.validations.v1.run_validation '{"validation_name": "ctlplane-ip-range"}'
+-------------------+---------------------------------------+
| Field             | Value                                 |
+-------------------+---------------------------------------+
| ID                | ece49d42-070c-4642-8855-cb92a5a23a34  |
| Workflow ID       | 2ad089d6-6622-4333-98d9-c0a90bde4fc6  |
| Workflow name     | tripleo.validations.v1.run_validation |
| Description       |                                       |
| Task Execution ID | <none>                                |
| State             | RUNNING                               |
| State info        | None                                  |
| Created at        | 2017-11-02 18:08:05                   |
| Updated at        | 2017-11-02 18:08:05                   |
+-------------------+---------------------------------------+
(undercloud) [stack@undercloud ~]$ mistral execution-get-output ece49d42-070c-4642-8855-cb92a5a23a34 | jq .stdout -r
Task 'Check the size of the DHCP range for overcloud nodes' succeded, but had some warnings:
Host: localhost
Warnings:

* The IP range 192.0.2.5 - 192.0.2.24 contains 20 addresses.
* This might not be enough for the deployment or later scaling.
Success! The validation passed for all hosts:
* localhost

(undercloud) [stack@undercloud ~]$ openstack workflow execution create tripleo.validations.v1.run_validation '{"validation_name": "dhcp-provisioning"}'
+-------------------+---------------------------------------+
| Field             | Value                                 |
+-------------------+---------------------------------------+
| ID                | d2bddebe-04c6-4b0e-9406-3d93dfa65d2a  |
| Workflow ID       | 2ad089d6-6622-4333-98d9-c0a90bde4fc6  |
| Workflow name     | tripleo.validations.v1.run_validation |
| Description       |                                       |
| Task Execution ID | <none>                                |
| State             | RUNNING                               |
| State info        | None                                  |
| Created at        | 2017-11-02 18:08:51                   |
| Updated at        | 2017-11-02 18:08:51                   |
+-------------------+---------------------------------------+
(undercloud) [stack@undercloud ~]$ mistral execution-get-output d2bddebe-04c6-4b0e-9406-3d93dfa65d2a | jq .stdout -r
Success! The validation passed for all hosts:
* localhost

(undercloud) [stack@undercloud ~]$
Comment 5 Florian Fuchs 2017-11-08 16:27:01 EST
Added a patch to fix the network gateway validation:

  https://review.openstack.org/#/c/518619/
Comment 6 Florian Fuchs 2017-11-08 16:39:18 EST
(In reply to Florian Fuchs from comment #5)
> Added a patch to fix the network gateway validation:
> 
>   https://review.openstack.org/#/c/518619/

This will need a backport once it's merged.
Comment 14 Udi 2018-05-01 02:42:14 EDT
What does this validator check if there is no undercloud.conf? Does it ping 0.0.0.0 ?
Comment 15 Udi 2018-05-01 02:46:02 EDT
Clarification: I was referring to check-network-gateway as an example of one of the validators. The logic in the other validators also needs some explanations, thanks.
Comment 16 Florian Fuchs 2018-05-22 05:21:22 EDT
(In reply to Udi from comment #15)
> Clarification: I was referring to check-network-gateway as an example of one
> of the validators. The logic in the other validators also needs some
> explanations, thanks.

Yes, the check-network-gateway uses 0.0.0.0 to ping as a fallback.

The other validations mentioned above use the following default values:

dhcp-provisioning: eth1
ctlplane-iprange: start: 192.0.2.5, end: 192.0.2.24
Comment 17 Udi 2018-05-22 06:52:44 EDT
Marking as verified according to the comments: openstack-tripleo-validations-8.4.1-5.el7ost.noarch
Comment 19 errata-xmlrpc 2018-06-27 09:26:39 EDT
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/RHEA-2018:2086

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