# Ironic deployment iSCSI - iscsi_target_iqn is not defined

I have successfully setup Packstack Ocata to work with Ironic, but seems that one piece of it it's still missing. I can boot new instance with own image without any error till unpacking ramdisk in baremetal node. I created image parts with following commands:

disk-image-create ubuntu baremetal dhcp-all-interfaces bootloader -o my-image
ramdisk-image-create ubuntu deploy-ironic -o my-image-ramdisk


After DHCP, TFTP and ramdisk unpacking is done and the command where node is pinging Ironic host, there is another part of setup for Ironic going on (as usually at every Ironic deployment). The iSCSI procedure to install image on baremetal node. But here the problem which I'm getting arises (it's shown in node's console). I get message

iscsi_target_iqn is not defined

and after some digging of my OpenStack install and web, I found out that I should have set ISCSI_TARGET_IQN variable as kernel parameter in node's config file (located as /tftpboot/[node_uuid]/config). But it's not, as some other parameters like IRONIC_API_URL (instead of this one, I have something like IPA_URL ), ... I found those variables here - this is also the element which is used in my own image: https://github.com/openstack/diskimage-builder/blob/1.28.0/elements/deploy-ironic/init.d/80-deploy-ironic

I also checked if everything is well with iSCSI daemon and other services which this one depends on. And soon I found out there are some problems which I fixed, so iscsid.service along iscsiuio.service and iscsi-shutdown.service is working. But the problematic is iscsi.service, which is inactive (dead). This is output of systemctl status iscsi.service:

● iscsi.service - Login and scanning of iSCSI devices
Loaded: loaded (/usr/lib/systemd/system/iscsi.service; enabled; vendor preset: disabled)
Active: inactive (dead)
Condition: start condition failed at Sat 2017-03-18 15:56:29 CET; 1h 27min ago
none of the trigger conditions were met
Docs: man:iscsid(8)


I tried again to boot new instance, but the same problem with incorrect config of node and iscsi_target_iqn is not defined appeared again.

I don't have any idea anymore what can I check to make this thing working as expected. I'm thinking that the way I generated image and it's pieces is not appropriate anymore and that's why I'm getting such errors. I couldn't find any better way to do it (I know there is ironic-agent element in newer disk-image-builder), but all other images I built failed at unpacking ramdisk (even with ironic-agent). I would really appreciate any comment on this topic, since I can't find anything related to my problem anywhere else.

Thank you in advance!

edit retag close merge delete