Project

General

Profile

Actions

Bug #986

closed

USE_APPION_WRAPPER not defined by the setup wizard.

Added by Christopher Irving over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Eric Hou
Category:
-
Target version:
Start date:
11/01/2010
Due date:
% Done:

0%

Estimated time:
Affected Version:
Appion/Leginon 2.1.0
Show in known bugs:
No
Workaround:

Description

The setup wizard is not inserting the statements define('USE_APPION_WRAPPER', false); and define('APPION_WRAPPER_PATH', ""); into the config file anymore. The template still has them though. Without those set the code that checks it in processing/inc/processing.inc always succeeds and since APPION_WRAPPER_PATH isn't defined it will insert the literal string "APPION_WRAPPER_PATH" in front of every command.

from processing.inc

function addAppionWrapper($command) {
        if (USE_APPION_WRAPPER) {
                $command = APPION_WRAPPER_PATH." ".$command;
        }
        return $command;
}

So Anna-Claire was getting errors like:
/bin/sh APPION_WRAPPER_PATH : command not found.

Actions #1

Updated by Eric Hou over 13 years ago

  • Assignee set to Eric Hou
Actions #2

Updated by Eric Hou over 13 years ago

  • Status changed from New to In Code Review

I comment out the APPION_WRAPPER constant in the config.php.template so the wizard will skip this constant for 2.1 release.

To test.
run wizard with out config.php and check the config file see if the APPION_WRAPPER has any value or not.
re-run wizard with config.php and the result should be the same.

Thanks.

Eric

Actions #3

Updated by Christopher Irving over 13 years ago

  • Status changed from In Code Review to Assigned

No this doesn't work because the reason it is broken in the first place is that the config.php doesn't define USE_APPION_WRAPPER or APPION_WRAPPER_PATH. This leads to a command line like this:

APPION_WRAPPER_PATH centerParticleStack.py --stack-id= --description="fdsafadsfdaf" --no-commit --rundir=/ami/exdata/appion/10aug26c/stacks/centered --runname=centered --projectid=262 --expId=7976 --jobtype=makestack

There are two options on how to fix it:
1> even though we're not giving user the option of setting them, make sure that USE_APPION_WRAPPER is defined as false and APPION_WRAPPER_PATH as the empty string "".
or
2> Comment out the calls to addAppionWrapper($command) in processing.inc. ( source:trunk/myamiweb/processing/inc/processing.inc#L770 and source:trunk/myamiweb/processing/inc/processing.inc#L871)

I prefer option 1 because I'm not positive option two catches every case.

Actions #4

Updated by Eric Hou over 13 years ago

ok, then set the USE_APPION_WRAPPER to false as default. and just comment out the APPION_WRAPPER_PATH

Thanks.

Eric

Actions #5

Updated by Amber Herold over 13 years ago

Just want to note that if option number 2 is used, don't check it into the trunk.

Actions #6

Updated by Eric Hou over 13 years ago

the best way to solve this problem is to have an extra check in the wizard logic to determine the value of the constant. Appion 2.0 does not have any logic of appion-wrapper, therefore the wizard does not know what to do with this new constant in the config.php.template.
I will put more logic in the wizard business class to take care this in the feature.
In the mean time, comment out the appion wrapper path constant start with "// --- " but don't comment out the USE_APPION_WRAPPER constant (set it to false).

Thanks.

Eric

Actions #7

Updated by Amber Herold over 13 years ago

I have not been able to reproduce the problem with the 2.1 branch. It is possible that there was an isolated glitch with the Goby install. It looks like the last 4 values were truncated in the Goby config file, including the Appion Wrapper values, even though they appear in the template file correctly.

Actions #8

Updated by Eric Hou over 13 years ago

Hi Amber!
did you just svn from branch today for testing? Because I fixed the problem yesterday night.

Eric

Actions #9

Updated by Amber Herold over 13 years ago

  • Status changed from Assigned to Closed

Yes, I used the branch, but that did not include your changes to the trunk. The fix you are talking about is commenting out the Path for the wrapper. I don't think that is necessary for it to work. I think it was working all along. I am closing out the bug, we can keep an eye out for it in the future, but Christopher was not able to reproduce it on Goby.

We cannot explain why the problem occurred. 4 settings were not written out, but the closing PHP tag was, so it looks like there was not a failure in the middle of writing the file. Don't know any other explanation, so it is a mystery.

Actions #10

Updated by Eric Hou over 13 years ago

The only thing I can think of is Christopher set USE_APPION_WRAPPER to true but did not set the path for the USE_APPION_WRAPPER. And if you look close to the value of the APPION_WRAPPER in the config file. It might not be an empty string if generate by setup wizard. Maybe it will be look like

define('APPION_WRAPPER_PATH', "APPION_WRAPPER_PATH");

Therefore it causes the problem when USE_APPION_WRAPPER set to true, because the constant name become its own value.

Eric

Actions

Also available in: Atom PDF