Page MenuHomePhabricator

Stretch grid problem: migrating a perl script, basic instructions needed
Closed, ResolvedPublic

Description

While migrating (my tool) to the Stretch job grid I ran into this problem:

My tool is a perl cgi-script:
https://tools.wmflabs.org/admin/tool/citation-template-filling/cgi-bin/index.cgi

I have shut down the webservice on trusty and restarted it on stretch using:

webservice --backend=kubernetes start

(Note: I also deleted the $HOME/service.manifest file before starting the web service on stretch)

First question: is this the correct way to migrate a perl cgi script? Have I missed something? Are there any instructions for migrating a perl based tools?

To make sure that the basic functionality is work, I have made changes to the following test script:

/data/project/citation-template-filling/cgi-bin/test.cgi

that do not appear in when accessed from the web:

https://tools.wmflabs.org/citation-template-filling/cgi-bin/test.cgi

The original "Hello world" from a previous version of test.cgi but not the expect new message. It is as if the original version is being provided from a cache. Is there a way to purge the cache? Have I missed something else? Also I have created new test files in the same directory, but I get a "404 - Not Found" error when trying to access them from a web browser.

Event Timeline

Boghog created this task.Mar 10 2019, 1:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 10 2019, 1:00 PM
bd808 added a subscriber: bd808.Mar 14 2019, 6:10 AM

First question: is this the correct way to migrate a perl cgi script? Have I missed something? Are there any instructions for migrating a perl based tools?

We do not currently have a specific Kubernetes image for Perl webservices (T214343: Create a Perl Docker image for use on the Toolforge Kubernetes cluster). Your tool may work fine with the default type of php5.6 that the webservice --backend=kubernetes start command would have selected, but I think that's unlikely if your cgi's are not completely self contained.

Having looked around in the tool's $HOME a bit, I think things will be easiest for you right now to use the Stretch grid as your backend rather than Kubernetes. webservice --backend=gridengine lighttpd start should give you an environment that is functionally identical to what you would have been running under on the Trusty grid.

/data/project/citation-template-filling/cgi-bin/test.cgi

The correct directory would be $HOME/public_html/cgi-bin based on the config in your $HOME/.lighttpd.conf which follows the recommendation from the help docs.

Thanks!

Per your suggestion, I updated
$HOME/public_html/cgi-bin/index.cgi
(During the migration, I had mistakenly edited the wrong script)

and restart the web service
webservice --backend=gridengine lighttpd start

And now the template filler is up and running again! Thanks again for your help.

bd808 closed this task as Resolved.Mar 17 2019, 8:03 PM
bd808 assigned this task to Boghog.