Bug 1395764 - Validations fail when undercloud.conf does not exist
Summary: Validations fail when undercloud.conf does not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-validations
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: Upstream M2
: 13.0 (Queens)
Assignee: Florian Fuchs
QA Contact: Udi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-16 15:54 UTC by Tomas Sedovic
Modified: 2018-06-27 13:28 UTC (History)
8 users (show)

Fixed In Version: openstack-tripleo-validations-8.1.1-0.20180119231917.2ff3c79.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-27 13:26:39 UTC
Target Upstream Version:


Attachments (Terms of Use)


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

Description Tomas Sedovic 2016-11-16 15:54:00 UTC
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 18:21:29 UTC
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 21:27:01 UTC
Added a patch to fix the network gateway validation:

  https://review.openstack.org/#/c/518619/

Comment 6 Florian Fuchs 2017-11-08 21:39:18 UTC
(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 06:42:14 UTC
What does this validator check if there is no undercloud.conf? Does it ping 0.0.0.0 ?

Comment 15 Udi 2018-05-01 06:46:02 UTC
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 09:21:22 UTC
(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 10:52:44 UTC
Marking as verified according to the comments: openstack-tripleo-validations-8.4.1-5.el7ost.noarch

Comment 19 errata-xmlrpc 2018-06-27 13:26:39 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/RHEA-2018:2086


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