Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1773

Cant remove a dangling symlink

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Platform:
      Linux
    • Steps to reproduce:
      Manual steps provided

      Description

      I have the following bundle

      <pre>
      bundle agent disable_runit_service(runit_service) {
      classes:
      "no_state_administration" expression => fileexists("/etc/cfe.d/no_cfe_state_administration");

      files:
      "/etc/runit/service/$(runit_service)"
      handle => "runit_services_administration_tidy_etc_runit_service_runit_service",
      delete => tidy,
      file_select => all,
      depth_search => recurse("inf"),
      classes => if_repaired("$(runit_service)_service_modified");

      "/etc/runit/service/$(runit_service)/."
      handle => "runit_services_administration_tidy_base_directory_for_runit_service",
      delete => tidy,
      classes => if_repaired("$(runit_service)_service_modified");

      "/export/service/$(runit_service)"
      handle => "runit_services_administration_tidy_export_service_runit_service",
      delete => tidy,
      classes => if_repaired("$(runit_service)_service_modified");

      services:
      !no_state_administration::
      "$(runit_service)"
      handle => "runit_services_administration_stop_runit_service",
      service_policy => "stop",
      classes => if_repaired("$(runit_service)_service_modified");

      reports:
      cfengine_3::
      "cf3: The service /export/service/$(runit_service) was modified on $(sys.host)"
      ifvarclass => "$(runit_service)_service_modified";
      }

      </pre>

      The handle => "runit_services_administration_tidy_export_service_runit_service", should be deleting the symlink, but since the previous promise has cleaned the destination directory, I can't get the dead symlink to remove regardlesss of the file_select body I implement.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                msvoboda@linkedin.com mike svoboda
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel