Bug 1377103

Summary: Improve ironic-conductor error logging when the driver list is invalid
Product: Red Hat OpenStack Reporter: Raviv Bar-Tal <rbartal>
Component: openstack-ironicAssignee: Lucas Alvares Gomes <lmartins>
Status: CLOSED ERRATA QA Contact: Raviv Bar-Tal <rbartal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: apevec, athomas, dsneddon, dtantsur, jschluet, lhh, mburns, rhel-osp-director-maint, slinaber, srevivo
Target Milestone: betaKeywords: Triaged
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-ironic-7.0.0-2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-17 19:33:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Raviv Bar-Tal 2016-09-18 12:45:18 UTC
Description of problem:

When restarting the openstack-ironic-conductor service after modifying the `enabled_drivers` section of the ironic.conf file it failed silently.
service fails when enabled_drivers have :
1. empty driver space:
enabled_drivers = pxe_ipmitool,pxe_drac,pxe_ssh,pxe_ilo,pxe_wol,,pxe_amt
2. comma at end of line -
enabled_drivers = pxe_ipmitool,pxe_drac,pxe_ssh,pxe_ilo,pxe_wol,pxe_amt,
3. unknown drive -
enabled_drivers = pxe_ipmitool,pxe_drac,pxe_ssh,pxe_ilo,pxe_wol,pxe_amt,pxe_xza
4. missing packaged for supported drive (addition to default drivers list) -
enabled_drivers = pxe_ipmitool,pxe_drac,pxe_ssh,pxe_ilo,pxe_wol,pxe_amt, pxs_imrc


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


How reproducible:


Steps to Reproduce:
1. edit /etc/ironic/ironic.conf
2. restart conductor -  systemctl restart  openstack-ironic-conductor
3. check service status - systemctl status  openstack-ironic-conductor
Actual results:


Expected results:
service will issue error message to stderr when failing to start.
+ Improve parsing abilities to avoid failure in case of typing  error like double comma ,,

Additional info:

Comment 2 Raviv Bar-Tal 2016-09-18 13:04:47 UTC
This bug is and addition to bug # 1319841 -  openstack-ironic-conductor service failing silently with bad config

Comment 4 Lucas Alvares Gomes 2016-12-06 16:43:27 UTC
I've uploaded a patch fixing case 1) With space and 2) Trailing comma.

Ironic already behaves correctly for case 3) and 4), the conductor-service should not start up if one (or more) of the drivers can not be loaded.

Error output for 3):

2016-12-06 16:42:47.879 3956 ERROR oslo_service.service DriverNotFoundInEntrypoint: Could not find the following driver(s) in the 'ironic.drivers' entrypoint: pxe_nonexist.

Error output for 4):

2016-12-06 16:28:50.716 1438 ERROR oslo_service.service DriverLoadError: Driver PXEDracDriver could not be loaded. Reason: Unable to import python-dracclient library.

Comment 6 errata-xmlrpc 2017-05-17 19:33:45 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-2017:1245