no tasks files created when starting task



  • I am running 1.4.0 on Windows Server 2019. So far I have just been using on-demand, but just now i tried to deploy some machines from the main tool. This did not work as hands-off as i expected: When creating a task for a machine through the web interface it:

    • does not wake on LAN
    • no boot file is created in \CloneDeploy\tftpboot\pxelinux.cfg

    I have to thus manually PXE boot, and in the menu select CloneDeploy, at which point the task is then found after logging in.
    This happens both when using ipxe (which i'd like to use) and when using pxelinux.

    Did i miss a configuration step, or is it possible i messed something up when trying out various boot modes (e.g., I recently switched back from UEFI to legacy network stack on my machines as they post extremely slowly in UEFI mode, don't know if that messes something up)?
    I'd be happy to wipe and reinstall CloneDeploy, since i can restore computers and images from an export



  • Ok, "does not Wake on LAN" turned out to be a target misconfiguration, so that is fixed now. But the problem that no task files are created persists. How can I debug this? I have just uninstalled clonedeploy and reinstalled it and the problem persists. (It doesn't seem this was a completely clean reinstall, the database still existed and all my computers were still in it (nice!))



  • Just updating for posteriority and in the hope someone has an answer already: The problem is related to having done the advice here:
    https://forum.clonedeploy.org/topic/793/network-card-utilization/3
    for load balancing across multiple NICs using cluster groups. Somehow that prevents the boot files from being created.

    I have a development environment set up, and will post back once i figure this out 🙂



  • Ok, i have figured this out, and have a probably shitty patch that does the trick for me.
    The problem is that with the setup suggested here (https://forum.clonedeploy.org/topic/793/network-card-utilization/3), you cannot add secondary servers to your cluster (as both NICs refer to the same machine and thus the same running instance of clonedeploy, it'll complain about the indicated secondary server not being in secondary cluster mode).
    Because there is no secondary server, the "Select Servers And Roles For The Group" bit of the cluster group UI fails (foreign key error upon insertion as there is no secondary server).
    Due to the tftp role not being set for the cluster group,

    _clusterGroupServices.GetClusterTftpServers(clusterGroup.Id) 
    

    called in TaskBootMenu.cs returns an empty list, causing boot file creation for the cluster to silently fail (loop simply doesn't iterate).

    A crappy patch (i don't know if this causes problems elsewhere) is to replace

    foreach (var tftpServer in _clusterGroupServices.GetClusterTftpServers(clusterGroup.Id))
    

    with

    var tftpServers = _clusterGroupServices.GetClusterTftpServers(clusterGroup.Id);
    if (tftpServers.Count==0)
    {
        // no tftp server found for this cluster. I have seen that happen when using a
        // fake cluster where both members are different NICs on the same computer. That
        // means no secondary server can be defined for the cluster, which messes up
        // defining tftp role for for the cluster group (foreign key constraint failure
        // because there is no secondary server). Then we get count=0 here. Fall back to
        // seeing if the server we're on has tftp role defined in its cluster server role
        // and if so, use it
        if (SettingServices.GetSettingValue(SettingStrings.TftpServerRole).Equals("1"))
        {
            var fakeServer = new ClusterGroupServerEntity();
            fakeServer.ServerId = -1;    // only thing that needs to be set
            tftpServers.Add(fakeServer);
        }
    }
    foreach (var tftpServer in tftpServers)
    

    for all occurrences in TaskBootMenu.cs and CleanTaskBootFiles.cs, in CloneDeploy-Services/Workflows