<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 7, 2022 at 2:20 PM Carol Bouchard <<a href="mailto:cbouchar@redhat.com">cbouchar@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Ruby:<div><br></div><div>I couldn't use your whole changeset since it introduced a different issue.  With your patch, I was seeing the</div><div>following error and it never reached the code creating squashfs.img as a directory.  So I removed the patch</div><div>and only applied the pxe_util.py changes in cache_ramdisk_kernel() and I've made further progress.  </div><div><br></div><div><i><b>| last_error | Failed to prepare to deploy: Cannot validate driver deploy. Some parameters were missing in node's instance_info. Missing are: ['root_gb'] |</b></i><br></div><div><br></div><div><div>Is this root_gb a new requirement?  More background: At the moment, I don't have baremetal devices and I'm starting my work by</div><div>using VMs bifrost created for me.  Also I'm using the xena branch of bifrost/ironic.</div></div><div><br></div><div>Carol</div></div><br></blockquote><div><br></div><div>root_gb is old. I suspect bifrost doesn't use/need that information. If all the info you have for using the anaconda deploy interface is in the OS image or via configs, you'll be ok. Although when that patch merges, it'll break your use case if the VM-ironic-node doesn't have instance_info['root_gb'] specified. That code is getting triggered via:</div><div><br></div><div>   PXEAnacondaDeploy.prepare(): node.instance_info = deploy_utils.build_instance_info_for_deploy(</div>                task).</div><div class="gmail_quote">   which causes this code to be invoked [1]</div><div class="gmail_quote"><br></div><div class="gmail_quote">To get around it, you could set the ironic node's instance_info to have 'root_gb' = <some value>. Eg: "openstack baremetal node set <node> --instance-info root_gb=10"</div><div class="gmail_quote"><br></div><div class="gmail_quote">It seems to me that we might want to modify the code to handle this (any takers?)</div><div class="gmail_quote"><br></div><div class="gmail_quote">--ruby</div><div class="gmail_quote"><br></div><div class="gmail_quote">[1]:</div><div class="gmail_quote"><a href="https://opendev.org/openstack/ironic/src/commit/a4a89d6b20a03e692e0550e3a34a97c7a63f266c/ironic/drivers/modules/deploy_utils.py#L866-L870">https://opendev.org/openstack/ironic/src/commit/a4a89d6b20a03e692e0550e3a34a97c7a63f266c/ironic/drivers/modules/deploy_utils.py#L866-L870</a> </div><div class="gmail_quote"><br></div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 7, 2022 at 11:56 AM Ruby Loo <<a href="mailto:opensrloo@gmail.com" target="_blank">opensrloo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Carol,<div><br></div><div>Thanks for reporting this! It is a bug :-( The fix is in <a href="https://review.opendev.org/c/openstack/ironic/+/827924" target="_blank">https://review.opendev.org/c/openstack/ironic/+/827924</a>.</div><div><br></div><div>--ruby</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 4, 2022 at 11:44 AM Carol Bouchard <<a href="mailto:cbouchar@redhat.com" target="_blank">cbouchar@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Ironic folks:</div><div><br></div>I'm trying to spawn a RHEL7 image using a kickstart file and having issues with stage2 file.<div>First I used bifrost to initially setup a couple of VMs.  (There is no openstack/glance).</div><div>I'm now using one of those VMs to boot up with RHEL7. I changed the VM config</div><div>with the following:</div><div><br></div><div><i><font color="#666666">| deploy_interface       | anaconda</font></i></div><div><i><font color="#666666"> | instance_info          | {'kernel': '<a href="http://myip:8080/RHEL7/vmlinuz" target="_blank">http://myip:8080/RHEL7/vmlinuz</a>', 'ramdisk': '<a href="http://myip:8080/RHEL7/initrd.img" target="_blank">http://myip:8080/RHEL7/initrd.img</a>', 'image_source': '<a href="http://myip:8080/RHEL7/initrd.img" target="_blank">http://myip:8080/RHEL7/initrd.img</a>', 'stage2': '<a href="http://myip:8080/RHEL7/squashfs.img" target="_blank">http://myip:8080/RHEL7/squashfs.img</a>', 'ks_cfg': '<a href="http://myip:8080/RHEL7/ks.cfg.template" target="_blank">http://myip:8080/RHEL7/ks.cfg.template</a>', 'ks_template': '<a href="http://myip:8080/RHEL7/ks.cfg.template" target="_blank">http://myip:8080/RHEL7/ks.cfg.template</a>'}</font></i><br></div><div><br></div><div>ironic.conf changes I made are as follows:</div><div><i><font color="#666666">enabled_deploy_interfaces = direct,ramdisk,anaconda<br></font></i></div><div><i><font color="#666666">[anaconda]<br>default_ks_template = file:///etc/ironic/ks.cfg.template</font></i><br></div><div><br></div><div>The error I'm getting is as follows:</div><div> <i><font color="#666666">$ baremetal node show testvm1 --field last_error</font></i></div><div><i><font color="#666666">| last_error | Deploy step deploy.deploy failed with IsADirectoryError: [Errno 21] Is a directory: '/httpboot/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11/LiveOS/squashfs.img'.<br></font></i></div><div><font color="#000000">Tail end of traceback is as follows:</font></div><div><i><font color="#666666"> ironic-conductor[]:   ERROR ironic.conductor.utils   File "/opt/stack/bifrost/lib64/python3.9/site-packages/ironic/common/pxe_utils.py", line 1245, in cache_ramdisk_kernel<br> ironic-conductor[]:   ERROR ironic.conductor.utils     deploy_utils.fetch_images(ctx, TFTPImageCache(), list(t_pxe_info.values()),<br> ironic-conductor[]:   ERROR ironic.conductor.utils   File "/opt/stack/bifrost/lib64/python3.9/site-packages/ironic/drivers/modules/deploy_utils.py", line 240, in fetch_images<br> ironic-conductor[]:   ERROR ironic.conductor.utils     cache.fetch_image(href, path, ctx=ctx, force_raw=force_raw)<br> ironic-conductor[]:   ERROR ironic.conductor.utils   File "/opt/stack/bifrost/lib64/python3.9/site-packages/ironic/drivers/modules/image_cache.py", line 120, in fetch_image<br> ironic-conductor[]:   ERROR ironic.conductor.utils     dest_up_to_date = _delete_dest_path_if_stale(master_path,<br> ironic-conductor[]:   ERROR ironic.conductor.utils   File "/opt/stack/bifrost/lib64/python3.9/site-packages/ironic/drivers/modules/image_cache.py", line 460, in _delete_dest_path_if_stale<br> ironic-conductor[]:   ERROR ironic.conductor.utils     os.unlink(dest_path)<br> ironic-conductor[]:   ERROR ironic.conductor.utils IsADirectoryError: [Errno 21] Is a directory: '/httpboot/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11/LiveOS/squashfs.img'</font></i><br></div><div><i><font color="#666666"><br></font></i></div><div><font color="#000000">Please advise.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Carol</font></div><div><br></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>