[Bug 261097] ctld fails to start on boot after upgrade to 12.3-RELEASE

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 11 Jan 2022 02:55:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261097

            Bug ID: 261097
           Summary: ctld fails to start on boot after upgrade to
                    12.3-RELEASE
           Product: Base System
           Version: 12.3-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: pascal.guitierrez@gmail.com

i have a basic ctl.conf iscsi target running that was working fine on 12.1-R
and 12.2-R, however since upgrading to 12.3-R the userland ctld does not start
on boot anymore.

/etc/rc.conf contains:
ctld_enable=YES

there are no error messages in /var/log/messages that relate to ctld.

the kernel has the device loaded, here's ctladm devlist:
LUN Backend       Size (Blocks)   BS Serial Number    Device ID       
  0 block             402653184 4096 MYSERIAL0000     lun0

but there is no ctld process running...

the workaround is to simply service ctld restart after boot, which results in
the following output:

ctld not running? (check /var/run/ctld.pid).
Starting ctld.
ctld: error returned from port creation request: target
"iqn.2021-11.com.my:target0" for portal group tag 257 already exists
ctld: failed to update port pg0-iqn.2021-11.com.my:target0

the iscsi target then proceeds to work correctly.


here's the ctl.conf for reference:

auth-group ag0 {
    auth-type none
    initiator-portal 172.16.56.10
}
portal-group pg0 {
        discovery-auth-group no-authentication
        listen 172.16.56.20
}

target iqn.2021-11.com.my:target0 {
        auth-group ag0
        portal-group pg0
        lun 0 {
                path /dev/zvol/tank/luns/lun0
                device-id lun0
                blocksize 4096
        }
}

i believe i also observed this problem on 13.0-R, however the system i'm
working on now is 12.3 and is 100% reproduceable, so i'll submit this bug for
12.3.

-- 
You are receiving this mail because:
You are the assignee for the bug.