Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-3362

Softaculous: Add cron job for reattempting failed installations

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.8.0-b1
    • Fix Version/s: 4.8.0
    • Component/s: None
    • Labels:
      None

      Description

      Right now if an installation fails, there is no way to make another attempt. This is particularly important when dealing with a panel like CentOS Web Panel which fails when an installation attempt is made immediately since the server is still being spun up.

      We should add a cron job to reattempts installation. We should probably leave the immediate installation attempt because when it works it is quite convenient.

        Activity

        Hide
        tyson Tyson Phillips (Inactive) added a comment -

        My expectation of the flow would be:

        1. Attempt to install the script using the AddService event
        2. On failure, store the data necessary for performing that action on a new plugin table, including the service ID, and write a log regarding the failure
        3. Setup a cron job to run every 5 minutes that looks for records in that plugin table and:
          • Check whether the action has been performed already or not (e.g. by querying the API to see if the script is installed). If it is, delete the record from the plugin table
          • If the script is not installed, attempt to install it using the data available from the plugin table
          • When the script is installed, delete the record from the plugin table
        4. If the script continues to fail, try at most 3 times (also stored and incrementing on the plugin table), then write a log regarding the last failed attempt

        This cron can be used for any scripts that cannot be provisioned immediately. So for example, with CentOSWebPanel, it may be better to not attempt the script installation immediately from the AddService event since it is known to always fail. Instead, save the information for the cron to attempt it later.

        Show
        tyson Tyson Phillips (Inactive) added a comment - My expectation of the flow would be: Attempt to install the script using the AddService event On failure, store the data necessary for performing that action on a new plugin table, including the service ID, and write a log regarding the failure Setup a cron job to run every 5 minutes that looks for records in that plugin table and: Check whether the action has been performed already or not (e.g. by querying the API to see if the script is installed). If it is, delete the record from the plugin table If the script is not installed, attempt to install it using the data available from the plugin table When the script is installed, delete the record from the plugin table If the script continues to fail, try at most 3 times (also stored and incrementing on the plugin table), then write a log regarding the last failed attempt This cron can be used for any scripts that cannot be provisioned immediately. So for example, with CentOSWebPanel, it may be better to not attempt the script installation immediately from the AddService event since it is known to always fail. Instead, save the information for the cron to attempt it later.

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Jan/20

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 5 hours, 59 minutes
              5h 59m

                Agile