f5-appsvcs-extension icon indicating copy to clipboard operation
f5-appsvcs-extension copied to clipboard

Changes in iFiles not detected, cannot alter once created

Open j-zehnder opened this issue 1 year ago • 7 comments

Environment

  • Application Services Version: 3.49.0
  • BIG-IP Version: 17.1.1.1

Summary

If a declaration includes a base64 encoded iFile, any changes to that iFile are not detected, meaning AS3 cannot manage further updates to the content.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Submit the following declaration:
{
  "class": "AS3",
  "action": "deploy",
  "persist": false,
  "updateMode": "selective",
  "historyLimit": 2,
  "declaration": {
    "id": "iFileIssue_demo",
    "class": "ADC",
    "schemaVersion": "3.49.0",
    "iFileIssue_demo": {
      "class": "Tenant",
      "app": {
        "class": "Application",
        "template": "generic",
        "http_vs": {
          "class": "Service_HTTP",
          "virtualAddresses": ["10.7.25.15"],
          "iRules": [
            {
              "use": "content_rule"
            }
          ]
        },
        "content_rule": {
          "class": "iRule",
          "iRule": {
            "base64": "d2hlbiBIVFRQX1JFUVVFU1QgcHJpb3JpdHkgNTAgewogICAgaWYge1tIVFRQOjpoYXNfcmVzcG9uZGVkXX0ge3JldHVybn0KCiAgICBIVFRQOjpyZXNwb25kIDIwMCBjb250ZW50IFtpZmlsZSBnZXQgL2lGaWxlSXNzdWVfZGVtby9hcHAvY29udGVudF0gQ29udGVudC1UeXBlIHRleHQvaHRtbCBDb25uZWN0aW9uIGNsb3NlIFgtUmVhc29uLUNkIHBkIFgtRnJhbWUtT3B0aW9ucyBERU5ZIFgtQ29udGVudC1UeXBlLU9wdGlvbnMgbm9zbmlmZgp9"
          }
        },
        "content": {
          "class": "iFile",
          "iFile": {
            "base64": "PGh0bWw+CiAgICA8aGVhZD48L2hlYWQ+CiAgICA8Ym9keT4KICAgICAgICA8cD5NZXNzYWdlOiBTYW1wbGUgTWVzc2FnZSAxPC9wPgogICAgPC9ib2R5Pgo8L2h0bWw+"
          }
        }
      }
    }
  }
}

The iRule is a simple rule to serve the iFile content:

when HTTP_REQUEST priority 50 {
    if {[HTTP::has_responded]} {return}

    HTTP::respond 200 content [ifile get /iFileIssue_demo/app/content] Content-Type text/html Connection close X-Reason-Cd pd X-Frame-Options DENY X-Content-Type-Options nosniff
}

and the content is simple HTML:

<html>
    <head></head>
    <body>
        <p>Message: Sample Message 1</p>
    </body>
</html>

Make a minor change to the HTML content, and post the update. In this example, I changed the message to "Sample Message changed"

  1. Observe the following error response:
{
  "id": "ca26d38a-ae86-4f71-bed9-0b959bafc5ea",
  "results": [
    {
      "code": 200,
      "message": "no change",
      "host": "localhost",
      "tenant": "iFileIssue_demo",
      "runTime": 1701,
      "declarationId": "iFileIssue_demo"
    }
  ],
  "declaration": {
    "iFileIssue_demo": {
      "class": "Tenant",
      "app": {
        "class": "Application",
        "template": "generic",
        "http_vs": {
          "class": "Service_HTTP",
          "virtualAddresses": ["10.7.25.15"],
          "iRules": [{ "use": "content_rule" }]
        },
        "content_rule": {
          "class": "iRule",
          "iRule": {
            "base64": "d2hlbiBIVFRQX1JFUVVFU1QgcHJpb3JpdHkgNTAgewogICAgaWYge1tIVFRQOjpoYXNfcmVzcG9uZGVkXX0ge3JldHVybn0KCiAgICBIVFRQOjpyZXNwb25kIDIwMCBjb250ZW50IFtpZmlsZSBnZXQgL2lGaWxlSXNzdWVfZGVtby9hcHAvY29udGVudF0gQ29udGVudC1UeXBlIHRleHQvaHRtbCBDb25uZWN0aW9uIGNsb3NlIFgtUmVhc29uLUNkIHBkIFgtRnJhbWUtT3B0aW9ucyBERU5ZIFgtQ29udGVudC1UeXBlLU9wdGlvbnMgbm9zbmlmZgp9"
          }
        },
        "content": {
          "class": "iFile",
          "iFile": {
            "base64": "PGh0bWw+CiAgICA8aGVhZD48L2hlYWQ+CiAgICA8Ym9keT4KICAgICAgICA8cD5NZXNzYWdlOiBTYW1wbGUgTWVzc2FnZSBjaGFuZ2VkPC9wPgogICAgPC9ib2R5Pgo8L2h0bWw+"
          }
        }
      }
    },
    "id": "iFileIssue_demo",
    "class": "ADC",
    "schemaVersion": "3.49.0",
    "updateMode": "selective",
    "controls": { "archiveTimestamp": "2024-03-21T13:47:18.516Z" }
  }
}

Expected Behavior

AS3 should detect the change and save the updated content

I have also noticed that when there are other changes present, the declaration is accepted, but no changes are made to the iFile. They cannot be updated once deployed.

j-zehnder avatar Mar 21 '24 14:03 j-zehnder

We appear to be encountering this as well.

sectoreleven avatar May 29 '24 16:05 sectoreleven

This behaviour is also seen when using an URL reference:

      "unavailablepage_tools_index.html": {
        "class": "iFile",
        "iFile": {
          "url": {
            "url": "https://<something>/unavailablepage_tools_index.html",
            "ignoreChanges": false
          }
        }
      },

amolari avatar Jun 09 '24 09:06 amolari

We are also encountering this issue, in both AS3 versions 3.46 And 3.51, on BIG-IP versions v15.1.10.4 and on v17.1.1.3

rhys-kitikion avatar Aug 01 '24 22:08 rhys-kitikion

Jira filed AUTOTOOL-4304 and added to queue. Prioritizing with PD

mdditt2000 avatar Jan 30 '25 20:01 mdditt2000

Customer noted that this issue is resolved in 17.1 and AS3-53

mdditt2000 avatar Jan 30 '25 20:01 mdditt2000

I can confirm that this bug is still present in 17.1.2.1 | 0.0.2 and AS3 3.53.0

devildog-tech avatar Feb 07 '25 17:02 devildog-tech

Reopening issue as not resolved

mdditt2000 avatar Feb 07 '25 19:02 mdditt2000

This issue is resolved in AUTOTOOL-4734 AS3 3.55.0, which will be available shortly. Closing GitHub issue

mdditt2000 avatar Oct 29 '25 14:10 mdditt2000