Bug 1607720 - Documentation incorrect for "fake" pxe driver
Summary: Documentation incorrect for "fake" pxe driver
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: documentation
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Documentation Team
QA Contact: RHOS Documentation Team
URL:
Whiteboard:
Depends On: 1607735
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-24 06:11 UTC by Rick Elrod
Modified: 2020-03-02 15:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-02 15:31:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rick Elrod 2018-07-24 06:11:39 UTC
Description of problem:

The documentation (https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/13/html/director_installation_and_usage/appe-power_management_drivers#sect-Fake_PXE_Driver) insists that the "enabled_hardware_types" must contain "fake" in order to manually provision and inspect nodes. However this doesn't work, and it causes no output to show up from `openstack baremetal driver list`.

After digging through the source code a bit and reading https://docs.openstack.org/tripleo-docs/latest/install/environments/baremetal.html#ironic-hardware-types I found that changing the setting to "manual-management" seems to have done the trick. I can now do `openstack baremetal driver list` and get a non-empty response.


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

I'm not sure which component is most relevant here. We're installing with RH OpenStack 13.

The ironic-conductor is: openstack-ironic-conductor-10.1.2-4.el7ost.noarch


How reproducible:


Steps to Reproduce:
1. Set enabled_hardware_types to "fake" in undercloud.conf
2. Run `openstack undercloud install`
3. Run `openstack baremetal driver list`

Actual results:

Empty output

Expected results:

Output which contains the fake pxe driver for installs which aren't using any kind of power management device.


Additional info: Happy to provide any additional info if I can, just let me know!

Comment 1 Rick Elrod 2018-07-24 07:13:43 UTC
Adding a dependency on #1607735.

There seems to be several things going on here.

The enabled_hardware_types should indeed be "manual-management".

The pm_type should *ALSO* be "manual-management" but for any of that to work, there needs to be a patch backported from upstream which makes tripleo-common recognize that "manual-management" is a valid driver pattern to match against.

Comment 2 Dmitry Tantsur 2018-08-14 12:56:18 UTC
Hi,

The manual-management hardware type was not yet supported in OSP 13, so the documentation is correct. The classic drivers fake and fake_pxe were only removed in OSP 14.

Comment 3 Manabu Ori 2019-01-25 07:13:47 UTC
Hi,

Then what should I set in undercloud.conf?
Dmitry says The documentation is correct, but when I add 'fake' to enabled_hardware_types in undercloud.conf according to [1], I got following error.

2019-01-25 15:48:02.817 6836 ERROR oslo_service.service [req-01778c5e-b558-44f3-9ead-4791d17ec562 - - - - -] Error starting thread.: DriverNotFoundInEntrypoint: Could not find the following items in the 'ironic.hardware.types' entrypoint: fake.
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service Traceback (most recent call last):
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 729, in run_service
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service     service.start()
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/rpc_service.py", line 54, in start
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service     self.manager.init_host(admin_context)
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/conductor/base_manager.py", line 121, in init_host
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service     hardware_types = driver_factory.hardware_types()
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/driver_factory.py", line 387, in hardware_types
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service     return _get_all_drivers(HardwareTypesFactory())
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/driver_factory.py", line 457, in __init__
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service     self.__class__._init_extension_manager()
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 274, in inner
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service     return f(*args, **kwargs)
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/driver_factory.py", line 527, in _init_extension_manager
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service     on_missing_entrypoints_callback=missing_callback))
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 85, in __init__
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service     on_missing_entrypoints_callback(self._missing_names)
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/driver_factory.py", line 518, in missing_callback
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service     names=names, entrypoint=cls._entrypoint_name)
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service DriverNotFoundInEntrypoint: Could not find the following items in the 'ironic.hardware.types' entrypoint: fake.
2019-01-25 15:48:02.817 6836 ERROR oslo_service.service

[1] https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/13/html/director_installation_and_usage/appe-power_management_drivers#sect-Fake_PXE_Driver

Comment 4 Jeremy 2019-03-08 15:30:04 UTC
//notes


openstack overcloud node import ~/instackenv.json
Started Mistral Workflow tripleo.baremetal.v1.register_or_update. Execution ID: b57e83b3-4aea-4e87-838c-439a78335803
Waiting for messages on queue 'tripleo' with no timeout.
Resource temporarily unavailable, please retry. (HTTP 503)
Exception registering nodes: Resource temporarily unavailable, please retry. (HTTP 503)

###not working with fake
[root@director13 stack]# grep ^enabled_driver /etc/ironic/ironic.conf
enabled_drivers=pxe_drac,pxe_ilo,pxe_ipmitool,fake
(undercloud) (undercloud) [root@director13 stack]# grep ^enabled_hardware /etc/ironic/ironic.conf
enabled_hardware_types=redfish,ipmi,idrac,fake,ilo
(undercloud) (undercloud) [root@director13 stack]# 


[root@director13 stack]#  systemctl status openstack-ironic-conductor
● openstack-ironic-conductor.service - OpenStack Ironic Conductor service
   Loaded: loaded (/usr/lib/systemd/system/openstack-ironic-conductor.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Fri 2019-03-08 10:10:42 EST; 3s ago
  Process: 24356 ExecStart=/usr/bin/ironic-conductor (code=exited, status=0/SUCCESS)
 Main PID: 24356 (code=exited, status=0/SUCCESS)

grep pm_type instackenv.json 
            "pm_type":"fake_pxe"
            "pm_type":"fake_pxe"



###changed to manual
[root@director13 stack]# grep ^enabled_driver /etc/ironic/ironic.conf
enabled_drivers=pxe_drac,pxe_ilo,pxe_ipmitool,fake

####do not set enabled_hardware to fake or will not work!!!
(undercloud) (undercloud) [root@director13 stack]# grep ^enabled_hardware /etc/ironic/ironic.conf
enabled_hardware_types=redfish,ipmi,idrac,ilo
(undercloud) (undercloud) [root@director13 stack]# 

(undercloud) (undercloud) [root@director13 stack]#  systemctl status openstack-ironic-conductor
● openstack-ironic-conductor.service - OpenStack Ironic Conductor service
   Loaded: loaded (/usr/lib/systemd/system/openstack-ironic-conductor.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2019-03-08 10:13:50 EST; 2s ago
 Main PID: 24710 (ironic-conducto)
    Tasks: 1
   CGroup: /system.slice/openstack-ironic-conductor.service
           └─24710 /usr/bin/python2 /usr/bin/ironic-conductor


 grep pm_type instackenv.json 
            "pm_type":"fake"
            "pm_type":"fake"

$ openstack overcloud node import ~/instackenv.json
2node(s) successfully moved to the "manageable" state.
Successfully registered node UUID 9dd2848e-4ecd-4eec-87be-7395a3e34112
Successfully registered node UUID a0916216-656c-49bf-98ba-6e0476c5aefb



Docs should be :

To enable this driver, add fake to the enabled_driver option in your undercloud.conf

Opened docs bug 1686887 seperately

Comment 5 Joe Antkowiak 2019-05-13 19:24:48 UTC
Just did a fresh install of OSP13, and fake is not valid, same result as first reported.  Changing it to manual-management worked.

This is occurring on OSP13, something is pulling from a version where fake was replaced with manual-management.


(undercloud) [stack@undercloud ironic]$ openstack baremetal driver list
+---------------------+------------------------+
| Supported driver(s) | Active host(s)         |
+---------------------+------------------------+
| idrac               | undercloud.avicert.lab |
| ilo                 | undercloud.avicert.lab |
| ipmi                | undercloud.avicert.lab |
| manual-management   | undercloud.avicert.lab |
| pxe_drac            | undercloud.avicert.lab |
| pxe_ilo             | undercloud.avicert.lab |
| pxe_ipmitool        | undercloud.avicert.lab |
| redfish             | undercloud.avicert.lab |
+---------------------+------------------------+

Comment 6 Andreas Karis 2019-10-29 09:55:41 UTC
Confirmed here as well, 'fake' not working:

Install crudini and enable the fake hardware type:
~~~
sudo yum install crudini -y
sudo crudini --set /etc/ironic/ironic.conf DEFAULT enabled_hardware_types "$(crudini --get /etc/ironic/ironic.conf  DEFAULT enabled_hardware_types),fake"
~~~

Verification:
~~~
(undercloud) [stack@undercloud-0 ~]$ crudini --get /etc/ironic/ironic.conf  DEFAULT enabled_hardware_types
redfish,ipmi,idrac,ilo,fake
~~~

Restart ironic conductor:
~~~
 sudo systemctl restart openstack-ironic-conductor
~~~

~~~
 [root@undercloud-0 ~]# grep ERROR /var/log/ironic/ironic-conductor.log | tail -n 30
2019-10-29 04:25:30.069 30979 ERROR ironic.drivers.modules.ipmitool [req-7bed45e5-5e0f-4409-b945-1efdf729830b - - - - -] IPMI Error while attempting "ipmitool -I lanplus -H 10.10.96.214 -L ADMINISTRATOR -U rcuser -R 12 -N 5 -f /tmp/tmpX0MtMD power status" for node 61e90b8f-40a6-456e-b87d-d7b2a5cec691. Error: Unexpected error while running command.
2019-10-29 04:32:11.753 30979 ERROR ironic.drivers.modules.ipmitool [req-7bed45e5-5e0f-4409-b945-1efdf729830b - - - - -] IPMI Error while attempting "ipmitool -I lanplus -H 10.10.96.227 -L ADMINISTRATOR -U rcuser -R 12 -N 5 -f /tmp/tmpgMNfOY power status" for node 467444cc-fa07-477b-b14f-062e3ddfca7c. Error: Unexpected error while running command.
2019-10-29 05:49:50.148 17108 DEBUG oslo_service.service [-] logging_exception_prefix       = %(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2894
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service [req-b7232f35-908b-4355-81bb-bdf926b2cb2d - - - - -] Error starting thread.: DriverNotFoundInEntrypoint: Could not find the following items in the 'ironic.hardware.types' entrypoint: fake.
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service Traceback (most recent call last):
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/oslo_service/service.py", line 731, in run_service
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service     service.start()
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/rpc_service.py", line 54, in start
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service     self.manager.init_host(admin_context)
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/conductor/base_manager.py", line 121, in init_host
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service     hardware_types = driver_factory.hardware_types()
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/driver_factory.py", line 387, in hardware_types
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service     return _get_all_drivers(HardwareTypesFactory())
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/driver_factory.py", line 457, in __init__
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service     self.__class__._init_extension_manager()
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 274, in inner
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service     return f(*args, **kwargs)
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/driver_factory.py", line 527, in _init_extension_manager
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service     on_missing_entrypoints_callback=missing_callback))
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/stevedore/named.py", line 85, in __init__
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service     on_missing_entrypoints_callback(self._missing_names)
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service   File "/usr/lib/python2.7/site-packages/ironic/common/driver_factory.py", line 518, in missing_callback
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service     names=names, entrypoint=cls._entrypoint_name)
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service DriverNotFoundInEntrypoint: Could not find the following items in the 'ironic.hardware.types' entrypoint: fake.
2019-10-29 05:49:52.975 17108 ERROR oslo_service.service 
 [root@undercloud-0 ~]# 
~~~

Comment 7 Alex McLeod 2019-11-08 16:54:04 UTC
From triage with DFG: For 13 and later releases, avoid documenting `fake` and `fake pxe` - use `manual-management` instead. Remove all instances of `fake` and `fake pxe!


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