-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Run same OnDemand Request with different parameters set in commandline #1058
Comments
Just adding to the my doubts here, When I pass commandline arguments to a one off task, following is the what can be seen in stdout for the task. Forked command at 38876 This comma in what makes me think that this might be a bug. If comma is not present the code will run correctly I guess |
Hey @the100rabh , there are a few nuances with the way mesos processes the commands for these tasks, and it has to do with shell mode. There are a few fields you could use to get this working the way you want and I'll try to outline that here. On deploy you would probably want something like these fields set in your deploy:
This on the deploy is specifying that the command sent to mesos is Now for the extra arguments each time. When you To explain the shell setting a bit more, whenever Singularity sees that arguments or commandLineArgs are set, it will set shell to false. So in you case this meant that you command Hope this helps, feel free to reopen if you have any more questions. |
@ssalinas I tried exactly what you mentioned above. Below is the output I got in STDOUT
|
Just to add to what I mentioned above @ssalinas, I if include all the arguments in command it works wonderfully.
Output of STDOUT
|
@the100rabh was there any helpful output in stderr that might provide more info? First thought it that it isn't finding java on your path since there is no |
@ssalinas I think the problem here is because of no Is there anyway I can try and debug this at my end. Would love to dig deeper into this but dont know where to start looking. Any implementation or design docs would help me as well. |
@the100rabh , when in shell |
Tried that, same result |
Another piece of info, not sure if that will be helpful or not. Even if default arguments are given, it gives the same result. |
@the100rabh have you gotten this working, or are you still having issues here? |
Closing this one since we haven't heard back in a while. If you are still having issues, feel free to reopen |
Many years later, it looks like this issue is not resolved. I'm having the same problem. I have a simple bash script which expects 2 command line arguments. If I don't use "arguments" and just construct the command in full, then it works. If I specify command and arguments separately like you suggested about, it does not work no matter what I do. This is not a problem for "Run Once" requests, but additional arguments is a must-have for "On-Demand" requests. So how do I pass in arguments to commands separately? For example, for a "Run-Once" request, I'd like the following to work (but it doesn't at the moment):
I think if I can get this to work, the same thing will apply to specifying additional command line arguments to "On-Demand" deployments |
I think I'm starting to understand how this is supposed to work for the "Run-Once" request. The following worked:
So my problem was that I was not adding the executable to the arguments list. This is weird, but I can live with that.. (even providing Now I need something like this for the "On-Demand" request though. In that case, I'd like to specify the base command during "Deploy" and when I run, I'd like to provide additional arguments which are run dependent. How can I make that work? |
I think I got it working for On-Demand as well with the following json data:
and POST'ing to this endpoint: In both cases, the trick is to use |
^closing since the above mentioned it was working now |
I am trying to run a jar file while get some data and put it on S3. So I am thinking of it as an onDemand Task.
Things like what data to get and some other parameters change everytime this task needs to run.
Is there a way to set these parameters while running the task and not just while deploying it. Or do I need to deploy a different request each time which to me seems like an extra step
The text was updated successfully, but these errors were encountered: