Re: [openstack-dev] [Ironic]Nova resource tracker is not able to identify resources of BM instance when fake_pxe driver used

2016-03-29 Thread Jim Rollenhagen


> On Mar 29, 2016, at 08:39, Senthilprabu Shanmugavel 
>  wrote:
> 
> Thanks Jim. WA did the trick. Very well explained. 
> 
> Should I raise a bug for fake driver's power state?.

That would be great, thanks in advance! :)

// jim 

> 
>> On Tue, Mar 29, 2016 at 5:30 PM, Jim Rollenhagen  
>> wrote:
>> On Tue, Mar 29, 2016 at 04:59:09PM +0300, Senthilprabu Shanmugavel wrote:
>> > Hello,
>> >
>> > I am using Ironic for deploying baremetal to my openstack environment.
>> > Using Liberty version on Ubuntu 14.04. I followed Ironic documentation  to
>> > deploy x86 servers using pxe_ipmitool. Now I have a working Ironic setup
>> > for PXE boot. I also want to add my test board running ARM 64 bit CPU to
>> > ironic deployment. I would like to try using fake_pxe drivers because my
>> > board don't support IPMI or anything else for out of band communication. So
>> > idea was to do deployment without power management, eventually fake_pxe is
>> > the obvious choice. But I have problem in updating the Ironic node which I
>> > will explain below.
>> >
>> > I created ironic node using fake_pxe driver. Added all necessary parameters
>> > using node-update command. Node-show command output is given below for
>> > reference
>> >
>> > 
>> >
>> > Because of this during nova boot, scheduler failed to boot the BM instance.
>> >
>> > Can anyone help me with what's wrong in my configuration?
>> 
>> I guess probably someone has never used the fake power driver with
>> devstack. :)
>> 
>> If a node's power state is None, it will be ignored by Nova:
>> https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L171
>> 
>> And the fake power driver doesn't set the power state to on/off itself:
>> https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/fake.py#L43
>> 
>> We should probably fix this by changing it to:
>> return task.node.power_state or states.POWER_ON
>> 
>> In the meantime, an easy workaround would be:
>> ironic node-set-power-state  on
>> ironic node-set-power-state  off
>> 
>> Which would have the driver 'remember' the power state is currently off,
>> allowing Nova to pick up the resources.
>> 
>> Hope that helps :)
>> 
>> // jim
>> 
>> >
>> >
>> >
>> > Thanks in advance,
>> > Senthil
>> 
>> > __
>> > OpenStack Development Mailing List (not for usage questions)
>> > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> 
>> 
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> 
> 
> -- 
> Best Regards,
> Senthilprabu Shanmugavel
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Ironic]Nova resource tracker is not able to identify resources of BM instance when fake_pxe driver used

2016-03-29 Thread Senthilprabu Shanmugavel
Thanks Jim. WA did the trick. Very well explained.

Should I raise a bug for fake driver's power state?.

On Tue, Mar 29, 2016 at 5:30 PM, Jim Rollenhagen 
wrote:

> On Tue, Mar 29, 2016 at 04:59:09PM +0300, Senthilprabu Shanmugavel wrote:
> > Hello,
> >
> > I am using Ironic for deploying baremetal to my openstack environment.
> > Using Liberty version on Ubuntu 14.04. I followed Ironic documentation
> to
> > deploy x86 servers using pxe_ipmitool. Now I have a working Ironic setup
> > for PXE boot. I also want to add my test board running ARM 64 bit CPU to
> > ironic deployment. I would like to try using fake_pxe drivers because my
> > board don't support IPMI or anything else for out of band communication.
> So
> > idea was to do deployment without power management, eventually fake_pxe
> is
> > the obvious choice. But I have problem in updating the Ironic node which
> I
> > will explain below.
> >
> > I created ironic node using fake_pxe driver. Added all necessary
> parameters
> > using node-update command. Node-show command output is given below for
> > reference
> >
> > 
> >
> > Because of this during nova boot, scheduler failed to boot the BM
> instance.
> >
> > Can anyone help me with what's wrong in my configuration?
>
> I guess probably someone has never used the fake power driver with
> devstack. :)
>
> If a node's power state is None, it will be ignored by Nova:
>
> https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L171
>
> And the fake power driver doesn't set the power state to on/off itself:
>
> https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/fake.py#L43
>
> We should probably fix this by changing it to:
> return task.node.power_state or states.POWER_ON
>
> In the meantime, an easy workaround would be:
> ironic node-set-power-state  on
> ironic node-set-power-state  off
>
> Which would have the driver 'remember' the power state is currently off,
> allowing Nova to pick up the resources.
>
> Hope that helps :)
>
> // jim
>
> >
> >
> >
> > Thanks in advance,
> > Senthil
>
> >
> __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Best Regards,
Senthilprabu Shanmugavel
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Ironic]Nova resource tracker is not able to identify resources of BM instance when fake_pxe driver used

2016-03-29 Thread Jim Rollenhagen
On Tue, Mar 29, 2016 at 04:59:09PM +0300, Senthilprabu Shanmugavel wrote:
> Hello,
> 
> I am using Ironic for deploying baremetal to my openstack environment.
> Using Liberty version on Ubuntu 14.04. I followed Ironic documentation  to
> deploy x86 servers using pxe_ipmitool. Now I have a working Ironic setup
> for PXE boot. I also want to add my test board running ARM 64 bit CPU to
> ironic deployment. I would like to try using fake_pxe drivers because my
> board don't support IPMI or anything else for out of band communication. So
> idea was to do deployment without power management, eventually fake_pxe is
> the obvious choice. But I have problem in updating the Ironic node which I
> will explain below.
> 
> I created ironic node using fake_pxe driver. Added all necessary parameters
> using node-update command. Node-show command output is given below for
> reference
> 
> 
> 
> Because of this during nova boot, scheduler failed to boot the BM instance.
> 
> Can anyone help me with what's wrong in my configuration?

I guess probably someone has never used the fake power driver with
devstack. :)

If a node's power state is None, it will be ignored by Nova:
https://github.com/openstack/nova/blob/master/nova/virt/ironic/driver.py#L171

And the fake power driver doesn't set the power state to on/off itself:
https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/fake.py#L43

We should probably fix this by changing it to:
return task.node.power_state or states.POWER_ON

In the meantime, an easy workaround would be:
ironic node-set-power-state  on
ironic node-set-power-state  off

Which would have the driver 'remember' the power state is currently off,
allowing Nova to pick up the resources.

Hope that helps :)

// jim

> 
> 
> 
> Thanks in advance,
> Senthil

> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Ironic]Nova resource tracker is not able to identify resources of BM instance when fake_pxe driver used

2016-03-29 Thread Senthilprabu Shanmugavel
Hello,

I am using Ironic for deploying baremetal to my openstack environment.
Using Liberty version on Ubuntu 14.04. I followed Ironic documentation  to
deploy x86 servers using pxe_ipmitool. Now I have a working Ironic setup
for PXE boot. I also want to add my test board running ARM 64 bit CPU to
ironic deployment. I would like to try using fake_pxe drivers because my
board don't support IPMI or anything else for out of band communication. So
idea was to do deployment without power management, eventually fake_pxe is
the obvious choice. But I have problem in updating the Ironic node which I
will explain below.

I created ironic node using fake_pxe driver. Added all necessary parameters
using node-update command. Node-show command output is given below for
reference


ironic node-show orange-box
++-+
| Property   | Value
|
++-+
| chassis_uuid   |
|
| clean_step | {}
   |
| console_enabled| False
|
| created_at | 2016-03-29T12:42:53.500572+00:00
   |
| driver | fake_pxe
   |
| driver_info| {u'deploy_ramdisk':
u'd72d31de-8f9c-497c-8c51-87a0610f905b',|
|| u'deploy_kernel':
u'01f16454-ef4c-44d9-ae0e-03d4286aed0a'}  |
| driver_internal_info   | {}
   |
| extra  | {}
   |
| inspection_finished_at | None
   |
| inspection_started_at  | None
   |
| instance_info  | {u'root_gb': 40, u'deploy_ramdisk':
u'cdd02e76-13aa-4f4e-   |
|| ba32-362119c98fa6', u'deploy_kernel':
u'e1986cab-   |
|| 9e55-4b9a-a094-2eda32361521', u'image_source':
u'cdd02e76-13aa-4f4e-|
|| ba32-362119c98fa6'}
|
| instance_uuid  | None
   |
| last_error | None
   |
| maintenance| False
|
| maintenance_reason | None
   |
| name   | orange-box
   |
| power_state| None
   |
| properties | {u'memory_mb': 2048, u'cpu_arch': u'aarch64',
u'local_gb': 40, u'cpus': |
|| 2}
   |
| provision_state| available
|
| provision_updated_at   | None
   |
| reservation| None
   |
| target_power_state | None
   |
| target_provision_state | None
   |
| updated_at | 2016-03-29T13:45:07.439046+00:00
   |
| uuid   | 8146c660-b00f-4cec-9357-a4eab714e5fd
   |
++-+

>From nova-compute log (with debugging enabled)


2016-03-29 15:44:02.134 19124 DEBUG nova.virt.ironic.driver
[req-fbc8fc44-a3a4-43b0-bd82-cf077007320e - - - - -] Returning 1 available
node(s) get_available_nodes
/usr/lib/python2.7/dist-packages/nova/virt/ironic/driver.py:596
2016-03-29 15:44:02.135 19124 INFO nova.compute.resource_tracker
[req-fbc8fc44-a3a4-43b0-bd82-cf077007320e - - - - -] Auditing locally
available compute resources for node 8146c660-b00f-4cec-9357-a4eab714e5fd
2016-03-29 15:44:02.135 19124 DEBUG nova.virt.ironic.driver
[req-fbc8fc44-a3a4-43b0-bd82-cf077007320e - - - - -] Using cache for node
8146c660-b00f-4cec-9357-a4eab714e5fd, age: 0.00126004219055
get_available_resource
/usr/lib/python2.7/dist-packages/nova/virt/ironic/driver.py:621
2016-03-29 15:44:02.136 19124 DEBUG nova.compute.resource_tracker
[req-fbc8fc44-a3a4-43b0-bd82-cf077007320e - - - - -] *Hypervisor: VCPU
information unavailable* _report_hypervisor_resource_view
/usr/lib/python2.7/dist-packages/nova/compute/resource_tracker.py:591
2016-03-29 15:44:02.137 19124 DEBUG nova.compute.resource_tracker
[req-fbc8fc44-a3a4-43b0-bd82-cf077007320e - - - - -] Hypervisor/Node
resource view: name=8146c660-b00f-4cec-9357-a4eab714e5fd *free_ram=0MB
free_disk=0GB free_vcpus=unknown* pci_devices=None
_report_hypervisor_resource_view
/usr/lib/python2.7/dist-packages/nova/compute/resource_tracker.py:610

Nova resource tracker is not able to find the available resource like CPU,
MEMORY and DISK and all are pointing to ZERO even though I ran "ironic
node-update orange-box add properties/memory_mb=2048 properties/local_gb=40
properties/cpu_arch=aarch64 properties/cpus=2".

ironic node-validate orange-box
+++---+
|