dmuegge

updated

11 years ago

D

dmuegge

17 Posts

0

2988

April 12th, 2016 05:00

Pre-Script error terminate plan execution

How can execution of a copy plan be terminated if an error is encountered in the pre-copy script?

It seems the current behavior is to error just the pre-copy script phase which will send an alert, but I cannot find any documentation on a method to terminate the plan.

Thanks,

Dave

  • schifa

    82 Posts

    1523

    0

    Posted April 15th, 2016 09:00

    The UI (web based GUI) has pre-copy, post-copy, and post-mount script options, where you select a script to initiate. If a script that is initiated by this method fails, AppSync will continue providing an array copy, and will not notify you of the error. Please see the User and Administration Guide for more details. These can also be managed by REST and CLI scripting.

    AppSync also supports "callout" scripts for the file system service plans. These are designed to support freezing/thawing 3rd party databases that AppSync does not support with native APIs. More details are depicted in the User and Administration guide.

    If a callout script fails, so will the AppSync job, because if a database is not able to be frozen or thawed, it is not likely to be valid.

  • schifa

    82 Posts

    1523

    0

    Posted April 12th, 2016 05:00

    Dave,

    Your script must have an exit code. An exit code of zero will allow AppSync to continue. Any exit code other than zero will cause the AppSync job to fail.

  • schifa

    82 Posts

    1524

    0

    Posted April 12th, 2016 07:00

    Researching...

  • dmuegge

    17 Posts

    1523

    0

    Posted April 12th, 2016 07:00

    Schifa,

    Thank you for the reply! I have error handling in my script and am throwing an error.

    AppSync_Event_Log.PNG.png

    See the log above, the script did error and exit with the error code of 1, but the next phases still continue.

    Your help is much appreciated in working through this issue. I am a partner working with a customer on an implementation.

    Thank You,

    Dave

  • dmuegge

    17 Posts

    1524

    0

    Posted April 12th, 2016 13:00

    Any luck?

  • schifa

    82 Posts

    1524

    1

    Posted April 14th, 2016 11:00

    The official answer is that this is expected behavior. Callout scripts will cause the service plan to fail, but the UI initiated scripts will not.

  • dmuegge

    17 Posts

    1524

    0

    Posted April 15th, 2016 09:00

    Thanks, I see it in the docs now.

    Appreciate the help.

  • dmuegge

    17 Posts

    1524

    0

    Posted April 15th, 2016 09:00

    Can you elaborate on callout vs UI initiated? I do not understand the difference.