ovirt: Failed to get power state for node <uuid> . Error: invalid arguments to setopt Steps to Reproduce: PreReq: RHV environment with undercloud 1) Install undercloud with osp13 latest in RHV environment 2) Configure /etc/ironic.conf Add staging-ovirt and credentials for ovirt ----> enabled_hardware_types=redfish,ipmi,idrac,ilo,staging-ovirt enabled_management_interfaces=redfish,ilo,idrac,ipmitool,fake,staging-ovirt enabled_power_interfaces=redfish,ilo,idrac,ipmitool,fake,staging-ovirt [ovirt] address = <fqdn address> user = <userid> password = <password> insecure = true <------------- 3) Install openstack-ironic-conductor and dependencies. This driver is not installed by default and must be added sudo easy_install pip sudo yum install -y gcc python-devel libxml2-devel libcurl-devel sudo pip install ovirt-engine-sdk-python sudo systemctl restart openstack-ironic-conductor 4) Create instackenv.json for env 5) Import nodes openstack overcloud node import ~/instackenv.json (undercloud) [stack@undercloud-new ~]$ openstack overcloud node import ~/instackenv.json Started Mistral Workflow tripleo.baremetal.v1.register_or_update. Execution ID: 917db649-fac2-4965-9669-392c1fb8ca98 Waiting for messages on queue 'tripleo' with no timeout. Nodes set to managed. Successfully registered node UUID ec1c910c-b5a6-4bde-8932-48763483f891 Successfully registered node UUID eaa89d0d-046f-48c1-a053-bf1d3cfa093c Successfully registered node UUID a365976d-5fb9-458b-bc54-11c54b693545 Successfully registered node UUID 2b5fdff8-c1f9-42aa-9d00-efb6553dbf34 6) execute: ironic node-list (undercloud) [stack@undercloud-new ~]$ ironic node-list The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead. +--------------------------------------+-------------------+---------------+-------------+--------------------+-------------+ | UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance | +--------------------------------------+-------------------+---------------+-------------+--------------------+-------------+ | ec1c910c-b5a6-4bde-8932-48763483f891 | osp13-controller1 | None | None | enroll | False | | eaa89d0d-046f-48c1-a053-bf1d3cfa093c | osp13-controller2 | None | None | enroll | False | | a365976d-5fb9-458b-bc54-11c54b693545 | osp13-controller3 | None | None | enroll | False | | 2b5fdff8-c1f9-42aa-9d00-efb6553dbf34 | osp13-compute1 | None | power on | manageable | False | +--------------------------------------+-------------------+---------------+-------------+--------------------+-------------+ (undercloud) [stack@undercloud-new ~]$ ironic node-show ec1c910c-b5a6-4bde-8932-48763483f891 The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead. +------------------------+--------------------------------------------------------------------------+ | Property | Value | +------------------------+--------------------------------------------------------------------------+ | boot_interface | pxe | | chassis_uuid | None | | clean_step | {} | | console_enabled | False | | console_interface | no-console | | created_at | 2018-03-15T20:17:03+00:00 | | deploy_interface | iscsi | | driver | staging-ovirt | | driver_info | {u'ovirt_address': u'rhvm.field.lab.eng.rdu.redhat.com', | | | u'ovirt_password': u'******', u'deploy_kernel': u'48240453-c945-4c6a- | | | 8bdf-5ca95bb8666c', u'ovirt_username': u'admin@internal', | | | u'deploy_ramdisk': u'8119f9d9-1bc6-4845-9e8a-6c24a720426d', | | | u'ovirt_vm_name': u'osp13-controller1'} | | driver_internal_info | {} | | extra | {} | | inspect_interface | inspector | | inspection_finished_at | None | | inspection_started_at | None | | instance_info | {} | | instance_uuid | None | | last_error | Failed to get power state for node ec1c910c-b5a6-4bde-8932-48763483f891. | | | Error: invalid arguments to setopt | | maintenance | False | | maintenance_reason | None | | management_interface | staging-ovirt | | name | osp13-controller1 | | network_interface | flat | | power_interface | staging-ovirt | | power_state | None | | properties | {u'memory_mb': u'4096', u'cpu_arch': u'x86_64', u'local_gb': u'40', | | | u'cpus': u'2', u'capabilities': u'profile:control,boot_option:local'} | | provision_state | enroll | | provision_updated_at | 2018-03-15T20:17:10+00:00 | | raid_config | {} | | raid_interface | no-raid | | reservation | None | | resource_class | baremetal | | storage_interface | noop | | target_power_state | None | | target_provision_state | None | | target_raid_config | {} | | traits | | | updated_at | 2018-03-15T20:17:10+00:00 | | uuid | ec1c910c-b5a6-4bde-8932-48763483f891 | | vendor_interface | no-vendor | +------------------------+--------------------------------------------------------------------------+ [root@undercloud-new ironic]# grep -i error ironic-conductor.log 2018-03-15 16:17:10.522 1573 ERROR ironic.conductor.manager [req-0b05f633-729e-4066-8f60-9fd17d73fa38 176ceb0fc8a745e681b68fbf50954b1f c8117755546c4da5a601b5c393c3efe9 - default default] Failed to get power state for node ec1c910c-b5a6-4bde-8932-48763483f891. Error: invalid arguments to setopt 2018-03-15 16:17:10.586 1573 ERROR ironic.conductor.manager [req-4cf17b87-96fe-48ec-bb1b-360145946259 176ceb0fc8a745e681b68fbf50954b1f c8117755546c4da5a601b5c393c3efe9 - default default] Failed to get power state for node eaa89d0d-046f-48c1-a053-bf1d3cfa093c. Error: invalid arguments to setopt 2018-03-15 16:17:10.649 1573 ERROR ironic.conductor.manager [req-bed59834-79a1-49b6-8d5d-0c202f9e1057 176ceb0fc8a745e681b68fbf50954b1f c8117755546c4da5a601b5c393c3efe9 - default default] Failed to get power state for node a365976d-5fb9-458b-bc54-11c54b693545. Error: invalid arguments to setopt
This bug is basically about not accepting the credentials provided within the driver_info section of each node imported. The workaround for this bug is to remove: # add the credentials in the ironic.conf [ovirt] address = rhvm.field.lab.eng.rdu.redhat.com user = admin@internal password = redhat insecure = true # restart conductor sudo systemctl restart openstack-ironic-conductor # remove driver_info from nodes from previously failed import source ~/stackrc ironic node-update osp13-controller-$i remove driver_info/ovirt_address; ironic node-update osp13-controller-$i remove driver_info/ovirt_password; ironic node-update osp13-controller-$i remove driver_info/ovirt_username; done # manually bring to manage, provide state for i in {1..3}; do ironic node-set-provision-state osp13-controller$i manage; done for i in {1..3}; do ironic node-set-provision-state osp13-controller$i provide; done
> This bug is basically about not accepting the credentials provided within the driver_info section of each node imported. A small but important clarification: does it just ignore them or fail if they are provided?
also > user = admin@internal this is incorrect, should be 'username' (https://github.com/openstack/ironic-staging-drivers/blob/master/ironic_staging_drivers/ovirt/ovirt.py#L65). are you sure you're providing the right username in the end?
see: https://bugs.launchpad.net/ironic-staging-drivers/+bug/1761724 python-pycurl-7.19.0-19.el7.x86_64 >>> c = pycurl.Curl() >>> c.setopt(pycurl.URL, "http://a.com") >>> c.setopt(pycurl.URL, u"http://a.com") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: invalid arguments to setopt In ./ironic_staging_drivers/ovirt/ovirt.py:_getvm Wrapping url in str(url) fixes the problem assuming the VM name doesn't contain multibyte characters
(In reply to Derek Higgins from comment #4) > see: https://bugs.launchpad.net/ironic-staging-drivers/+bug/1761724 > > python-pycurl-7.19.0-19.el7.x86_64 > > >>> c = pycurl.Curl() > >>> c.setopt(pycurl.URL, "http://a.com") > >>> c.setopt(pycurl.URL, u"http://a.com") > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: invalid arguments to setopt > > In ./ironic_staging_drivers/ovirt/ovirt.py:_getvm > Wrapping url in str(url) fixes the problem assuming the VM name doesn't > contain multibyte characters I see that on the undercloud latest osp13 puddle we got : [root@undercloud75 ~]# rpm -qa | grep python-pycurl python-pycurl-7.19.0-19.el7.x86_64 Does that mean this Bz should be ON_QA?
(In reply to Omri Hochman from comment #6) > Does that mean this Bz should be ON_QA? Nope, the fix for this is in ironic-staging-drivers, the patch has merged upstream[1] but I don't think it has made it into the latest puddle yet
Latest installed on RHV env using osp 13 puddle: 2018-04-26.3 Env: (undercloud) [stack@undercloud ~]$ rpm -qa | grep openstack-ironic-staging-drivers openstack-ironic-staging-drivers-0.9.0-4.el7ost.noarch Introspection of 3 controller , 1 compute worked using credentials from instackenv.json I did not have to provide in the /etc/ironic/ironic.conf file. Only one exception with existing ON_QA bug (https://bugzilla.redhat.com/show_bug.cgi?id=1536521) I deleted nodes after seeing bz#1536521 and imported again successfully with no error (undercloud) [stack@undercloud ~]$ openstack overcloud node import /home/stack/instackenv.json --provide Started Mistral Workflow tripleo.baremetal.v1.register_or_update. Execution ID: 79b62d24-dbec-4e68-8246-622de89b0f56 Waiting for messages on queue 'tripleo' with no timeout. 4 node(s) successfully moved to the "manageable" state. Successfully registered node UUID 1c322845-c5c8-4f4f-bec3-0ec9740b9411 Successfully registered node UUID b5bfa465-c510-4857-abcc-986403770f9b Successfully registered node UUID 79eb96db-bf0b-4c38-9c0a-057cac3d67e3 Successfully registered node UUID a927aca9-34ae-46e0-b92f-d36005460b1e Started Mistral Workflow tripleo.baremetal.v1.provide. Execution ID: b5794849-5c18-46e0-8b3a-3f8a20c043e0 Waiting for messages on queue 'tripleo' with no timeout. 4 node(s) successfully moved to the "available" state. This bug now verified
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